According to This Developer, You Can Learn from Your Bugs

Whether you're a new coder or a seasoned programmer, encountering bugs are almost inevitable in tech. They appear when it's least convenient to the programmer, and dealing with them can be difficult – especially if you're unsure of how they got there in the first place. But, instead of viewing bugs exclusively as a problem, is it possible to use them to your advantage? Can we actually learn from our bugs?

One software developer argues: yes.

Over on his blog, Henrik Warne explores the idea that bugs aren't all annoying problem, but a fascinating and unexpected key to solving common coding problems. Whenever he encounters a particularly interesting or complicated bug, he explores the idea of how it can help him become a better software developer and programmer.

So, what method does Warne follow to learn from his bugs? It's rather simple – he writes a short description of the bug, including all known facts about it, and the lessons learned from it. In the post, he describes how he is able to catalogue all of the bugs he encounters in this way:

“I have a plain text file called bugs.txt. At the top of the file is a template with all the headings, but no information filled in. When I add a new entry, I copy the template section, and paste it in just below the template. Then I go through and fill in the information. Most of the fields shown in the example above should be self-explanatory.

It’s important to note that this is not a bug tracker. And I don’t add all bugs I fix. For example, if I just forgot to add a statement in the code, and as soon as I try it I realize what the problem is, I don’t add an entry. It is only when the bug, or the fix, or the debugging of it was particularly interesting that I add a new entry. Usually, I caused the bug. But occasionally, especially when hunting down a difficult bug over many days, I will add an entry even if I didn’t cause it.

Once a bug is fixed, my first reflex is to breathe a sigh of relief and move on. However, I try to write the entry immediately after it has been fixed. That’s when all the details are still fresh in my mind. Waiting makes it much harder to remember exactly what happened (or I forget to write an entry at all).”

But the question remains: why should you care to catalogue your bugs in this way? It's easier to learn when the bugs are approached from a different angle. The act of writing works for Warne, as it helps him to retain more information that way. Having this system of recollection is also handier to go back and remind himself on the lessons learned.

The next time you encounter a bug, try to approach it from the angle of wanting to learn from the situation. Though this approach may not work for everyone, there's still so much to be gained from utilizing different solution methods to solve a persistent problem.

Photo: Flickr / Dino Latoga

Did you find this article helpful? Click on one of the following buttons
We're so happy you liked! Get more delivered to your inbox just like it.

We're sorry this article didn't help you today – we welcome feedback, so if there's any way you feel we could improve our content, please email us at contact@tech.co

Written by:
Cameron is a tech and culture journalist, comic book enthusiast, and lives near New York City. A graduate of Stockton University, she's using her words to shift the world of online journalism, one byline at a time. When she's not writing, she can be found reading sci-fi novels, collecting succulents, and planning her next obnoxious hair color. Cameron is an editorial fellow at Tech.Co. Send your tips to cameron@tech.co or tweet @BlkGirlManifest.
Back to top