Slashdot Mirror


Developers Who Use Spaces Make More Money Than Those Who Use Tabs (stackoverflow.blog)

An anonymous reader writes: Do you use tabs or spaces for code indentation? This is a bit of a "holy war" among software developers; one that's been the subject of many debates and in-jokes. I use spaces, but I never thought it was particularly important. But today we're releasing the raw data behind the Stack Overflow 2017 Developer Survey, and some analysis suggests this choice matters more than I expected. There 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, 40.7% use tabs and 41.8% use spaces (with 17.5% using both). Of them, 12,426 also provided their salary. Analyzing the data leads us 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 salary of $59,140, while the median tabs developer had a salary of $43,750.

7 of 515 comments (clear)

  1. Eclipse serializes with spaces or tabs by prefec2 · · Score: 4, Informative

    Modern IDEs format code automatically and use spaces or tabs based on your settings. In addition, the auto formatter automatically adds whitespace when you go into the next line. It is most likely not a real dependency between whitespace and salaries, but it has more to do with which environment they use.

  2. Alternate interpretation of the data by Comboman · · Score: 5, Informative

    Programmers who use spaces are more likely to lie about how much money they make.

    --
    Support Right To Repair Legislation.
  3. Re:Survey says by drnb · · Score: 3, Informative

    If the median salary was under $50k, then I'm not sure who they were surveying, but it wasn't professional developers.

    Those are global averages. Keep reading and you'll see the region specific charts and numbers. I think the averages for the US were around $100K and $80K.

  4. Re:Did they take language into account? by Anonymous Coward · · Score: 5, Informative

    If only they had a graph that displayed how they checked for your easy explanation and controlled for it.

    Oh wait, they did.

    Have you ever heard of clicking on a link?

  5. OB Scene from "Silicon Valley" by Leomania · · Score: 3, Informative
    --
    You don't use science to show that you're right, you use science to become right.
  6. Re:Possible Explanation... by ShanghaiBill · · Score: 4, Informative

    Using spaces to indent is really kind of an OCD thing to do. There's the time and the counting and then redoing when you change something.

    Uhh .. no. Whether you use tabs or spaces is an editor config setting. At the human UI level it is barely even noticeable.

    I use spaces at work so the code looks the same for everyone. For Python, I always use spaces since whitespace is part of the syntax. For other languages, I am not even sure. I would need to look at my .emacs file.

  7. Re:The real question... by sl3xd · · Score: 3, Informative

    It is two when using a typewriter. :-)

    I learned to type with a typewriter, and back then most printers had a single fixed-width font, so it was still considered proper form to double-space after a period.

    It wasn't until a couple years ago I learned that it wasn't considered proper form to double-space; decades of muscle memory are hard to unlearn.

    --
    -- Sometimes you have to turn the lights off in order to see.