Exclusion and Certainty

While investigating, test each component separately so that you can be absolutely certain that each one works by itself. You will gradually build up confidence about which parts of a project are doing their job and which ones are dubious. The best way to do this is using the built-in examples, as they are unlikely to have bugs.

Debugging is the term used to describe this process as applied to software. The legend says it was used for the first time by Grace Hopper back in the 1940s, when computers were mostly electromechanical, and one of them stopped working because actual insects got caught in the mechanisms.

Many of today’s bugs are not physical anymore: they’re virtual and invisible, at least in part. Therefore, they require a sometimes lengthy and boring process to be identified. You will have to trick the invisible bug into revealing itself.

Debugging is a little like detective work. You have a situation that you need to explain. To do this, you do some experiments and come up with results, and from these results you try to deduce what has caused your situation. You then run some more experiments to test whether your deductions were correct or not. It’s elementary, really.


Comments

Leave a Reply

Your email address will not be published. Required fields are marked *