Originally shared on LinkedIn.
Think of a broken window in a building. If left unrepaired, it can give the impression that no one cares about the building’s upkeep, leading to more damage and neglect over time. In criminology, it refers to the “Broken Windows Theory” that states that visible signs of crime, like a broken window, can lead to more crime and disorder in a community.
But did you know that this theory can also apply to software engineering? Small issues or “broken windows” in code can lead to bigger problems down the line. For example, if we see a small exception in the code that’s not being handled properly, we might be tempted to let other exceptions go unaddressed. And if we see code that’s not well-formatted or documented, we might think it’s okay to introduce our own sloppiness.
Just like a broken window in a building, leaving small issues unaddressed can lead to bigger problems over time. So, it’s better to promptly identify and fix issues to ensure better code quality and organization. Even if it’s not possible to address them right now, at least create a task to do it later, document the issue to make future contributors aware, and prioritize fixing it at the earliest convenient time.
#softwareengineering #softwaredevelopment #cleancode #brokenwindow