‘Silicon Valley’ Fact Check: Richard Is Wrong About Tabs Versus Spaces, It Turns Out

Richard’s preference for tabs could be costing him money, new survey shows

Silicon Valley Season 4Silicon Valley Season 4

For decades, the tabs versus spaces debate has been a heated discussion among coders. The issue is so widespread it crossed over to an episode of “Silicon Valley” last year, with Richard (Thomas Middleditch) torpedoing a romantic relationship over the spaces-tabs divide.

To refresh your memory, Richard was firmly in favor of tabs, while Winnie, his flame from Facebook, used spaces. As they’re coding together, Richard can’t stand hearing Winnie hit the space bar and has a mini-breakdown — and in the process, completely blows her invitation to come over the next night.

But as it turns out, Richard’s self-described “anal” preference for tabs was not only a poor romantic decision, but also a bad financial choice.

New data from Stack Overflow’s 2017 Developer Survey polled more than 28,000 professional coders, with about 12,500 sharing their salaries.

The verdict was a resounding win for spaces. Developers that primarily use spaces had a median salary of $59,140 — easily eclipsing the $43,750 median salary for coders using tabs. (See Stack Overflow’s chart below.)


Spaces are slightly more popular as well. Altogether, 40.7 percent of respondents used tabs, while 41.8 percent used spaces (with 17.5 percent using both).

Computer programming phenom Jamie Zawinski explained the aesthetic foundation for the spaces-tabs divide in a Y2K blog, noting code requires whitespace and large indents to make it easier to read.

In general, tabs take fewer key presses and use less computer storage, but are more imprecise. Spaces, on the other hand, offer more clarity for coders, but practice takes up more space.

Both have their pros-and-cons, and the reason for the salary gap could be circumstantial, as data scientist David Robertson points out in his recap of the survey. Still, a $15,000 chasm is nothing to sneeze at.

Check out the clip from last season’s episode of “Silicon Valley” below: