UPDATE #2: Last we talked, the great Tabs vs. Spaces debate was at an impasse once more, and to be frank, we grew despondent that such a meaningful question would ever be solved. But history loves a hopeless quest, so we set off to Open Source Summit Europe for our third attempt at solving this divisive argument. And after receiving transatlantic input on Tabs vs. Spaces, we are proud to say we have our answer. Spaces came out on top, 245 to 209, to seize the winner-take-all, best of-three series. Interestingly, this is the second Open Source Summit victory for the Spacers, after they narrowly won OSS NA before losing round two on Twitter. Thanks to all who participated, and we look forward to solving more seemingly unsolvable debates in the future!
UPDATE: It appears we were overconfident in our ability to conclusively predict the outcome of such a divisive argument. At the Open Source Summit, the Spacers emerged victorious in a contest that was nearly too close to call. But in the Twitterverse, Tabs clawed their way back to relevance by defeating Spaces by 10 whole percentage points—leaving us no closer to an answer than we were at the start of this ill-fated voyage.
But despite this minor setback, we’ll continue seeking an answer to Tabs vs. Spaces at upcoming open source events, so stay tuned because this debate is far from over! For now, check out what Twitter had to say, and then read on for a summation of the opposing sides.
Tabs vs. Spaces: How Did We Get Here?
“God help us,” Silicon Valley’s Richard Hendricks yells as he storms out of his now ex-girlfriend’s house. “There’s no way I’m going to be with someone who uses spaces over tabs.”
And with that fateful breakup line—the developer equivalent of “it’s you, not me”—HBO brought what was once an esoteric debate among software developers into the pop culture zeitgeist. The argument, also known as Software’s Great War, pits two dedicated factions—one who uses tabs while coding and another who uses spaces—against each other but also simultaneously allied against a third faction who derides the entire feud as both childish and inconsequential.
Who is right? Well, at VMware, we abide by a strict code of neutrality. But let’s be honest, we also love a good debate. So, we’re laying out the opposing arguments and putting the question to you, the open source community. It’s time to settle this thing once and for all: Tabs vs. Spaces?
The Case for Space
The first bullet point for the Space Force is easy: cold, hard cash. A 2017 Stack Overflow survey found that those who use spaces make nearly $16,000 more than developers with the same level of experience who happen to use tabs. A follow-up estimated that Space Cadets receive a salary difference equivalent to an extra 2.4 years of work or, put another way, an 8.6% higher salary than their tab-obsessed peers.
But wait, tabbies scream, correlation does imply not causation. There must be something—anything, please!—to explain this astonishing difference. Well, you’re right: correlation is not causation. But you’re also wrong: no other obvious explanation exists. The Stack Overflow analysis found the space salary bump held true even when controlling for factors such as location, type of developer, level of education and company size.
But we know not everyone cares about money. For those less financially motivated among us, software development is an art, not just a vocation. And for spacer purists, the use of spaces offers more precision and greater consistency of code across varying environmental configurations; after all, a space is always one space, but a tab may look different on different computers. As Richard’s ex Winnie puts it, “If you really care about precision, wouldn’t you use spaces?”
The Case for Tabs
For every argument exists a counter, but it’s not often that the counter is the exact same argument in the first place. As Richard eloquently puts it, “I’m anal and I prefer precision.” And you can’t say the brilliant, if imaginary, Pied Piper founder doesn’t have a point. Imagine a world with no accidental extra spaces, no human error—just one beautiful tab each time.
That wonderful precision equates to optimally-sized source files, as tabs use less memory than spaces. And, as all tab-enthusiasts are eager to point out, with great precision and optimization comes great speed. Rather than expend the effort of pushing the space bar four times, hit the tab key once to achieve the same effect. As the saying goes, work smarter, not harder. And really, who wants to hit a space bar over and over? Have you heard of carpal tunnel syndrome?
In addition to their practical arguments, tabbers also argue in ethical terms, claiming they’re more conscientious of fellow developers than the aforementioned spacers. They understand not all people think or code the same, and tabs allow for these personal differences to exist among developers. Rather than having to change the code itself—an impractical and thus selfish strategy—tab developers show remarkable conscientiousness in enabling their peers to easily change document indentation size to arrive at their desired format.
When reading little lines of code each day, display matters. Those on Team Tab fight for our right to choose the viewing experience we desire.
The Case for Not Caring
Ah, the non-combatants among us. In their neutrality, this group—fairly or not—receives arrows from both sides of the tabs vs. spaces squabble but is genuinely confused when verbal volleys come their way. They point out with some exasperation that the entire debate is silly and anachronistic. After all, modern IDEs can easily convert all tabs to spaces upon saving, and compiled or compressed code is already optimally sized anyways.
In their minds, quality code is what matters, and how you write that code is as frivolous to your work as a favorite color or pair of shoes. “Why can’t we just all get along?” they ask before putting the whole silly mess behind them and moving on with their day.
Do they have a point? Perhaps. But the objective of this blog is not to be practical but to settle a debate as old as the Harwell Dekatron. Tabs vs. Spaces: which side are you on?