Today, I'm going to step aside from the usual technical jargon and talk about a concept that's relevant in the world of software development and our daily lives.
It's called the theory of broken windows.
What is the theory of broken windows?
The theory of broken windows is a criminological theory that suggests that visible signs of crime, anti-social behaviour, and civil disorder create an urban environment that encourages further crime and disorder, including serious crimes.
The theory was introduced in 1982 by social scientists James Q. Wilson and George L. Kelling. They argued that maintaining and monitoring urban environments to prevent small crimes such as vandalism, public drinking, and fare evasion helps create an atmosphere of order and lawfulness, thereby preventing more serious crimes.
Their theory states that if a window in a building is broken and left unrepaired, people walking by will conclude that no one cares and is in charge. As a result, they will be more likely to break windows and commit other acts of vandalism.
In everyday life
Scholars have applied the broken windows theory to various aspects of life beyond criminology. For example, they have used it to explain how small problems can escalate into larger ones if addressed.
A common example is if there is litter on the street, people are more likely to litter. If you leave graffiti on a wall, more graffiti will follow. If you walk around your neighbourhood, you will notice how this principle plays out in real life.
It also applies to individual behaviour. Think about a messy room. If you leave a piece of clothing on the floor, you are likely to leave more clothes on the floor, and soon enough, your room will be a mess. The same goes for an unkempt garden, a cluttered desk, or a neglected car.
In software development
In software development, you can apply the theory of broken windows can be to code quality. If a codebase has a lot of inconsistencies, bad practices, and outdated code, developers are more likely to continue writing poor code. They might not feel the need to refactor or improve the codebase because it already looks messy and disorganised.
On the other hand, if a codebase is well-maintained, clean, and follows best practices, developers are more likely to adhere to those standards. They will be more inclined to write clean code, refactor when necessary, and maintain the overall quality of the codebase. It creates a positive feedback loop that reinforces good practices.
I've seen this theory play out in various software projects throughout my career. Teams prioritising code quality, consistency, and maintainability tend to produce better software in the long run. They are more productive, have fewer bugs, and can effectively respond to changes. On the other hand, teams that neglect these aspects often struggle with technical debt, bugs, and slow development cycles. Since they are used to this laxity, it becomes challenging to convince them to adhere to standard best-practices.
What does it tell us?
The theory of broken windows is a powerful concept that highlights the importance of maintaining order and addressing small problems before they escalate into larger ones. Whether in crime prevention, everyday life, or software development, the principle remains the same: small things matter. By paying attention to the details and keeping things in order, we can create an environment that fosters positive outcomes and discourages negative ones.
So the next time you see a broken window, whether a literal or metaphorical one, remember the importance of fixing it before more windows get broken. It saves you a lot of trouble in the long run.