Sitting on Chesterton’s Fence

In 1929, G.K. Chesterton wrote:

In the matter of reforming things, as distinct from deforming them, there is one plain and simple principle; a principle which will probably be called a paradox. There exists in such a case a certain institution or law ; let us say, for the sake of simplicity, a fence or gate erected across a road. The more modern type of reformer goes gaily up to it and says, “I don’t see the use of this; let us clear it away.” To which the more intelligent type of reformer will do well to answer: ‘If you don’t see the use of it, I certainly won’t let you clear it away. Go away and think. Then, when you can come back and tell me that you do see the use of it, I may allow you to destroy it.”

This paradox rests on the most elementary common sense. The gate or fence did not grow there. It was not set up by somnambulists who built it in their sleep. It is highly improbable that it was put there by escaped lunatics who were for some reason loose in the street. Some person had some reason for thinking it would be a good thing for somebody. And until we know what the reason was, we really cannot judge whether the reason was reasonable.

Chesterton wasn’t talking about building and maintaining software, but this paradox is important for an industry that deals with constant change nearly a century later.

Every time I start a new job, or need to work on a codebase or system that was there long before my tenure, I refresh myself on Chesterton’s Fence. We’ve all been in the position looking at a piece of code or infrastructure with fresh eyes and thinking “What the fuck was this person thinking when they wrote this?”. Our natural response to seeing something we don’t understand, or consider poorly architected, is to rewrite it.

But software is never built in a void. It is influenced by organisational politics, tight deadlines and sometimes even a dev having a bad day. Software is often a snapshot of an organisation at a point in time, and what made sense a couple of years ago may not make sense now.

Only by understanding the choices made, can you move forward and start making improvements.