Coders and the levels of bug fixing

Level 1: “I’ll fix this bug.”

Level 2: “I’ll fix this bug and change the design and fix 20 or even more bugs at the same time.”

Level 3: “I’ll fix this bug and that bug with this change.”

Level 4: “I’ll fix this bug.”

Although it seems we “go back to basics”, those are completely different levels. On Level 1, you try to fix the bug, but not what is causing it. Speaking in code, it is something like testing if a pointer is NULL before freeing it, but not checking why it is getting as NULL at that point of the code.

On Level 2, instead of fixing the bug, we try to fix the design. It is never a question of if the design is right or wrong, it is a question that we don’t want to check why it was designed that way.

On Level 3, we finally start understanding the design and how a change affects another part of the system. Suddenly we see how one change can affect other parts of the system (and no, it is not ONE change to fix two bugs, it is TWO changes to change TWO bugs, but the second change is affected by the first one.)

On Level 4, we see why the damn pointer is coming as NULL at that point of the code.