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 - How To Control Disk Thrash From ccmexec.exe (SMS Agent). Today started like any other day at work. I sat down, logged into my PC and was greeted by the thrashing sound of my hard drive. I've come to realize...
- Microsoft FxCop doesn't like Microsoft generated code! The other day I thought it might be nice to "do the right thing" and give my code a run against Microsoft's FxCop. I ran it right out of the...
- 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:...
- Free Antivirus Recommendations (Protect Yourself Online With Free AntiVirus Software). I got tired of shelling out $40+ a year for antivirus protection long ago. Aside form the price, what really bugged me was the bloat! It became more and more...
- 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...
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......
- 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......
- cpa marketing illinois [mage lang="" source="flickr"]cpa marketing illinois[/mage] A Short History of Systems Development"If they do not have an appreciation of whence we came, I doubt they will have an appreciation of where we should be going." - Bryce's Law INTRODUCTION I always find it amusing when I tell a young person in......
- Home Network Security [/caption] Home Computer security 1. What is computer security? Computer security is the process of preventing and detecting unauthorized use of your computer. Prevention measures help you to stop unauthorized users (also known as "intruders") from accessing any part of your computer system. Detection helps you to determine whether or......
- 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......
