Bug Hunting
How do you find bugs? If there was a simple three-step process, we’d all have learned it, and our programs would be perfect by now. As it is, there isn’t, and they aren’t. Let’s try to distill the available bug-hunting wisdom.
Compile-Time Errors
We’ll look at these first, since they are comparatively easy to deal with. When your compiler comes across something unpleasant, it will not normally just complain once, but will take the opportunity to sound off about life in general, spitting out a barrage of subsequent error messages. It’s been told to do this; upon encountering any error, the compiler tries to pick itself back up and carry on parsing away. It rarely manages very well, but with code like yours, who could blame it?
The upshot ...
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.