We have examined earlier the fundamental laws of bug finding. You will probably know the fundamental stages of bug finding. The 6 basic stages of debugging are well-known among programmers and can be found in various blog posts. During debugging, developers and programmers go through a cycle of emotional states:

  1. DENIAL. That can’t happen.
  2. FRUSTRATION. That doesn’t happen on my machine.
  3. DISBELIEF. That shouldn’t happen.
  4. TESTING. Why does that happen?
  5. GOTCHA. Oh, I see.
  6. RELIEF. How did that ever work?

First (1) we have a stage of denial and surprise: you say that the bug isn’t possible, that it can’t happen, because you have not observed it before. You are surprised. The reason is (2) that is doesn’t happen on your machine or on your computer. You can not reproduce it instantly, and you have not seen this bug before. You get frustrated and sometimes a bit angry. Therefore you think that (3) it shouldn’t happen. Yet someone – unfortunately often a customer or a user – insists that it does. So you (4) ask why it is happening, and why it can happen. The only way to solve this problem is to find out what really happens. You start to examine logs and to debug the program, until you are able to find and to reproduce the bug. If you’ll do this long and hard enough then (5) you see the reason for the bug, and are able to remove it. You are trying to reproduce the bug again to see if it is fixed. Finally (6) you ask yourself how it ever work before. The longer you seek a bug and the longer the phases (1)-(4), the larger the relief in the end.

About these ads