Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.
When programmers debug a program, they search for a failure cause, which could lie in the code, the input, or the environment. This cause must be found and eliminated. Once the cause is eliminated, the program works. (Should the program still fail once the cause is eliminated, we may need to revise our beliefs about the cause.)
The general process for finding causes is called the scientific method. Applied to program failures, it works as follows: