There have been several polarizing topics throughout history, such as religion & political affiliation. And for software developers there's one more biggie ... tabs -vs- spaces! Which group is right? Perhaps the opinion of the better programmers should have more weight(?) Is there a metric we can use to determine whether one group of programmers is better than the other? Assuming better programmers are paid more, perhaps we can make the comparison based on salary ...
Stackoverflow recently published the results of their annual Developer Survey, and they wrote an interesting article that seems to indicate that coders who use spaces make more money than those who use tabs. Their main graph seemed simple and straightforward, and I kinda liked it at first glance.
But upon closer examination, I started to question their graph. For example, the title indicates that it was based on 12,426 of the survey respondents - and while it is true that 12,426 (of the 51,392 total) respondents claimed to be professional developers, and indicated whether they used tabs or spaces, and provided an annual salary number ... I'm wondering how the graph handled the 53 who did not specify the number of years they coded for a living? (Are they somehow included in the graph, or does the graph not really represent 12,426 respondents?) And being an international survey, many of the respondents are not paid in US dollars - did they convert all the other currencies to US dollars (what exchange rates did they use)? Is it statistically valid to combine programmers from countries with vastly different pay scales (for example, India and China probably pay their programmers a lot less than in the US and Europe) . And the 859 who left the 'currency' field blank - can they just assume those programmers were specifying their salary in US dollars?
So I decided to create my own version of the graph, and hopefully not leave so many questions hanging in the air. In my version, I only plotted the salaries where the programmer's currency was US dollars. Also, the data provided enough granularity that I could also split out a 20+ years category. I labeled each line (rather than using a color legend), and simplified the graph a bit.
Their article also had graphs by country. ... Or is it by currency? Or is it by a combination of country & currency (you could live in a certain country, and get paid in a different currency, right?) I think these individual bar charts are better than the article's combined line chart, but there was still some room for improvement (see if you can spot things you would like to change, before you scroll down to my version!)
And of course, this wouldn't be much of a Graph Guy blog, if I didn't try to improve their graphs, eh?!?... Here is a list of some of my changes:
- Why not put 'Both' between the Spaces & Tabs bars, rather than on the end?
- Their bars go higher than the last axis tick mark, so you can't really tell how high the values go (especially for the India and Other graphs).
- Their title says the graphs represent 12,246 respondents ... but I would like to know how many respondents were represented in each individual graph.
- Bar charts are simple ... but perhaps too simple in this case. I'd really like to see how the individual data points were spread out.
I decided to use a box plot rather than a bar chart. I created a separate one for each currency available in the data. Below are a few of my plots - you can see the plots for each currency by scrolling down through the following page.
Based on the results of this particular survey, it appears that the professional developers who use spaces are indeed paid more than those who use tabs. Any tab-sters out there thinking about switching now?
And you might be asking yourself "What does The Graph Guy use?!?" ... spaces, of course! :)