Jul 14 2009

The 3 Most Important Questions You Should Ask About Each Bug You Find.

I stumbled upon (quite literally) an article by Tom Van Vleck titled Three Questions About Each Bug You Find today, and thought I would share it:

“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.”

Tom uses these questions to get to the heart of the matter and weed out the root cause of the bug.

1. Is this mistake somewhere else also?

You want to know if this bug was unique, or due to a problem in a pattern of approach to the specific problem. If it’s unique, you can move on to the next question, but if it’s systemic, you’ll need to address your approach to the development problem the code was intended to solve and devise a new pattern or correct the one in place.

2. What next bug is hidden behind this one?

Often times a bug will either halt the execution of code, or cause the lines after the bug to be bypassed. once you fix the bug, those other lines of code will begin to execute. Be sure to check those for any bugs. Also, consider whether your fix to this bug could cause any new bugs to be introduced.

3. What should I do to prevent bugs like this?

Learn from this mistake. Could the problem be avoided by adding a new test condition to your NUnit test(s)? Should you implement a change to your pattern to check for null reference or out of bounds exceptions sooner? Bugs happen, but if you can use them as teachable moments and learn from them, then they will at least provide some value and make you less likely to run into the same bug in the future.

It’s not always an easy process, mostly because it requires a sort of detached introspection and willingness to be critical and objective when looking at your work. These character traits are not always in high supply, and we humans can often get in the way, but if you can master these techniques you will go far young padawan.

Blog Traffic Exchange Related Posts Blog Traffic Exchange Related Websites
  • Are We Ever Done? The following post is from Neal of WealthPilgrim.com. After reading the article, be sure to sign up for free at Wealth Pilgrim to receive more from Neal. Also, be sure to check out Neal's free "Holidays Without the Headaches" program for families. Great stuff! When are you “done” financially?  Are......
  • Baby Development Milestones at Week 5 After weeks' worth of rapid cell development, one of the biggest baby development milestones during this week is that your baby is taking on a much more distinct form. During your fifth week worth of pregnancy, here are some of the things that are happening inside of you: Your baby's......
  • Stoic Fate There is a missing element that modern Stoics don’t usually embrace. The Hegemon, or logos, is still alive and aware in the world. The world is itself possessed of intelligence in the original Stoic view.  They saw life as a constant dialogue, a "debate" if you will, with that intelligence.......
  • Early Breast Cancer Detection Breast cancer detection can be difficult because the symptoms associated with breast cancer are capable of varying quite widely. Some people experience lumps while others experience swelling, and other people experience changes in their skin. Many people that have breast cancer do not experience any obvious symptoms at all, and......
  • Android SDK Updates Today we are releasing updates to multiple components of the Android SDK: Android 2.0.1, revision 1 Android 1.6, revision 2 SDK Tools, revision 4 Android 2.0.1 is a minor update to Android 2.0. This update includes several bug fixes and behavior changes, such as application resource selection based on API......

Leave a Reply