Chapter 9. FINDING FAULT

Debugging: What to Do When Things Go Wrong

I have not failed. I’ve just found 10,000 ways that won’t work.

Thomas Edison

Nobody’s perfect. Well, except for me. All day, I have to sit down and work through tedious problems in other people’s code. The test department discovers that our software falls over when it does such-and-such. So I trawl through the system to find what Programmer Fred did wrong three years ago, patch it up, and send it back for them to break again.

Of course, you wouldn’t find me making those sorts of elementary mistakes—not a chance. My code is watertight. Faultless. Low fat and cholesterol free. I never write a line without meticulous planning, I won’t complete a code statement without considering all ...

Get Code Craft now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.