Individual Mentality vs. Team Mentality: Style Guide Edition
Today, we're talking about the decisions that don't matter.
Let me start with a parable:
Many years ago, I was fairly senior in an organization with about a dozen developers. The varying ways that everyone formatted their code was becoming a problem for readability and code review. I approached one of my colleagues:
- Me: I think we should implement a coding style guide for the team.
- Colleague: Oooh, controversial. Ok, where would you start?
- Me: Well, we could start by standardizing indentation. I use two spaces.
- Colleague: I use four.
- Me: FOUR SPACES?? ARE YOU INSANE??? Forget it. This will never work.
This is an example of a decision where the specifics don't matter. What matters is that something is decided and enforced, but whether we're talking about coding styles or how you stock the coffee and tea drawer in the break room:
The specifics don't matter.
What matters is consistency. The human brain is pretty good at adapting to something it sees often. It's not good at constantly switching contexts.
Caffeine addicts (👋) rely on muscle memory when making their morning coffee (and mid-morning coffee, and after lunch coffee, and mid-afternoon coffee...). If components of the coffee ritual are moved, we get very cranky.
This is not a lesson specifically about style guides. It's about creating consistent procedures and prioritizing your mental capacity. When executing as a team, consistency is critical. You can't make continuous improvement to your processes if you don't know what they are. What you'll find is that so often it doesn't matter what gets decided, as long as something does.
What are some decisions you've spent too much time on?