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 salary of $59,140, while the median tabs developer had a salary of $43,750. Of them, 12,426 also provided their salary.Is there any tool to do for JSP files what checkstyle does for Java filesThe ideal would be to include JSP checking on checkstyle, but as far as I can see, this isn't possible.I would like forAnalyzing the data leads us to an interesting conclusion. Within this group, 40.7% use tabs and 41.8% use spaces (with 17.5% using both).With DevOps developers more likely to use spaces and mobile developers more likely to use tabs), often because they use different editors and languages. For example, it’s conceivable that developers in low GDP-per-capita countries could be more likely to use tabs, and therefore such developers tend to have lower salaries on average.We could examine this by considering whether the effect occurs within each country, for several of the countries that had the most survey respondents.The effect is smaller in Europe and especially large in India, but 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 different indentation (e.g. When I first discovered this effect, I assumed that it was confounded by a factor such as country or programming language. 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 course it’s not conclusive by itself.Now that the raw data is available, I encourage other statisticians to check other confounders themselves.If we control for all of the factors that we suspect could affect salary, how much effect does the choice of tabs/spaces have?To answer this, I fit a linear regression, predicting salary based on the following factors. Note that respondents could select multiple languages, so each of these groups are overlapping to some degree.I did several other visual examinations of possible confounding factors (such as level of education or company size), and found basically the same results: spaces beat tabs within every group. (This gave a similar result even when filtering for developers only in a specific country, or for ones with a specific range of experience).Put another way, using spaces instead of tabs is associated with as high a salary difference as an extra 2.4 years of experience. (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). Bachelor’s, master’s, doctorate)The model estimated that using spaces instead of tabs is associated with an 8.6% higher salary (confidence interval (6%, 10.4%), p-value < 10^-10). Level of formal education (e.g.
![]() ![]() Command For Correct Indentation For Checkstyle In Eclipse Code Behind ThisIn any case we’d be interested in hearing hypotheses about this relationship.Though for the sake of my own salary, I’m sticking with spaces for now.Not really, because “no true Scotsman” assumes that the arguments are subjective. You can find the code behind this blog post here if you’d like to reproduce the analysis. If you’re a data scientist, statistician, or analyst, I encourage you to download the raw survey data and examine it for yourself. As an exercise I tried controlling for many other confounding factors within the survey data beyond those mentioned here, but it was difficult to make the effect shrink and basically impossible to make it disappear.Correlation is not causation, and we can never be sure that we’ve controlled for all the confounding factors present in a dataset, or indeed that the confounders were measured in the survey at all. And it is impressively robust even when controlling for many confounding factors. Upon noticing this, people who indent by using the tab key eventually starts configuring their editors to insert spaces. This is not subjective, it is a simple fact, since different editors have different tab settings. Upon doing so, anyone with eyes will notice that code indented with tabs turns into a horrible mess. This is not subjective – of course every programmer will eventually end up using different editors. Everyone who is experienced have exported code and viewed it in a different editor. ![]() Worse, the code can end up being inconsistent, unnoticed, and then it can garble up completely for other people. And some people do that, and THEN we have the problem because suddenly we have non-standard tabs so the file is going to look different to everyone else than the author and people with editors configured like the author. The benefit is it enables people to configure their favourite tab width. It’s One Less Thing to worry about.I’m sorry if my opening comment offended you, I was trying to be joking, but I apologize if it came across condescending.Now, to your question: The thing is, if everyone uses only spaces or only spaces and 8-space tabs, it mostly works everywhere because all editors and viewers understand spaces (well, HTML interpreters ignore them unless in pre tag, but…) and many viewers also handle 8-space tabs okayish.Now someone figured out that you can use tabs as a sort of system, just like when tabulating data. Ps2 emulator mac redditSpaces:When you split the group into younger and older programmers (not by age but by experience), into the ones with up to 10 years experience (Group A: 37905) and the ones with more than 10 years (Group B: 25308) you can see the following:In Group B (more than 10 years experience)As Programmers with up to ten years are not only novice programmers, but the ones with a more modern education, this leads me to the conclusion, that it is the result of a modern programming style which favors tabs. □ I don’t think my previous comment was an argument, really, I was just explaining what I’ve come to see.I took a quick look at the data (30 minutes) and found the following insights regarding Tabs vs. My life was simpler when I decided jwz was right and I made my editor not insert 8-space tabs, navigation became much more intuitive.Now this is an argument, mostly against inserting non-standard spacing in text that other people may have to look at. And there are still downsides. And as long as you can’t, you can’t have custom tab widths without causing trouble for other people, and if you’re going to use 8-space tabs, there really isn’t any benefit at all if you’re using an editor more advanced than notepad.
0 Comments
Leave a Reply. |
AuthorDaniela ArchivesCategories |