Chapter 17. The Fundamental Philosophy of Debugging
Sometimes people have a very hard time debugging. Mostly, these are people who believe that in order to debug a system, you have to think about it instead of looking at it.
Let me give you an example of what I mean. Let's say you have a web server that is silently failing to serve pages to users 5% of the time. What is your reaction to this question: "Why?"
Do you immediately try to come up with some answer? Do you start guessing? If so, you are doing the wrong thing. The right answer to that question is: "I don't know." And this gives us the first step to successful debugging:
When you start debugging, realize that you do not already know the answer.
It can be tempting to think that you already know the answer. Sometimes you can guess and you're right. It doesn't happen very often, but it happens often enough to trick people into thinking that guessing the answer is a good method of debugging...