The Broken Windows Theory

Image created with Midjourney. Image prompt:
Image created with Midjourney. Image prompt: illustration of a 2D minimalistic cityscape where a single broken window in one building gradually leads to more broken windows and decay in the surrounding buildings. Superimpose a transparent layer of code that starts clean but becomes tangled and messy, mirroring the decay in the city, representing poor quality code and technical debt in software development

The Broken Windows Theory is a criminological concept that suggests visible signs of crime or neglect can lead to further and more serious crimes or a further deterioration of the environment. While this theory was originally formulated in the context of urban crime, it has found resonance in the field of software development1.

The Broken Windows Theory in Software Development

In the world of software development, the Broken Windows Theory implies that poor quality code or technical debt can lead to a perception that efforts to improve quality may be ignored or undervalued. This can result in further production of poor quality code, leading to a cascade effect and a significant decrease in quality over time1.

Let's explore this theory through three examples:

  1. Ignoring Bugs: If a software team ignores minor bugs, it can set a precedent that it's acceptable to have defects in the code. This may lead to developers becoming less conscientious about avoiding bugs, resulting in an increase in the number and severity of bugs over time. Just like a neighborhood with a broken window might experience more crime, a codebase with visible bugs may experience a decline in overall code quality.
  2. Overlooking Technical Debt: Technical debt refers to the future cost of taking shortcuts or making quick fixes in the present. If a team routinely incurs technical debt without making efforts to pay it off, it can signal that maintaining code quality isn't a priority. This can lead to more instances of technical debt, ultimately resulting in a codebase that's difficult to maintain and extend.
  3. Poor Documentation: Poorly documented code can have a similar effect. If a team sees that their code isn't being properly documented, they may feel that it's not necessary to invest time in documentation. This can lead to further deterioration of the codebase as it becomes harder for developers to understand and modify the code.

Connecting the Broken Windows Theory to Digital Product Creation

The Broken Windows Theory has a profound impact on the creation of digital products. It highlights the importance of maintaining high standards for code quality and addressing issues promptly before they lead to wider problems.

Mitigating the effects of the Broken Windows Theory in software development involves cultivating a strong culture of code quality within the team. This might include practices like code reviews, where developers check each other's code for quality and adherence to standards; regular refactoring, where code is revised and improved; and setting aside dedicated time for resolving technical debt.

Understanding the Broken Windows Theory can also guide product managers and stakeholders in their decision-making. It underscores the idea that prioritizing short-term gains at the expense of code quality can have long-term consequences for the health and maintainability of the software product.

In conclusion, the Broken Windows Theory offers a compelling lens through which to view and manage software development. By understanding and addressing the "broken windows" in our codebases, we can create digital products that are not only functional and reliable but also sustainable and adaptable in the face of change.

See also