Broken Windows Theory Works
The “broken windows theory” suggests that visible signs of disorder and neglect in an environment encourage further disorder and neglect. This concept can be applied to software development, particularly in the context of code quality and technical debt.
- Understanding the Theory: The theory posits that if a broken window in a building is left unrepaired, it signals to others that no one cares about the property, leading to more vandalism and neglect. In software development, “broken windows” can be seen as messy, poorly maintained code.
- Impact on Code Quality: a messy codebase can lead to a negative feedback loop.
- Developer Mindset: developers may become demotivated when they see that the codebase is not well cared for, leading to a decline in their own coding standards.
When developers encounter messy, poorly written, or “ugly” code, it can lead to a sense of resignation or acceptance that such code is the norm. This mindset can result in further deterioration of the codebase, as developers may feel less motivated to maintain desired quality bar.