Software dev bombshell: Programmers who use spaces earn MORE than those who use tabs
Well, of course – anyone using tabs should be paid zero
Poll Weighing in on a longstanding religious war among software developers, community site Stack Overflow has found that developers who use spaces to indent their code earn more than those who use tabs.
After crunching the data from its 2017 Developer Survey (released in March), Stack Overflow data scientist David Robinson on Thursday reported, "[T]he median developer who uses spaces had a salary of $59,140, while the median tabs developer had a salary of $43,750."
Robinson's analytical model suggests that using spaces correlates with an 8.6 per cent higher salary and is the equivalent of an extra 2.4 years of experience in terms of salary expectations.
Stack Overflow's 2017 Developer Survey includes data from more than 64,000 developers, 12,426 of whom provided data for tabs, spaces, and salary. The company has now made the survey available for download.
Robinson has published the code he used to conduct his analysis for those seeking to replicate his results, and has offered the standard statistical caveat: correlation is not causation.
This won't necessarily settle a debate that has raged for decades and was satirized last year in an episode of HBO's Silicon Valley. But it can be expected to further embolden those who favor spaces, a group already giddy from the findings of a Google researcher last year.
Last August, Google developer advocate Felipe Hoffa published data derived from 400,000 GitHub repositories that found spaces far more prevalent in programming code than tabs, with the exception of C and Go.
The Linux kernel coding style prefers tabs, too.
The debate about tabs and spaces involves concerns about consistency, readability, productivity, and storage space.
A tab can represent a different number of columns, depending upon the computing environment being used. A space always represents a single column. So code indented with tabs may appear differently on different systems.
At the same time, tabs take fewer keystrokes and take up less disk space, at least when code isn't being minified.
Outside of fanatics who recognize only one approach as valid, the consensus seems to be that developers should use what works for them (and for their team) and stick with it. There's no right answer – though there's apparently a more remunerative one. ®