Previous Up Next

Buy this book at Amazon.com

This HTML version of the book is provided as a convenience, but some math equations are not translated correctly. The PDF version is more reliable.

Chapter 15  The Nine Theorems of Debugging

  1. Readable code is debuggable code.
  2. The only thing worse than getting an error message is not getting an error message.
  3. You must always be 100% sure that the code you are running is the code you think you are running.
  4. Error messages tell you where the problem was discovered, not where it was caused.
  5. The best kind of debugging is the kind you don’t have to do.
  6. The worst bugs aren’t in your code; they are in your head.
  7. The best way to avoid a bug is to make it impossible.
  8. Error messages sometimes tell you what’s wrong, but they seldom tell you what to do (and when they try, they’re usually wrong).
  9. Finding a hard bug requires reading, running, ruminating, and sometimes retreating. If you get stuck on one of these activities, try the others.

If you find this book useful, please consider supporting free, open educational materials from Green Tea Press.

Think Python 3e

Think Stats 3e

Think Bayes 2e

Think DSP

Think Complexity 2e

Modeling and Simulation in Python

Think Data Structures

Elements of Data Science


Previous Up Next