8.3.1: Debugging Theorems
- Page ID
- 97137
Here are the Theorems of Debugging all in one place:
The First Theorem of Debugging: (Section 1.2)
Readable code is debuggable code.
The Second Theorem of Debugging: (Section 1.4)
The only thing worse than getting an error message is not getting an error message.
The Third Theorem of Debugging: (Section 2.5)
Be sure that the code you are running is the code you think you are running.
The Fourth Theorem of Debugging: (Section 2.6)
Error messages tell you where the problem was discovered, not where it was caused.
The Fifth Theorem of Debugging: (Section 3.1)
The best way to avoid a bug is to make it impossible.
The Sixth Theorem of Debugging: (Section 3.9)
The best kind of debugging is the kind you don’t have to do.
The Seventh Theorem of Debugging: (Section 10.2)
The worst bugs aren’t in your code; they’re in your head.
The Eighth Theorem of Debugging: (Section 8.3)
Finding a hard bug requires reading, running, ruminating, and sometimes retreating.
If you get stuck on one of these activities, try the others.