Debugging By Thinking: A Multidisciplinary Approach

I have found it! (in Greek, Heurisko! )
Archimedes
This chapter presents the definitions of debugging heuristics, with examples of using each to find actual bugs. It explains that debugging heuristics don t lend themselves to easy categorization, as is the case with strategies and tactics. It notes that many debugging heuristics are similar to the mathematical heuristics described in Polya s book.
We have identified the following debugging heuristics:
Modify the program so that you can repeat the problem at will.
Create a test case that will demonstrate the problem when desired.
Reduce the input required to reproduce the problem.
Categorize the problem according to a standard set of questions.
Describe the problem according to a standard methodology.
Explain the problem to someone else.
Recall a similar problem from the past.
Draw a diagram.
Choose a hypothesis from historical data.
Most works on debugging recommend a process often called stabilizing the problem . The goal of stabilization is reproducibility. Defects that can t be stabilized can t be fixed. Stabilizing a defect can be the hardest part of the debugging task.
The first step in stabilizing a bug is to run the defective program several times. If you don t always get an undesired behavior, you will need to modify the program or the environment in which you re running it. These types of defects will show a premature termination on one run, an infinite execution on another run, and so on.
Even getting an undesired behavior each time...