The Broken Window Theory

Pranav Tiwari
2 min readApr 20, 2019

--

Day 110 / 365

The broken window theory was proposed by James Q Wilson in 1982. The theory was an attempt to bring down the crime rates in New York. In a nutshell it says that if we take care of the smaller crimes and try to maintain order in the little things, the bigger crimes would come down on their own.

The window analogy

Consider a back alley, which is perfectly clean and well-lit to begin with. Now suppose you broke one of the windows in the alley. Pretty soon you’ll find that someone broke a few more windows. You might see some graffiti and littering as well. Someone might break the nearby street light as well, and it’s now a shabby dark alley. People start to litter there, and piles of garbage start to accumulate. Normal people would try to stay away from it, but it becomes a meeting point for delinquents and drug dealers.

All of this started with one broken window.

And this theory is not limited to crime, it can be applied to many other fields as well.

Applications in Software

This is something I have personally had experience with. I first read about this theory in the book “The Pragmatic Programmer”. The core idea is the same. If you make small efforts to keep your code clean, other people in your team will make sure they keep it clean as well. But if you are lazy with the naming of a few variables, or a few bad comments, other people will take it as a sign that the code’s not that important, and will be careless when adding to it.

Pretty soon, your codebase will be a pile of garbage as well.

This post is part of my 365 Day Project for 2019. Read about it here

Yesterday’s blog — The Boston Tea Party

--

--

Pranav Tiwari
Pranav Tiwari

Written by Pranav Tiwari

I write about life, happiness, work, mental health, and anything else that’s bothering me

No responses yet