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.
Related Posts - Arraylist and generics don't mix with IEnumerable(Of T).GetEnumerator. The other day I was writing an in-house tool to assist in some upgrades we were performing on client installations. This tool was supposed to perform its operations on a...
- Annoying "next message" behavior in Thunderbird, and how to stop it! I love the Thunderbird email client. I use the portable version on my thumb drive, but one thing has always bugged the hell out of me when I use it:...
- Google Chrome: the OS. Google announced last Tuesday that it has its sights on dethroning Microsoft as desktop OS king: "The new operating system, announced late Tuesday night on Google's Web site, will be...
- How to find what's running under SVCHost.exe My PC was behaving sluggishly the other day. I tried to be patient, but had to fire up the task manager when I could bear it no longer. That's when...
- How to fake a TreeNodeCollection subclass in .NET If you've ever had reason to try to extend the standard Microsoft web TreeView control, you will have no doubt noticed that MS was quite unkind to you and sealed...
Related Websites - Credit is a disease you won't catch here One evening a few weeks ago, we stopped at our local convenience store to get some gas. I walked inside to grab a drink. I don't recall the details of the conversation, but at some point the clerk working the counter said: Credit is a disease that you won't......
- Pregnancy Fetal Development at Week 1 Although it may seem strange to think about, the journey of your pregnancy actually begins before the baby has actually been conceived. The very first week of your pregnancy does not begin with conception, or with the growth of the fetus in your body, but rather it begins with the......
- 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......
- 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.......
- When Gambling Becomes a Problem by Gobierno Federal When Gambling Becomes a Problem While most people enjoy casino gambling, sports betting, lottery and bingo playing for the fun and excitement it provides, others may experience gambling as an addictive and distractive habit. Statistics show that while 85 percent of the adult population in the......
