Slashdot Mirror


Stack Overflow 2015 Developer Survey Reveals Coder Stats

SternisheFan points out the results from 26,086 developers who answered Stack Overflow's annual survey. It includes demographic data, technology preferences, occupational information, and more. Some examples: The U.S. had the most respondents, followed by India and the UK, while small countries and several Nordic ones had the most developers per capita. The average age of developers in the U.S. and UK was over 30, while it was 25 in India and 26.6 in Russia. 92.1% of developers identified as male. Almost half of respondents did not receive a degree in computer science.

The most-used technologies included JavaScript, SQL, Java, C#, and PHP. The most loved technologies were Swift, C++11, and Rust, while the most dreaded were Salesforce, Visual Basic, and Wordpress. 20.5% of respondents run Linux more than other OSes, and 21.5% rely on Mac OS X. Vim is almost 4 times more popular than Emacs, and both are used significantly less than NotePad++ and Sublime Text.

45% of respondents prefer tabs, while 33.6% prefer spaces, though the relationship flips at higher experience levels. On average, developers who work remotely earn more than developers who don't. Product managers reported the lowest levels of job satisfaction and the highest levels of caffeinated beverages consumed per day.

21 of 428 comments (clear)

  1. Tabs vs Spaces by Afty0r · · Score: 3, Interesting

    As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

    Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

    1. Re:Tabs vs Spaces by Anonymous Coward · · Score: 4, Interesting

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      Different editors display tabs differently.

      Some editors replace tabs with N spaces.

      Mix the two, and indentation gets all fucked up.

      You work for me, you will use spaces.

    2. Re:Tabs vs Spaces by Kohath · · Score: 4, Informative

      Spaces are 1 space. Tabs are a random number of spaces.

    3. Re:Tabs vs Spaces by AuMatar · · Score: 3, Informative

      Tabs were more likely to cause problems in the old days, when editors did things that were ridiculous like expand them to 8 spaces. Nowdays with everything configurable, it isn't much of an issue. The reason why the older more experienced people prefer spaces is that they learned to dislike tabs in the bad old days. In 10 years that argument will be dead with tabs winning.

      --
      I still have more fans than freaks. WTF is wrong with you people?
    4. Re:Tabs vs Spaces by Jeremi · · Score: 5, Funny

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Because in every project that uses tabs,
      The code is inevitably
              littered with
              the occasional
        line that does not line up with the others
              for no apparent reason.
              and you will spend part of every day
              either changing your editor's tab settings
              to match the tab settings of the code's author
              or editing the code to "fix" the problem
              (which will of course "break" it for the
              next person whose tab settings don't match yours)

      If you avoid tabs and use only spaces, OTOH, the code formatting will look correct on any editor with any tab setting.

      --


      I don't care if it's 90,000 hectares. That lake was not my doing.
    5. Re:Tabs vs Spaces by RabidReindeer · · Score: 5, Insightful

      As a fairly experienced and slightly wrinkly and grey developer, can anyone tell me why spaces over tabs?

      Tabs allow the developer to customise their IDE to display the amount of indentation they desire... and use fewer bytes... spaces seem to have no benefits whatsoever in my book.

      Once upon a time, tabs were wonderful. Because disks held 80 kilobytes and ANYTHING that could put more code/data on a disk was wonderful, as long as you had the RAM/CPU to deal with it.

      Those days are long gone, however.

      The nominal expansion of tabs is to advance to the next column which is a multiple of 8. That's presupposing "absolute" horizontal tabs, as opposed to the less-common relative horizontal tab (RHT).

      But 8 columns is a really awkward amount to indent things, especially if you're dealing with letter-sized printouts at 10 characters per inch. A much more pleasant value is usually to tab in increments of 3 or 4 columns.

      And, as others have pointed out, the 8-character convention is really just a convention. There's always someone who sets their hardware tabs or tab displays differently.

      And then there's Python, which gets its magic from careful indentation. Meaning that a listing that looks fine on-screen or on paper may bewilderingly not run. Because although the alignment of the characters on successive lines may match up, the actual number of spacing characters on those lines might not. And conversely, the alignment can get scrambled just because someone picked a different tab expansion value.

      And that is why it's the experienced people who are least fond of tab characters. Once burnt...

    6. Re:Tabs vs Spaces by Your.Master · · Score: 3, Insightful

      Spaces are unquestionably useful in some cases. Tabs need to justify their existence.

      I can virtually guarantee if you were inventing the first character set today, with no backward-compatibility constraints and no knowledge of the real world's history of keyboarding, you would not include a tab key. It's a relic of the typewriter era, and it's redundant. You *would* probably have a "change the currently focussed element" key, but I suspect it would be related to the arrow keys and would be positional rather than linear. Word processors would have a different affordance for "indent bulleted list".

      Disk space for source code tabs vs. spaces is irrelevant.

      To me, the tab character causes problems and the only real problem it solves (different tastes for how much width to indent) are better solved by an IDE which is already solving the same problem in so many other contexts, like syntax highlighting in different colours etc.. An IDE could easily say that a line that starts with a string of X consecutive spaces should be represented as Y consecutive spaces. Y may even be a fraction, or a function if you choose to have tab mean "align to previous", but 2, 4, and 8 fixed-width spaces are pretty common. Personally I like 3, but at my workplace the standard is 4 and that's just fine.

    7. Re: Tabs vs Spaces by corychristison · · Score: 3, Informative

      I prefer tabs.

      I don't understand the debate here. Use what you like. If you're editing someone else's code, then convert it to your preference or suck it up.

      The editor I use will detect tabs or spaces in the file, and automatically convert it to the preference I set it to in the settings.

      Why is this so hard? Why don't all editors do this?

    8. Re: Tabs vs Spaces by DigiShaman · · Score: 5, Funny

      Next time you interview someone, the first question out of your mouth should be "Tabs or spaces?!" This way, nobody's fucking time is wasted.

      --
      Life is not for the lazy.
    9. Re:Tabs vs Spaces by xdaimon · · Score: 3

      What is even easier is to use an editor who automatically writes a set of spaces when the tab key is hit. At this point say good bye to \t forever.

    10. Re:Tabs vs Spaces by beelsebob · · Score: 4, Insightful

      Because tabs are not enough to lay out code well (you always end up with a couple of spaces to align things correctly). Then once you introduce a mixture, you end up in a situation where a change in tab-width causes layout fuckup (i.e. you get fuck ups on a different user's system).

      Meanwhile, if you use spaces for everything, code remains well laid out everywhere. If you have even a half-decent editor, it will allow you to edit spaces as if they were tabs, so using spaces has exactly 0 drawback.

    11. Re:Tabs vs Spaces by Dynedain · · Score: 4, Insightful

      The nominal expansion of tabs is to advance to the next column which is a multiple of 8.

      Huh? Since when? On typwriters and early word-processors it was forced to 5 columns. And even most typewriters allowed you to move the tabstops to arbitrary places.

      On every editor I've seen in the last 5 years the tab display width is configurable. If you like 2 spaces, great, if you like 8, have at it. It doesn't affect the rest of your team.

      The only reason tab characters are a problem is because people mix and match tabs and spaces.

      Python's whitespacing is an evil that should be purged with fire.

      --
      I'm out of my mind right now, but feel free to leave a message.....
    12. Re: Tabs vs Spaces by laffer1 · · Score: 4, Insightful

      Funny, I feel the exact opposite. The FreeBSD style(9) documentation suggests tabs because they can be customized to individual developers needs and they minimize weird diffs on the version control systems.

      I take language and platform into account. For HTML and JavaScript, I prefer spaces. For Java, Perl, C#, CSS, C, and C++ tabs. If there is a crazy IDE required, I often prefer spaces because many of them default to some level of spaces and I like the quick code cleanup command to work the same for the whole team.

      The real issue with that question is that it's impossible to answer. Even if you get a "spaces" person, try to get them to agree on the number of spaces. A coworker loves 2 spaces which is flat out wrong to me. Too hard to read. I've met people into 3 or 4 spaces. Then you get into where to put curly braces, etc.

      Whatever you choose, it should be a standard for code whether at an open source project or a company.

      I can't stand everyone using their own style. It's much worse than having to use a specific one.

    13. Re: Tabs vs Spaces by Flammon · · Score: 4, Insightful

      This debate only happened because some programmers stopped thinking about the indentation abstraction. You shouldn't be thinking in terms of spaces vs tabs. Instead you should be thinking in levels of indentation for blocks. Indentation is not some technique to make your code look pretty, it's there to show a clear separation of logic, loops, blocks etc. Code is art, just not Ascii art. One keystroke per indentation is the simplest and most efficient.

    14. Re:Tabs vs Spaces by spongman · · Score: 4, Informative

      tabs are an undefined constant number of spaces. not random.

    15. Re:Tabs vs Spaces by Darinbob · · Score: 3, Interesting

      It does actually affect the team. Everyone needs to use the exact same tab settings or else the code looks different. It's utterly painful to view some code where someone is tab-happy and assumes one tab stop is two characters and then uses deeply indented conditionals: your teammates should never be forced maximize the size of a window just to view your code. Especially if you change tabs settings within a single file (and I swear that idiots actually do this). Not all developers use the same editor, not all methods of viewing the code use the same tab settings either; paginators, printers, source code control, static analysis tools, and so forth, may all have different ideas about tabs than you used in your editor.

      Be nice to your teammates, because no one's personal style preferences are more important than getting along as a team and getting stuff done.

    16. Re:Tabs vs Spaces by serviscope_minor · · Score: 3, Insightful

      YOU'RE DOING IT WRONG!!!

      Seriously that's a guaranteed path to failure. If you stick to tabs only for indenting at the block level and spaces for any further alignment then it works perfectly. That way changing the tab stops only changes the block-level indent. Any further formatting is done with spaces.

      Tabs are logically block-level so they should only be used for block level. If you're aligning relative to text, you need spaces because that's not a block level thing.

      The rule is simple and if only everyone would find Jesus^W^Wlearn the rule then we would all achieve peace on earth^W^W^Whaving no commits which change all the whitespace.

      /me bangs the pulpit.

      PS: use vi.

      --
      SJW n. One who posts facts.
  2. Re:Stack Overflow? by BarbaraHudson · · Score: 3, Informative

    I read the stats
    It's in plain view
    If you're over 50
    No job for YOU!
    Burma Shave

    --
    "Transparent" is a shit show that trades on every stereotype going. A man in drag is NOT a transsexual.
  3. Re:Huge red flag about the survey by DahGhostfacedFiddlah · · Score: 4, Insightful

    If I need to know about executeFoo() in SomeLibrary, I can:

    • Google "SomeLibrary executeFoo"
    • Go to SomeLibrary.com, and navigate through Support->Documents->API->executeFoo
    • Thumb through a dead-tree SomeLibrary book until reaching executeFoo

    I've tried all three, and vastly prefer the simple Google search. Not only will SomeLibrary.com be in the first 3 results (assuming their documentation doesn't suck), but there's a good chance you'll find a StackOverflow thread that not only explains executeFoo, but also covers the caveats and options better than the documentation.

    Code samples tend to be more elegant than my own code. Many questions have multiple samples by multiple authors refined by multiple editors over multiple years. In comparison, I find API documentation often turns stale, or the samples are too simple to cover the cases I'm interested in. I don't "spend my life copy-pasting" - code samples tend to be useless for any real-life task. But I do get to see a gallery of how other people have solved similar problems.

  4. Technology section seems... odd by Dave+Emami · · Score: 3, Insightful

    Javascript and AngularJS and NodeJS? If you're using one of the latter, aren't you using the former by definition? And also, while I have nothing against Angular (learning at the moment myself), is it really more-used than jQuery? I see jQuery all over the place when I look into the source of sites I find interesting, far more often than I run into Angular.

    --

    "The Greens lynched a hacker in Chicago. Last month, but I think the body's still hanging from the old Water Tower."
  5. Re:Stack Overflow? by Dr_Barnowl · · Score: 3, Insightful

    You can't continue to have that patriotism in view of the observable facts - your government is by the few, for the few, and the people be damned. I agree that it's great that a government was founded with these ideals - but as laid out in the constitution, the time would seem to have come to throw what you have away and replace it with a government for the people again.

    True patriotism would be revolution.