Programmers who use spaces earn more than those who use tabs

Stack Overflow has released data from its 2018 Developer Survey, revealing there is a correlation between the style of indentation a developer uses and their salary.

The conclusion was drawn by analysing data from 28,657 survey respondents who provided an answer to tabs vs spaces, and who considered themselves a professional developer.

Within this group, 40.7% used tabs and 41.8% used spaces. 17.5% used both. Of this group, 12,426 provided their salary.

Regardless of how the variables were analysed, Stack Overflow found that developers who used spaces for indentation earned more than those who used tabs.

The graphs below show the data plotted against years of experience, language, type of developer, and when fitting a linear regression.

Stack Overflow’s linear regression took the following into account:

  • Tabs vs spaces.
  • Country.
  • Years of programming experience.
  • Developer type and language.
  • Level of formal education.
  • Whether they contribute to open source.
  • Whether they program as a hobby.
  • Company size.

By predicting the logarithm of the salary, it said it was able to estimate the percentage change each factor contributed to a salary.

  • The model estimated that using spaces instead of tabs leads to a 8.6% higher salary.
  • Put another way, using spaces instead of tabs was worth as much as an extra 2.4 years of experience.

Years of experience

Salary


Language and type of developer

Tab Space


Now read: Most popular programming languages in the world

Latest news

Partner Content

Show comments

Recommended

Share this article
Programmers who use spaces earn more than those who use tabs