Two Sources of Bugs
It's either in the data, or in the code
State
- Class attributes
- Input files
- Method arguments
Revealing State
- Print Statements
- Conditional Statements
- Logging
- Debuggers
Forcing State
- Unit Tests
- Sample Inputs
- Hard-coding with extreme caution
Behaviors
- Call Stack
- Debuggers
- Print Statements
- Loggers
- Unit Tests