The age-old debate between spaces and tabs for code indentation continues to spark lively discussions among software developers. While often dismissed as a matter of personal preference, an analysis of the Stack Overflow 2017 Developer Survey reveals a surprising correlation: developers who use spaces for indentation tend to earn more. Could switching to spaces actually help you Make More Money? Let’s delve into the data.
Spaces vs. Tabs: A Salary Gap Emerges
The Stack Overflow survey data, encompassing responses from over 28,000 professional developers, indicates a significant salary difference between those who use spaces and those who use tabs. The median salary for developers using spaces was $59,140, compared to $43,750 for tab users. This substantial difference suggests that the choice of indentation might have a greater impact on earning potential than previously thought.
Salary comparison between developers using spaces and tabs
Global Trends and Consistent Findings
To address potential confounding factors like geographical location, the analysis was further broken down by country. Interestingly, the salary gap persisted across various countries, including the US, UK, Germany, India, and Canada. While the magnitude of the difference varied, the trend remained consistent: space users generally earned more.
Salary comparison by country for developers using spaces and tabs
Further investigation explored whether the type of developer or programming languages used influenced the results. The salary gap persisted across different developer specializations (e.g., web developers, mobile developers) and programming languages. This suggests the trend transcends specific technologies or roles.
Salary comparison by developer type for users of spaces and tabs
Quantifying the Impact: Regression Analysis
A linear regression model was employed to isolate the impact of tabs versus spaces on salary while controlling for factors like country, experience, developer type, education, open-source contributions, hobbyist programming, and company size. The results indicated that using spaces was associated with an 8.6% higher salary, equivalent to the salary boost of approximately 2.4 years of additional experience.
Correlation between salary and usage of spaces vs. tabs
Correlation vs. Causation: Understanding the Results
While this analysis reveals a strong correlation between space usage and higher salaries, it’s crucial to remember that correlation doesn’t equal causation. Unmeasured confounding factors could contribute to the observed relationship. However, the robustness of the findings across various subgroups warrants further investigation.
Conclusion: Exploring the Spaces to Make More Money
The data suggests a compelling link between using spaces for indentation and higher developer salaries. While the underlying reasons remain unclear, the consistent trend across various demographics and specializations is noteworthy. While we can’t definitively say switching to spaces will guarantee a raise, exploring the raw data and considering this surprising correlation could be a valuable step in your journey to make more money as a developer. You can find the raw data and code used in this analysis on the Stack Overflow website and GitHub.