Bugs, Errors, Mistakes, and Code Rot

It has been said that if cities were built like software is built, the first woodpecker to come along would level civilization. The fact is that all too many commercial programs, from some of the biggest vendors in the business, have bugs. Serious bugs.

Although this is true, that does not make it okay; and writing robust, bug-free programs should be the number-one priority of anyone serious about programming. I would argue that the single biggest problem in the software industry is buggy, unstable code. Certainly the biggest expense in many major programming efforts is testing, finding, and fixing bugs.

There are a number of discrete kinds of bugs that can trouble a program. The first is poor logic: The program ...

Get Sams Teach Yourself C++ in 24 Hours, Third Edition 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.