Chapter 1Program for Production

When you program for fun, it’s easy to skimp on things such as handling edge cases, error reporting, and so forth. It’s a pain. But when you program for production—not to mention a paycheck—you can’t take the shortcuts.

Production-quality code seems like a straightforward goal, but our industry has had a heck of a time figuring out how to get it right. Windows 95, for example, had a bug that would hang the OS after 49.7 days of continuous operation—which wouldn’t be especially surprising except that this bug took four years to discover because other bugs would crash Windows 95 long before 49.7 days could pass.[1]

You can take one of two approaches to quality: build it in from the beginning, or ...

Get New Programmer's Survival Manual 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.