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 vux984 on Sunday June 18 2017, @07:26AM (2 children)

    by vux984 (5045) on Sunday June 18 2017, @07:26AM (#527390)

    The argument you seem to be making is that mixing tabs and spaces is bad.

    Pretty much.

    In what way does that translate into "therefore tabs are bad"? You could just as well say "therefore spaces are bad". Asserting that mixing the two is bad does nothing to favor one over the other.

    No. Spaces are simple, standard, well defined, well understood, and portable. They occupy one space, like every every other normal character. And a one space separator is highly desirable. And the only way to emulate spaces with tabs is to define tabs as one space, which is what a space is; so its an absurd reduction. Conversely, you can easily emulate tab stops and tab functionality with spaces. It is ridiculous to suggest that there is nothing to favor one over the other.

    Starting Score:    1  point
    Karma-Bonus Modifier   +1  

    Total Score:   2  
  • (Score: 2) by acid andy on Sunday June 18 2017, @09:50PM (1 child)

    by acid andy (1683) on Sunday June 18 2017, @09:50PM (#527608) Homepage Journal

    No. Spaces are simple, standard, well defined, well understood, and portable.

    As are tabs.

    They occupy one space, like every every other normal character.

    Only when using a mono-spaced font.

    And a one space separator is highly desirable.

    Sometimes. But no-one's suggesting destroying the Space Bar.

    And the only way to emulate spaces with tabs is to define tabs as one space, which is what a space is; so its an absurd reduction.

    Not really. You could define a tab as a different number of spaces in your editor. It all depends on personal preference and how much text you want to fit on one line of your screen.

    Conversely, you can easily emulate tab stops and tab functionality with spaces. It is ridiculous to suggest that there is nothing to favor one over the other.

    Sure, you can but it becomes irritatingly inconsistent the minute you have to bring in code from another project or programmer that just happens to use a different number of spaces to you to represent an indentation. Spaces potentially allow more inconsistency than tabs when used for code indentation.

    Also, if you indent with spaces, some simple editors might not allow you to decrease the indent as quickly by pressing Backspace as with a tab. One press of Backspace deletes a whole tab, but if there are four spaces per indent, it takes four times as many key strokes. I'll grant you this isn't an issue most of the time as Shift-Tab usually works.

    --
    If a cat has kittens, does a rat have rittens, a bat bittens and a mat mittens?
    • (Score: 2) by vux984 on Monday June 19 2017, @05:51AM

      by vux984 (5045) on Monday June 19 2017, @05:51AM (#527753)

      As are tabs.

      LMAO. Can you really say that with a straight face? Tabs are not well defined; editors treat them differently, and they are highly configurable;... that's the opposite of 'simple, well defined, and portable'. How much special programming in the editor is required to handle spaces? About the same amount as the letter 'A'... which is to say none. How custom logic to handle tabs? Tabs are pretty much the LEAST simple character used in source code.

      Only when using a mono-spaced font.

      That's true. Does anybody use proportional space font for source code?

      Sometimes. But no-one's suggesting destroying the Space Bar.

      The post i was responding too was.

      Not really. You could define a tab as a different number of spaces in your editor.

      The context here was someone saying not to use spaces ever, only tabs. Defining a tab as a different number of spaces, requires you to use spaces.

      Spaces potentially allow more inconsistency than tabs when used for code indentation.

      The code you are pasting in from another developer somwhere else, could potentially use spaces OR tabs OR both. Only the possibility of there being spaces is not going to result in 'more inconsistency' ... at worst it'll be the same.

      Sure, you can but it becomes irritatingly inconsistent the minute you have to bring in code from another project or programmer that just happens to use a different number of spaces to you to represent an indentation. Spaces potentially allow more inconsistency than tabs when used for code indentation.

      Decent editors can reformat code on demand. Except for python.

      Also, if you indent with spaces, some simple editors..[...]

      Don't use crappy editors. Some crappy editors won't cope with CR/LF issues, or unicode... either.