When developing applications software, it’s as important to understand the application as the software to be able to diagnose defects. Domain-specific knowledge makes it possible to identify problems in logic that are plain to the user of the application.
One of the fundamental tenets of modern science is that results must be reproducible to be accepted. Don’t accept defect reports unless you’re given sufficient data to reproduce the problem.
To know what is unusual, you must know what is common. What should be common in an operational piece of software is correct behavior. Correct behavior is defined by an external reference.
You shouldn’t be experimenting unless you have a hypothesis you’re trying to confirm. The best way to ensure that you have a hypothesis is to write it down.
Describing a problem to someone else is one of the oldest ways programmers have used to uncover defects. Since the chief benefit of this method is to get the viewpoint of another person, the place to start is by giving your viewpoint.
Detecting and debugging differ in the extent to which we can create additional evidence. When collecting data, consider not only what to observe, but what point of view to observe from.
If you don’t know what effect a change will have, you have no business making the change. A hypothesis includes a means of verifying the correctness of the proposition.
Try to eliminate as many possible causes and culprits as you can with a single observation. Defects that are difficult to locate are often caused by a conjunction of several conditions, each of which isn’t sufficient to cause the problem on its own.
When you formulate a hypothesis, consider whether you already have evidence in hand that disqualifies the hypothesis. It takes less time to disqualify a hypothesis in this way than to perform yet another experiment.
Programmers almost always work on debugging inductively, rather than deductively. It is possible to reason from an observation to the causes for medium-sized systems, particularly if a single author created them.
The English idiom “red herring” means a piece of information that distracts or deceives. When you come upon a fact that seems to bear upon your investigation, consider all of the interpretations of the fact.