Tip 29Learn How to Fail

As programmers, we know that the sooner in the development process that we can discover software failures, the more robust the software is going to be. Unit testing helps us ferret out the strange bugs as early as we can. If we discover bizarre errors in our own code, if they happen early, we are happy. Though they signify a small failure on our part as developers—we made a programming error—finding them early and often is a good sign of what the health of the software will become.

We are taught to allow our programming errors to be loud and messy early on. You want to know about them when they happen so you can put the correct fixes or defensive measures in place. When you’re coding, you don’t go out of your way to ...

Get The Passionate Programmer 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.