Snipping the highest little bit of Nicholas C. Zakas’s High of the Month publication (go enroll!), with permission.
One in all my favourite issues on the earth is painters tape (additionally referred to as masking tape). It looks like one thing foolish: some tape you placed on a wall once you’re portray to keep away from getting paint on the wall. The tape doesn’t have a powerful adhesive, so it may be pulled again off the wall with out damaging it. What I like about painters tape is the philosophy behind it: portray is messy, and moderately than attempting to keep away from making a multitude, painters tape permits you to make a multitude initially after which clear it up simply. Even the most effective, most gifted painter goes to splatter some paint right here and there, get distracted, or in any other case find yourself with paint going the place it shouldn’t. It’s quite a bit sooner, simpler, and fewer irritating to make use of painters tape to cowl up areas the place paint is more likely to go after which take away the tape to create a pleasant, clear, completed space. What does this need to do with software program engineering?
Painters tape is all a few idea referred to as fault tolerance. As an alternative of anticipating every little thing to go nicely, you as an alternative anticipate that there might be errors. While you anticipate there to be errors, you make choices to not keep away from all errors however moderately to simply get well when a mistake happens. Obtained paint the place it shouldn’t be? It doesn’t matter if that spot was coated by painters tape. Forgot to placed on the painters tape? Now that mistake is an even bigger deal. As software program engineers, we are able to assume the identical method with the code we write.
Making your code fault tolerant is about asking your self the query: how will this fail? Not if it is going to fail, however assuming that it’ll fail, and during which methods will it fail?