Programmers, Tabs Or Spaces? Your Decision Could Affect Your Salary

Image: Stack Overflow

HBO's Silicon Valley made fun of the old coding argument between tabs or spaces for indentation. But it turns out it's no joke, at least when it comes to making money as a developer. Stack Overflow's recent programmer survey revealed an interesting tidbit: devs who uses spaces make around 8.6 per cent more than their tab-tapping counterparts.

As part of its 2017 survey, Stack Overflow asked the question: do you use tabs or spaces for indentation? 28,657 answered and of those, 41.8 per cent landed in the spaces camp, while 40.7 per cent ended up as tab users. The remaining 17.5 per cent dabbled with both.

Stack Overflow then matched this data with the stated salary of the respondent and well, here are the results:

The model estimated that using spaces instead of tabs leads to a 8.6% higher salary (confidence interval (6%, 10.4%), p-value < 10^-10). (By predicting the logarithm of the salary, we were able to estimate the % change each factor contributed to a salary rather than the dollar amount). Put another way, using spaces instead of tabs was worth as much as an extra 2.4 years of experience.

So, how much can we really draw from this conclusion? Stack Overflow's David Robinson, who did the analysis, correctly points out that "correlation is not causation".

However, despite Robinson's best efforts, he wasn't able to explain the difference, even after "controlling ... many other confounding factors within the survey data": was difficult to make the effect shrink and basically impossible to make it disappear.

Somehow, I don't think switching to spaces right now is going to bump your salary up by close to 10 per cent, but it might be wise to pay your tab-despising comrades a little more respect. They might just be making more than you.

Developers Who Use Spaces Make More Money Than Those Who Use Tabs [Stack Overflow]


Be the first to comment on this story!

Trending Stories Right Now