The whole “tabs versus spaces” thing occupies sort of an iconic position in the programmer world. It represents the impossibility of winning arguments that are unwinnable by their very nature. These are so-called religious wars — our techie version of The Butter Battle Book but without the Cold War overtones.
But this and arguments like it rarely actually play out in team rooms and offices. At least, that’s always been my experience. I’ve only ever witnessed live “tabs versus spaces” arguments happen ironically.
Actual Arguments in the Programmer World
So here’s how it really goes down.
You take a job with a company, excited about the new office, the shorter commute, and the bump in pay. You’re riding high. But then the onboarding starts with the codebase.
Greg, the most senior member of the group, walks you through the codebase with a slightly smug affect of obvious pride. The codebase has everything you could ever want, according to Greg. To your mounting horror, this includes
- Inheritance hierarchies that are inscrutable, dark, and deep (with miles to go before you sleep).
- A generous portion of global state.
- Liberal use of reflection, often for no discernible reason.
- And, of course, an extensive, homegrown “framework.”
Greg finishes with a flourish: “So, anytime you need to add a new feature, you just open GodClass.cs, scroll down to line 12,423, add another method, and get started!”
You’re new, and you’re not entirely sure that this isn’t an elaborate prank, so you swallow and say, “Oh…great!” while already planning the lengthy suggestions document that you’re going to put together. And so the stage is set for what will become a never-ending string of arguments of variable politeness about the codebase.
Swap my hypothetical specifics for yours, but the formula is the same. Someone is asking you to exist in a codebase that you have philosophical reservations about, which will force you to write code you don’t like.
Winning Arguments: How Does One Define This?
I’ve now set the stage, but what does it actually mean to “win” an argument? This is pretty hard to define in a lot of contexts, such as people arguing on Facebook about politics or fighting at dinner. Is it the one who got the last word in? The one who was louder? The one who didn’t simply give up?
Luckily, in your quest to de-Greg your new company’s codebase, “winning” is easier to define (if admittedly something of a loaded term). You win if, by mutual consent, however grudging, the thing you think should happen winds up immortalized in the team’s source control. And the mutual consent part matters. Just slamming something into source control and being forced to revert later by an angry Greg doesn’t count.
You win when your argument carries the day and results in concrete action. So let’s look at some techniques for making that more likely.
Continue reading Your Guide to Winning Arguments About Code