A Taxonomy of Bugs
Published on: 2025-07-12 15:29:18
Debugging is often an undervalued skill. It’s not really taught in schools (as far as I know), instead, you kind of have to pick it up as you go along. Today, I’ll try to remedy that by looking at some common bugs and what to do about them.
The default strategy I use with any bug is to:
Try to find a way of reliably reproducing the bug so that I can break into the debugger when the bug happens and step through the code line by line to see how what it is doing differs from what I think it should be doing.
Once you understand how the code’s actual behavior differs from your mental model of its behavior, it is typically easy to identify the problem and fix it.
I know that there are some very successful programmers that don’t really use debuggers but instead rely completely on printf() and logging. But I don’t really understand how they do it. Trying to understand what the code is doing by inserting one printf() at a time and then re-running the tests seems so much more inefficient tha
... Read full article.