The hardest bugs are non-bugs

programming
Published

July 12, 2025

Debugging computer programs is hard.

Here I want to share a short piece of hard-earned wisdom which I’m sure has been written about many times before: the hardest bugs to fix are non-bugs, i.e. instances when you misunderstand what the correct output of your program should be. Some examples:

In these instances, I find that I’ve spent a lot of time going through a program line by line only to find that nothing is amiss, and only then do I figure out that I am making the mistake, not the program.

My lesson from this is to try to be really sure of what the expected output of a program should be before going through it line by line. I’m not always perfect but I think this attitude has probably saved me a few days of total time in the past 2 years.