Stories
Slash Boxes
Comments

SoylentNews is people

posted by n1 on Sunday June 18 2017, @12:22AM   Printer-friendly
from the not-your-bar-tab dept.

Submitted via IRC for TheMightyBuzzard

The annual Stack Overflow developer surveys often include lots of bad news. "People still use PHP," for example, is a recurring and distressing theme. "Perl exists" is another.

But never before has the survey revealed something as devastatingly terrible as the 2017 survey. Using PHP and Perl are matters of taste. Extremely masochistic taste, certainly, but nobody is wrong for using those languages; it's just the programming equivalent of enjoying Adam Sandler movies. But the 2017 survey goes beyond taste; it goes into deep philosophical questions of right and wrong, and it turns out that being wrong pays more than being right.

Developers who use tabs to indent their code, developers who fight for truth and justice and all that is good in the world, those developers have a median salary of $43,750.

But developers who use spaces to indent their code, developers who side with evil and probably spend all day kicking kittens and punching puppies? Their median salary is $59,140.

Source: ArsTechnica


Original Submission

 
This discussion has been archived. No new comments can be posted.
Display Options Threshold/Breakthrough Mark All as Read Mark All as Unread
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
  • (Score: 2) by Snotnose on Sunday June 18 2017, @05:22AM (7 children)

    by Snotnose (1623) on Sunday June 18 2017, @05:22AM (#527349)

    People could set the way tabs are displayed: equivalent to 2, 3 or 4 spaces.

    Doesn't work that way. You end up guessing the other person's tab settings, never really knowing if you've got it right.

    Nowdays at the top of every file I work on you'll see something like "# vim: set ts=4 sw=4 noet:". If you use vim, which 90% of my co-workers do, things are set right. If you use something else you can ask me Whiskey Tango Foxtrot and I'll tell you it means tabstops are 4 and tabs are expanded to spaces.

    --
    My ducks are not in a row. I don't know where some of them are, and I'm pretty sure one of them is a turkey.
    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by Whoever on Sunday June 18 2017, @05:39AM (2 children)

    by Whoever (4524) on Sunday June 18 2017, @05:39AM (#527361) Journal

    It does if you use tabs for indentation and spaces for alignment.

    • (Score: 2) by Snotnose on Sunday June 18 2017, @06:07AM (1 child)

      by Snotnose (1623) on Sunday June 18 2017, @06:07AM (#527367)

      So, you mix tabs and spaces, which is the worst of all worlds.

      For fuck's sake people, be consistent. Use tabs at whatever tabstop you like. Use spaces. But don't mix them the fuck up cuz those of us who have to work on your code have no fucking clue how you set things. For C/C++/Perl/ whatever, we can deal. For Python, we're fucked. In the ass. Without lube.

      --
      My ducks are not in a row. I don't know where some of them are, and I'm pretty sure one of them is a turkey.
      • (Score: 0) by Anonymous Coward on Sunday June 18 2017, @12:27PM

        by Anonymous Coward on Sunday June 18 2017, @12:27PM (#527434)

        So, you mix tabs and spaces, which is the worst of all worlds.

        I think you need to clarify what you mean by "mix", because so long as every line only uses tabs for indentation, there is no mixing going on.

        For C/C++/Perl/ whatever, we can deal. For Python, we're fucked. In the ass. Without lube.

        Only if you're so inflexible as to try and force your preferred C style onto your Python code, and not attempt something more appropriate for the language.

  • (Score: 3, Informative) by Arik on Sunday June 18 2017, @08:31AM (3 children)

    by Arik (4543) on Sunday June 18 2017, @08:31AM (#527401) Journal
    If you use tabs properly (to line up columns) and spaces properly (to divide words) then this 'mixture' causes no problems at all, and it is (this is important) NOT necessary to replicate any settings from the authors machine in order for things to line up properly. Your first tab stop will always represent your first level of indention, the second will represent the second, etc. and that's the underlying meaning here that has to be preserved - the order of indention. It doesn't matter if the tabs are represented by 4 spaces or 8 spaces or by a wavy purple line - what matters is that they mark successively deeper levels of indentation and nothing else.
    --
    If laughter is the best medicine, who are the best doctors?
    • (Score: 2) by FatPhil on Monday June 19 2017, @05:40AM (2 children)

      by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Monday June 19 2017, @05:40AM (#527748) Homepage
      How can anyone who's never enountered a line such as

      --->--->thingy->ops.krudge_wotsit(&thingy->wotsit,
      --->--->--->--->--->--->--->--->··thingy->settings.wotsit_mode,
      --->--->--->--->--->--->--->--->··krudge_mode,
      --->--->--->--->--->--->--->--->··ostream);

      have had enough experience in the real world to command anything but the lowest level of intern's salary?
      --
      Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves
      • (Score: 2) by Arik on Monday June 19 2017, @11:29AM (1 child)

        by Arik (4543) on Monday June 19 2017, @11:29AM (#527853) Journal
        That's not a line that's quite a few of them, and so what? It's poorly formatted. Of course I've seen many poorly formatted blocks of text. What is it that you imagine that proves? Murphy's law predicts that if it's possible to do it wrong someone will do it wrong, that's a given. So what? There's no big difficulty here, as you say anyone with any real world experience should be able to fix it in seconds.
        --
        If laughter is the best medicine, who are the best doctors?
        • (Score: 2) by FatPhil on Monday June 19 2017, @02:42PM

          by FatPhil (863) <{pc-soylent} {at} {asdf.fi}> on Monday June 19 2017, @02:42PM (#527923) Homepage
          You show me a code metric that evaluates that line as anything apart from one line, and I'll show you a broken code metric.

          And it proves that you are unfamiliar with exceedingly common coding styles used by projects which have contributors numbering in the tens of thousands. Not being familiar with the field diminishes your ability to be taken seriously when discussing the field.

          If you think the code needs to be "fixed", then you will never get a patch in to the linux kernel, you won't even pass checkpatch.pl.
          --
          Great minds discuss ideas; average minds discuss events; small minds discuss people; the smallest discuss themselves