Knowing What to Chase

Learn the code areas to suspect.

A programmer’s lapse caused a bug, and to find out what it was, the debugger must think more than the programmer did. Like Einstein said: “You cannot solve a problem at the level at which it was created.” The bug one is chasing is in a vast code base, and its symptoms are hidden in massive log spews. The debugger has to narrow it down in the limited time available. One way to accomplish this is by chasing the right questions in order and choosing the right suspects to narrow down further. If the debugger is also the code's author, this is easy, but things get challenging if one is debugging someone else's code. In this lesson, we will list the guidelines for lining up suspects to simplify this process.

Press + to interact
Choosing the right order
Choosing the right order

Lining up the suspects

Writing software is an iterative process. Therefore, a codebase can be divided based on how recently various components or parts were modified or added to the codebase into the following categories:

  • New code

  • Legacy code

  • Library and third-party code

  • The environment or setup

We'll look at each of ...