Skip to main content

Chekhov's method 🔫

Young story writers are taught about about Chekhov’s gun, a narrative principle described by Russian playwright Anton Chekhov.

Remove everything that has no relevance to the story. If you say in the first chapter that there is a rifle hanging on the wall, in the second or third chapter it absolutely must go off. If it’s not going to be fired, it shouldn’t be hanging there.

The idea is to not make promises to the audience that you do not intend to keep.1

I think developers should learn about Chekhov’s gun too. It could read something like:

Remove everything that has no relevance to the design. If you say in the API that there is a method available, it absolutely must be used or necessary. If it’s not going to be called, it shouldn’t be there.

The essence of good software design is clear communication with other humans. As Martin Fowler writes in his book Refactoring2: “Any fool can write code that a computer can understand. Good programmers write code that humans can understand.”

A gun in an API.

To make a software design that is easy to understand, the pieces should form a coherent story, and each part should be there for a reason.3 They shouldn’t be added “just because” or as speculatively future proofing.

Just like a gun introduced in chapter one will linger in your mind if never fired, an unused software component creates unnecessary confusion with the reader.

Now go take down that unused gun from the wall!


  1. Chekhov’s gun can also be a reminder to strive for when nothing can be removed↩︎

  2. Martin Fowler’s Refactoring is one of the books that shaped me↩︎

  3. Another helpful heuristic to make something easy to understand is to ensure its parts are at the same level of abstraction↩︎