How I Learned to Stop Worrying and Love Debugging

When I first learned to program back in high school, the joy that came from it was the act of expression. Much like writing, programming is the act of translating thought into a specific medium. For writers and programmers alike, the emotions felt as a result of expressing oneself are gratifying.

Writers, however, cannot be told that their expressions are wrong–at least by an inanimate object like a compiler or a test case. Although natural language processing is getting more advanced by the day, an author cannot put their latest novel or essay into a program only for it to say “Error: you’re wrong”.

I understand that one might compare compiler errors to mistakes found by spellcheck, but writers at least have the option of ignoring spellcheck. Compilers are gatekeepers: they determine if an individual can share their program with others. Writers don’t have such an intermediary–they can share their expressions with the world, error-ridden or not.

The process of debugging, then, is really nothing more than appeasing the inanimate objects: compilers and test cases. At least, that’s how I’ve predominantly viewed the process since high school. And let’s face it: the act of appeasing anyone or anything is not particularly pleasant.

I thought debugging became even more loathsome as the stakes got higher: say, debugging while trying to complete a project for class. “My grade is riding on this project,” I’d think to myself, “and I have to waste time by debugging?!”. My hate for debugging got to the point where I wrote self-deprecating tweets and asked people on Quora how to prevent myself from getting sad over bugs.

What I failed to realize at that time, however, was that debugging is a natural and–gasp–welcome part of programming. Debugging is as much an act of problem solving as writing code.

In order to love debugging, then, one must come to appreciate code not as an act of expression, but rather an act of problem solving.