DEV Community

21
21

Posted on

The Broken Window Effect

Photo by Tara Evans on Unsplash
The effect is described in the book The Pragmatic Programmer by Andrew Hunt and David Thomas, where they introduce us that only one broken window in a well-designed building can start a wave of deterioration and a bad feeling of indifference towards the construction if not repaired soon.

"One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment" - The Pragmatic Programmer

But how does it translate to software development world?

The meaning of a broken window could be something like bad designs, wrong decisions, useless code or even badly written code that you might find while maintaining a project.

The moral is when a developer faces this kind of code frequently, with broken windows, they are inclined to unconsciously think that no one cares about it, that no one can fix the problem and that is a condemned to fail project.

These feelings of hopelessness can spread to the entire team, leading to people always overlooking or postponing bugs because it seems that everyone has already "gave up".

It is a self-fulfilled prophecy.

Poor code attracts poor code.

In the real world, though, no software is bug-free, and we need to deal with them every day.

So deal with it, don't leave broken windows unsolved it's not only important for the project, but it does affect your peers morale, everyone wants to work on a project where we can see that who developed cared about what was built, cared about the next developer who will maintain it.

Good code attracts good code.

Even if your schedule doesn't allow you to tackle the problem right now, it shouldn't be neglected. Be accountable for it, document it so you can handle it as soon as possible, or delegate to an available peer and check afterward.

Review

  • Don't leave bugs/poor code unsolved.
  • Show that you're aware of the problem, preventing the spread of hopelessness within the team.
  • If there's no time to solve it right now, at least write it down, so you can handle it as soon as possible.

This is the start of a series where I talk about some interesting topics of The Pragmatic Programmer book. I hope that ignites a spark into you to read from the original source (Topic 3).

Top comments (0)