To successfully exterminate a bug the first thing you want to do is find the root cause.

  • Do not look at code. It’s compulsory to understand the problem else you will make no progress.  Take a step back, maybe a few steps if needed, and look at the problem from a birds eye view.  An eagle’s eye would be preferable but that comes with experience and a comprehensive knowledge of the system/application you are working with.
  • If the application was running flawlessly (or anything close to it), then it might not be related to code. Find out the recent changes: hardware/server, disk space, software update, database update, configuration files, file updates, etc.  This list can go on and on “to infinity and beyond” (Buzz Light Year – Toy Story) but the main idea is to recognize the change between a bug free state to an unstable state, i.e. when the bug is instigated.  This way you can focus your energy in the right places.
  • Make sure you are able to reproduce the bug.  Step 2 and 3 can be interchangeable depending on the situation.
  • Look at log files/traces or visual changes at the occurrence of the bug.
  • At this point you will have to start looking into the code.   Feces have just hit the fan and you are responsible to clean it up, it’s a dirty job but someone’s got to do it. But look on the bright side, at least you were born brave.