May 1st, 2011 Sean Murphy
Tom Van Vleck has a great collection of software engineering stories on his site. One particularly good article is “Three Questions For Each Bug That You Find” which offers the following key observation:
The key idea behind these questions is that every bug is a symptom of an underlying process. You have to treat the symptoms, but if all you do is treat symptoms, you’ll continue to see more symptoms forever. You need to find out what process produced the bug and change the process. The underlying process that caused your bug is probably non-random and can be controlled, once you identify what happened and what caused it to happen.
Before you ask the three questions, you need to overcome your natural resistance to looking carefully at the bug. Look at the code and explain what went wrong. Start with the observable facts and work backwards, asking why repeatedly, until you can describe the pattern that underlies the bug. Often, you should do this with a colleague, because explaining what you think happened will force you to confront your assumptions about what the program is up to.
These three questions take you beyond root cause corrective action for the particular problem.
- Is this mistake somewhere else also?
Look for other places in the code where the same pattern applies. Vary the pattern systematically to look for similar bugs.
- What next bug is hidden behind this one?
Once you figure out how to fix the bug, you need to imagine what will happen once you fix it.
- What should I do to prevent bugs like this?
Ask how you can change your ways to make this kind of bug impossible by definition. By changing methods or tools, it’s often possible to completely eliminate a whole class of failures instead of shooting the bugs down one by one. The bug may be a symptom of communication problems in the programming team, or of conflicting design assumptions which need discussion.
I think this same approach is applicable for debugging not only software development issues but other processes in your business:
- lead generation
- selling and closing sales
- customer engagement and on-boarding
- customer service
- systems administration
- financial operations and cash flow management
Postscript: Van Vleck’s motto is: “You learn something every day, unless you’re careful.”
I included it in the July 2008 Quotes for Entrepreneurs because I find most days very educational.