Photo by Timothy Dykes on Unsplash

Debugging in 4 Steps

Posted: 12 Nov 2016. Last modified on 04-Jun-22.

This article will take about 1 minute to read.

Most developers start out learning a simple hello world program in their given language. As they progress, their code gets more and more complicated. With this increased complexity comes risk, that your changes will not be doing everything that you intend them to do.

If you are on a professional engineering team, there will be a couple of different lines of defense, even before you pass your changes to QA:

  1. Code review lets us catch domain modelling bugs
  2. Static code analysis lets us catch bad practices
  3. Running unit tests alerts us to unintended changes (especially aournd edge cases)

When writing software, bugs are unavoidable. Once we’ve come to accept the fact that our code is buggy, we need to take steps to diagnose the problem so that we can correct it.

1. 🔍 Observe

2. 📚 Research

3. ☢️ Exterminate

4. 🔮 Futureproof