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 - 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...
- Lessons in Software Development From the Apollo Moon Missions. Monday was the 40th anniversary of the Apollo 11 lunar landing. The story of the Apollo program is an historic and inspirational one, but it's also relevant to software development....
- IE7 WebControl TreeView line gap in quirks mode. I've been writing a subclass of the MS Webcontrol.TreeView control for one of our Web Applications at work. I figured this would be a fairly easy task, since I only...
- Fun with Cryptography Here's a little Friday fun from Monty at MR01001101. He's got Cryptography and Steganography essays and, here's the fun bit, puzzles that take the user through a chain of tests...
- Free Firewall Recommendations (Protect Yourself Online With These Free Firewalls) If your home computer is connected to the internet, or to other computers that are connected to the internet - you need a firewall. It's as simple as that. Hackers...
Related Websites - Now available: Android 1.6 NDK Today Android 1.6 NDK, release 1 is available for download from the Android developer site. To recap, the NDK is a companion to the SDK that provides tools to generate and embed native ARM machine code within your application packages. This native code has the same restrictions as the VM......
- 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......
- Who Designed That? Is your business to business company aligned with your customers, or only with your product development team? Ask the people in your company in sales, service, and support to tell you what really bothers them the most about the way new products are launched at your company. Are your......
- 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......
- Real Grooves and CLASH45 presents Bunka Vibe @ ageHa on Saturday July 4th L&G, Keen to celebrate Canada-Japan musical relations this Canada Day weekend? Well, Rotation is celebrating its 10th anniversary and getting back to its roots by bringing several of its original Canadian artists into a mini festival of sorts here in Tokyo at Ageha. If you're keen to check it out,......
