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.

10 of 515 comments (clear)

  1. Pied Piper proves it too ... by drnb · · Score: 4, Funny

    Pied Piper proves it too, that tab loving company is one money losing screwup after another.

  2. Of course they earn more! by DontBeAMoran · · Score: 5, Funny

    Those idiots take four times longer or more to indent their code compared to those of us who use tabs and get home earlier thus working less hours.

    --
    #DeleteFacebook
  3. That's because they get paid by the character by JoeyRox · · Score: 5, Funny

    Using spaces increased my earnings by 4x over tabs.

  4. Re:Yeah but by Coisiche · · Score: 4, Funny

    Most of the respondents wouldn't have understand the question because they actually use whatever their IDE does.

  5. The real question... by crashumbc · · Score: 5, Funny

    One space or two after a period?

    Sorry wrong crowd :P

    (and don't you heathens dare say one)

    1. Re:The real question... by Anonymous Coward · · Score: 2, Funny

      I always give my wife plenty of space when she's on her period, and for a day or so after.

  6. Re: I use spaces but indent by 2 spaces rather th by Anonymous Coward · · Score: 2, Funny

    Three spaces? That's ... odd.

  7. Re:Possible Explanation... by ShanghaiBill · · Score: 5, Funny

    It should be 2.

    It depends on the language. For bracketed languages like C++, Java, and Javascript, 2 spaces is correct. But for indented languages like Python, 4 is better to make the structure more clear.

    What I really can't stand is people that use 8. That is never the right choice. My wife uses 8 spaces, and we have had plenty of arguments over that, especially when she edits my code, changes the indentation and then checks it back into the git repository with 100% of lines changed. But the final straw was when she started teaching the kids to use 8 spaces. We almost got divorced over that. I fought for 2, she fought for 8, so we compromised, and the kids are using 4 space indents, although neither of us is happy about that.

  8. Re:Possible Explanation... by 0100010001010011 · · Score: 5, Funny

    Intelligent devs use IDEs

    Would that be vim or emacs?

  9. Re:Possible Explanation... by Anonymous Coward · · Score: 5, Funny

    What I really can't stand is people that use 8. That is never the right choice. My wife uses 8 spaces, and we have had plenty of arguments over that, especially when she edits my code, changes the indentation and then checks it back into the git repository with 100% of lines changed. But the final straw was when she started teaching the kids to use 8 spaces. We almost got divorced over that. I fought for 2, she fought for 8, so we compromised, and the kids are using 4 space indents, although neither of us is happy about that.

    This is why it is so important to get to know each other before getting married. My church recommends starting an open-source project together before even getting engaged, you learn so much about a person just settling on which license to use.