I Have a Special Set of Skills I Will Find You and I Weed Kill You Code Review Meme
Practise you apply tabs or spaces for code indentation?
This is a scrap of a "holy war" among software developers; one that'due south been the subject of many debates and in-jokes. I use spaces, only I never thought it was particularly important. But today nosotros're releasing the raw data behind the Stack Overflow 2017 Developer Survey, and some analysis suggests this choice matters more than than I expected.
Spaces make more money than tabs
At that place were 28,657 survey respondents who provided an answer to tabs versus spaces and who considered themselves a professional developer (as opposed to a student or former programmer). Within this group, xl.vii% utilize tabs and 41.8% apply spaces (with 17.5% using both). Of them, 12,426 as well provided their salary.
Analyzing the data leads usa to an interesting conclusion. Coders who use spaces for indentation make more money than ones who use tabs, even if they have the same amount of experience:
Indeed, the median developer who uses spaces had a bacon of $59,140, while the median tabs developer had a salary of $43,750. (Note that all the results were converted into US dollars from each respondent'southward currency). Developers who responded "Both" were generally indistinguishable from ones who answered "Tabs": I'll leave them out of many of the remaining analyses.
This is an amusing result, but of class it'due south not conclusive by itself. When I beginning discovered this effect, I assumed that it was confounded by a factor such as country or programming language. For example, it's believable that developers in low Gdp-per-capita countries could be more likely to utilise tabs, and therefore such developers tend to accept lower salaries on average.
We could examine this by considering whether the upshot occurs within each land, for several of the countries that had the most survey respondents.
The effect is smaller in Europe and especially large in Bharat, merely it does appear within each country, suggesting this isn't the sole confounding factor.
As another hypothesis, we know that different types of developers often use unlike indentation (due east.chiliad. with DevOps developers more likely to use spaces and mobile developers more than probable to utilise tabs), often because they utilise different editors and languages. The Developer Survey asked both about what programming languages each respondent uses (Python, Javascript, etc) and what "blazon" of programmer they are (web developer, embedded developer, etc).
Did we see the same tabs/spaces gap inside each of these groups?
Yes, the consequence existed within every subgroup of developers. (This gave a like result fifty-fifty when filtering for developers only in a specific country, or for ones with a specific range of experience). Annotation that respondents could select multiple languages, then each of these groups are overlapping to some degree.
I did several other visual examinations of possible confounding factors (such equally level of educational activity or visitor size), and found basically the aforementioned results: spaces beat out tabs within every group. Now that the raw information is available, I encourage other statisticians to check other confounders themselves.
Estimating the result
If we control for all of the factors that nosotros suspect could bear upon salary, how much effect does the choice of tabs/spaces have?
To answer this, I fit a linear regression, predicting bacon based on the following factors.
- Tabs vs spaces
- Country
- Years of programming feel
- Developer type and language (for the 49 responses with at to the lowest degree 200 "aye" answers)
- Level of formal education (due east.g. bachelor's, master'southward, doctorate)
- Whether they contribute to open source
- Whether they program as a hobby
- Company size
The model estimated that using spaces instead of tabs is associated with an 8.six% higher salary (confidence interval (6%, ten.4%), p-value < 10^-10). (By predicting the logarithm of the salary, we were able to estimate the % modify each gene contributed to a salary rather than the dollar amount). Put some other style, using spaces instead of tabs is associated with as loftier a salary difference as an extra 2.4 years of experience.
Determination
So… this is certainly a surprising result, i that I didn't look to find when I started exploring the data. And it is impressively robust even when decision-making for many confounding factors. As an exercise I tried controlling for many other misreckoning factors within the survey information beyond those mentioned here, but it was difficult to brand the result shrink and basically impossible to brand it disappear.
Correlation is non causation, and we tin can never be sure that nosotros've controlled for all the confounding factors present in a dataset, or indeed that the confounders were measured in the survey at all. If you're a data scientist, statistician, or annotator, I encourage you lot to download the raw survey data and examine it for yourself. Yous can find the lawmaking behind this weblog postal service here if you lot'd like to reproduce the analysis. In whatsoever case we'd be interested in hearing hypotheses about this relationship.
Though for the sake of my own salary, I'chiliad sticking with spaces for now.
Source: https://stackoverflow.blog/2017/06/15/developers-use-spaces-make-money-use-tabs/
0 Response to "I Have a Special Set of Skills I Will Find You and I Weed Kill You Code Review Meme"
Post a Comment