Go and read about the Broken Windows Theory. I’ll wait here, take your time.

Now, I believe there’s one main corollary to that theory:

People don’t do what society tells them is not acceptable.

For example, despite it is very easy to do, people don’t generally kill people. They don’t insult each other. People don’t drop litter on the ground.

Except when they do.

And when is that?

When they perceive that peers won’t consider their actions unacceptable, when social values are bent, relaxed, or absent. Or, most frequently, when they perceive that what they do won’t make any difference, for better or for worse, or that no one will notice.

This is true in software development as well. If your codebase is crap, people will keep pooping onto it. If your organization is messy, people will keep adding confusion just to get to the end of the day with the least effort. “Who cares? Certainly not me.”

Broken Windows

At some point, the local social reality that is your team (in the broader sense) will break down in either of two ways:

  1. Hard reset (throw away bad apples and start from scratch)
  2. Death by bleeding (of good people), which leads to 1.

Now, you probably saw it coming, but neither of them are resolutive unless there’s a fundamental change – after all, the good guys leave, the bad stay. Remember? Until social values change, until you fix your windows, people’s behavior remains the same.

But there’s more.

Inside a business of a non-trivial size, there are several groups, each doing its job and functioning with its own set of social values. You may call it company culture, but I believe it is more team culture, and it’s something that morphs and changes over time, as people come and go. It’s a stereotypical view that the dev group is sort of an enemy to all others. They are these presumptuous kids with their latest crush on the coolest programming framework. These hooligans always doing whatever they want no matter what you tell them and making projects late. Your projects, late because of them (us).

The problem is, they think the same about you and your group.

And, drum roll, this is because of social values. Their group is cohesive because their social values identify marketing, legal, sales, or whichever other group as their enemy. Camaraderie in time of peace (which is a remarkably positive side effect of living as a group in harsh environments).

The circle is now closed: you have just witnessed bad behavior promoted, or at least tolerated, by the means of common, shared, and agreed-upon social values. It’s the same reason why (some) teenagers vandalize public and private property: by showing they belong to the group, they agree to its social values (however wrong), and share, promote, and hand them down to the next member.

How to fix that?

We’re not talking about actual hooligans here, so here are some suggestions based entirely on anecdotal evidence:

  1. Fix broken windows. Rather obvious at this point. The place must be clean and tidy, and it will be less likely to get dirty and messy
  2. Reward good behavior by sharing it with others (positive reinforcement)
  3. Do not punish bad behavior (people are not animals). Explain, and keep in mind that bad behavior might not be perceived as such.

What if that is out of your reach?

You might not be in a position to do any of the above. You might just be the new guy, or you might not have the authority. In that case:

  1. Find those who share your values, and form a new gang that acts upon those values. Give it time, as it will be an uphill battle, but those on the borderline will follow, the others will either leave or be fired (hopefully).

If you have the authority and power to promote change but you can’t, there are probably four scenarios to consider:

  1. You don’t know how (perfectly legit, but that’s your first problem then)
  2. You know how, but there are just too many morons around (or maybe not many, only a few but very influential)
  3. You don’t know how, and there are just too many morons around
  4. You don’t want to change, because you are part of the problem.

Think about it. I know when I am on this scale (but I’m not telling). Where are you?