Ch12 a
Software is difficult to debug for these main reasons:
• The fog of war—Seeing what's happening in the program can be difficult, both in its source code and while it's running. • Multiple goals—The program might have multiple goals that affect or even contradict each other and that aren't expressed or understood well • Complexity—The program has many interrelated items, such as processes, goals, variables, layers of connectivity, and visibility (scope), and these items contain a lot of variation. • Constant change—The characteristics of program items, such as variables, change frequently, and the results can be unpredictable.
scientific method. usually consists of these four steps:
1. Observe what's happening. 2. Propose a theory for why it's happening. 3. Test the theory. 4. Repeat Steps 1 to 3 until the theory is strong enough to stand on its own. In programming, you usually achieve this step by seeing the program work the way you designed it. (Realize, of course, that an even better theory might come around one day.)
steps of the scientific method, too:
1. Observe. 2. Create a theory. 3. Test the theory. 4. Repeat Steps 1 to 3.