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.

515 comments

  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.

    1. Re:Pied Piper proves it too ... by Anonymous Coward · · Score: 0

      I liked Richard until the moment I found out he used tabs.

    2. Re:Pied Piper proves it too ... by siriuskase · · Score: 1

      It makes perfect sense that coders are paid by the character. A tab is only one character, not as much work.

      --
      If you must moderate, please moderate as irrelevent, not something bad, because I'm sure someone will find this interest
  2. I use spaces! by Anonymous Coward · · Score: 0

    eom

  3. Yeah but by Anonymous Coward · · Score: 0

    StackOverflow is full of people who can't actually code.

    1. 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.

    2. Re: Yeah but by ranton · · Score: 2

      Considering the average developer salaries were around $50k, they can't be that great. Who is even paying junior developers that little? I can't get a competent developer for under six figures even in the Midwest suburbs.

      --
      -- All that is necessary for the triumph of evil is that good men do nothing. -- Edmund Burke
    3. Re: Yeah but by Anonymous Coward · · Score: 0

      Too true! Personally I use tabs most of the time, unless I'm writing JavaScript, then I use spaces. I make well over 6 figures and tend to avoid StackOverflow.

    4. Re: Yeah but by slew · · Score: 1

      Considering the average developer salaries were around $50k, they can't be that great. Who is even paying junior developers that little? I can't get a competent developer for under six figures even in the Midwest suburbs.

      Maybe that's because you aren't a body shop hiring H1bs bringing down the average... (as he ducks)

    5. Re:Yeah but by Darinbob · · Score: 1

      This is very true. And these users get confused when the issue is brought up. I see this trend more common with solitary programmers, or those who use programming as just a side tool for their real job. Once you start sharing code though, putting it into a repository, having others try to use it, then you need to be a bit more formal about how the programs look.

      You can't really stick in the IDE for life. There are so many external tools that are needed that you're bound to run across issues with tabs.

    6. Re: Yeah but by Anonymous Coward · · Score: 0

      Educational or other state institutions that have extremely tight budgets and end up training beginner devs up to the standard that they need.

      The talented devs eventually leave for more money, and the managers (which make enough) continue the cycle.

    7. Re:Yeah but by networkBoy · · Score: 1

      at my new gig I have started writing some software and I asked one of the other devs for a style guide...

      "use whatever" /twitch

      soCamelCaseItIs{
          with(the brackets done as such);
      }

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    8. Re:Yeah but by Darinbob · · Score: 1

      OMG, I've seen that code!

  4. I use spaces but indent by 2 spaces rather than 4 by Anonymous Coward · · Score: 0

    Does that means that i make half as much as a developer that uses 4 spaces?

  5. Both? by TFlan91 · · Score: 2

    "considered themselves a professional developer" ... "with 17.5% using both"

    wtf? a professional developer uses both? really?

    if and when i find a file that has mixed spaces / tabs, not only that, but 3 spaces instead of 4 then a tab for the fourth character. I slap that dev so fast the dev will try to rewrite git history.

    1. Re:Both? by Anonymous Coward · · Score: 0

      if and when i find a file that has mixed spaces / tabs, not only that, but 3 spaces instead of 4 then a tab for the fourth character. I slap that dev so fast the dev will try to rewrite git history.

      Perhaps what was meant is tabs in some files/certain projects and spaces in others?

    2. Re:Both? by beelsebob · · Score: 1

      Probably means tabs for indentation, spaces for alignment. They're still morons though.

    3. Re:Both? by glenebob · · Score: 1

      Ever work with code that uses 4 spaces for column one, 1 tab for column two, 1 tab and 4 spaces for column three, etc.?

      *shudder*

    4. Re:Both? by Anonymous Coward · · Score: 0

      Using both makes sense if you rely on tabs for indentation and on spaces for alignment. Otherwise, yeah, slap it is.

    5. Re:Both? by pkuyken · · Score: 1

      Unfortunately I am one of the types that uses both (but only out of consistency). Some projects (typically older ones) use tabs, while our newer projects correctly use spaces.

    6. Re:Both? by Anonymous Coward · · Score: 0

      If you're worried about alignment, then spaces it is. Never, ever mix tabs and spaces. Not even once.

    7. Re:Both? by BronsCon · · Score: 5, Insightful

      I can actually see the argument for a 4-space indent consisting of 3 spaces and a tab. The developer thinks they're throwing a bone to people who use tabs by allowing them to set their own indent width. But they're wrong to use spaces at all in that case; what about people who prefer 2- or 3-char indents?

      And that's why tabs should be the standard: people prefer different indents. Using tabs, everyone can have their way; set your tab width and all tabbed indents are automatically the width you want.

      Now, for those who insist on tabs, let me explain why spaces are better: they allow you to align parameters and operators after the indent.

      That's why my preference is to use tabs to indent, then spaces to align after the indent; best of both worlds. You're already using the tab key to indent and the spacebar to align, so there's no mental or physical overhead involved, the layout of your code is preserved and, if someone else prefers a different tab width, they can have it without breaking the alignment of arguments or operators (if you bother to make them look pretty) or altering how the code displays for you, or anyone else.

      But, that's just a preference. When I'm working on someone else's code, I follow their conventions, because it really doesn't take any time at all to change an IDE setting (especially when my IDE can store per-project settings for things like tab width) and I'm not a dick.

      Beyond that, if someone uses tabs on some lines and spaces on others within the same file... yes, slap them silly.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    8. Re:Both? by kristianbrigman · · Score: 1

      I use both(*), because not all indenting is for blocks - sometimes it's for a multiline list/string/dictionary, and for those I usually try to line up the second lines to
      match where it started in the previous line to look better, and that depends on the length of the function name so isn't always an exact multiple of the tab width.

      But I think you can also read from this that people who use spaces may care more about what their code looks like, which usually means they might care a bit more about what their code does as well.

      (*), because my IDE converts all the tabs to spaces anyways - yes, I mostly am working in Python.

    9. Re:Both? by Wraithlyn · · Score: 1

      Who said it was within the same file?

      For instance YML files specify that spaces must be used. But maybe tabs are standard on the project for other files.

      But all of this is moot. In 2017, the correct answer to "tabs or spaces?" is "use fucking editorconfig and stop worrying about it".

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    10. Re:Both? by Anonymous Coward · · Score: 0

      that's how i format my python!

    11. Re:Both? by Anonymous Coward · · Score: 0

      I use both in a single project, depending on the day. Mondays and Fridays are tab days, Tuesday and Thursday are for spaces. As for Wednesday, that is meeting day so no work gets done anyway.

    12. Re:Both? by Anonymous Coward · · Score: 0

      What's wrong with that ?
      For me this would be the way to go.
      But most IDE don't support it so I'm all spaces for now.

    13. Re:Both? by beelsebob · · Score: 1

      What's wrong is that errors are not transparent.

      If someone fucks up and puts a tab in the wrong place, or a space in the wrong place it's completely non-obvious to anyone until it's already in the repository.

      In practice, it ends up with a code base that's got all kinds of weird indentation issues because people fuck up this way with great regularity.

    14. Re:Both? by Misagon · · Score: 1

      People who use both might be using GNU indenting style
      where braces are indented half-way between the indenting outer and inner blocks.

      Myself, I indent labels and preprocessor directives in C (and like languages) with two spaces less and the rest with four-space tabs.
      That way, #ifdef's for disabling code does not affect the indentation of the code they disable and e.g. switch-case statements don't get indented so deeply.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    15. Re:Both? by Anonymous Coward · · Score: 0

      Sadly, that's actually plausible...

    16. Re:Both? by mpercy · · Score: 1

      But not both in the same file, surely.

    17. Re:Both? by edtice1559 · · Score: 2

      What is shocking to me is that we even have this discussion. There ought to be a check-in hook that properly formats the code. Would also reduce defects where a brace/bracket is missing.

    18. Re:Both? by edtice1559 · · Score: 1

      The answer is that the IDE should allow you to view the code with your own preferences, but what goes into revision control should get automatically formatted with whatever standard is set for a project.

    19. Re:Both? by Anonymous Coward · · Score: 0

      Theory vs. reality. In theory, when all your developers are perfectly disciplined your argument is sound and tabs for indent, spaces for alignment would be great.
      In practice, in the real world and even a medium-sized team, all you can expect to get is an unholy mess that will look horrible in pretty much any editor and with any setting for tab width.
      Maybe that's why developers using spaces earn more: they accept reality and deal with it, while those using tabs cling to their theories and ideals and either have not experienced or ignore reality :P
      (just joking, others have mentioned many much better explanations)

    20. Re:Both? by Anonymous Coward · · Score: 0

      What is this IDE of which you speak? Do you mean 'vi'?

    21. Re:Both? by Anonymous Coward · · Score: 0

      Dude, you're getting your news from an anonymous source.

      slashdot is one big WFT?

    22. Re:Both? by beelsebob · · Score: 3, Interesting

      The reason that most places don't have these check in hooks is simple - rule 1 in all good style guides is "if breaking the style guide in one off cases makes code substantially clearer, break the style guide."

      Humans need to have the ability to say "no, in this one case it makes sense to do something odd to make this code readable".

    23. Re:Both? by Anonymous Coward · · Score: 0

      What's the percent of developers that use neither tabs, spaces, or returns?
      I cringe whenever I see a new dev write everything on one extremely long endless line. I once remember a case statement, with 20 cases, but all in one really long single line that contains all the cases.

    24. Re:Both? by computational+super · · Score: 1

      a professional developer uses both? really?

      Job security.

      --
      Proud neuron in the Slashdot hivemind since 2002.
    25. Re:Both? by Anonymous Coward · · Score: 0

      That's why my preference is to use tabs to indent, then spaces to align after the indent; best of both worlds.

      This is just called using tabs. The tabs vs spaces debate regards indentation, nobody would argue that you should use tabs to align after the indent, because that wouldn't work.

    26. Re:Both? by Anonymous Coward · · Score: 0

      In practice, in the real world and even a medium-sized team, all you can expect to get is an unholy mess that will look horrible in pretty much any editor and with any setting for tab width.

      Not sure, but I think I get what you're talking about. I've seen projects that try to enforce spaces for alignment. Inevitably, some of the developers end up using tabs instead, because it's easier and more natural. They probably intend to convert before commit, but sometimes they forget. What ends up happening is a huge mess of a combination of tabs and spaces in the same file.

    27. Re:Both? by phantomfive · · Score: 1

      That's why my preference is to use tabs to indent, then spaces to align after the indent; best of both worlds.

      Yes. It's a pain to get editors to do this, though.

      --
      "First they came for the slanderers and i said nothing."
    28. Re:Both? by BronsCon · · Score: 1

      That would be the ideal. Which IDE(s) will happily take a file indented with 4 spaces and display it with, for example, a 2 character indent? That's an honest question and I recognize that it's entirely possible that my IDE of choice does this and I simply don't know of the feature.

      That's why I believe tabs should be used for indentation; you don't have to rely on software guessing the correct tab depth when converting from spaces, then converting to tabs without fucking it up, then displaying those tabs at your desired width (which is the easy part, which we already have in basically every editor), then converting back to the correct number of spaces when you save. With tabs, you just specify how wide you want the tabs to be and bam that's how far your code indents. If you need to align things beyond the indent, that's what spaces are for.

      In my view, indenting with spaces is an egotistical power trip, an attempt to force your indentation depth preference on everyone who touches your code. Tabs are much more friendly to those whose layout preferences may differ from your own.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    29. Re:Both? by BronsCon · · Score: 1

      Howso? Configure it to use tabs to indent, then press TAB when you want to indent and SPACE when you want to align.

      Fucking Notepad can do it.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    30. Re:Both? by Darinbob · · Score: 1

      Experience is key here. If you've dealt with code for 30 to 40 years, you learn what works best, you know what is frustrating and try to avoid it yourself so as to not frustrate others. Code is viewed using more than just your own editor. It'll be seen on multiple editors and IDEs by multiple people who won't know what the preferred setting is. The code will be printed and that adds its own problems as the printer isn't smart enough and you don't always want to have to change settings on each file before printing (and believe me, each file will assume a different tab settings). Very often I view files using a terminal window; 'more', 'grep', 'tail'. The files will be displayed by static analysis tools using a browser, and online repository browser won't know what the preferred settings should be.

      Using a character in a file that means "1 to 8 characters" should go against the very grain of any self respecting programmer or engineer that values precision.

      I have found it amazingly rare for anyone to defend tabs as a superior choice, instead almost everyone I encounter using it has either not heard of the issue, didn't realize the editor was inserting them, or had trouble changing the tool. And I believe this, I've had people ask me to help set up their editor or IDE to avoid tabs and it can be difficult to find the settings. Sometimes you have to change the settings for each language individually! When I ask someone why tabs were used in a file I will inevitably hear an apology that they didn't realize it was happening.

      Now sometimes there's just something wrong or lazy with developers. I have worked on one file that used FOUR different tab indentation levels, with three levels within one function. That is, it was impossible to set a single tab level so that the function showed a consistent indentation level. This means people went and modified the file but refused to conform to the existing indentation levels, even going to far as to ignore that the lines directly above and below did not match. Laziness, orneriness, apathy, or? Either way, I would not have expected those developers to be amongst the higher paid ones.

    31. Re:Both? by Darinbob · · Score: 1

      This is not easy to do in some tools. I've seen some where you have to change tabs vs spaces settings separately for each programming language it supports. If someone keeps using tabs then you will keep having this problem and it is no longer moot. As soon as a file with tabs in it gets shared between different people and different tools the problem comes back. And with new developers showing up all the time ignorant about the issue or arrogant enough to insist on their own personal style, the problem will not go away.

    32. Re:Both? by Anonymous Coward · · Score: 0

      I actually see an argument for an even more convoluted set of rules for the intermixing of tabs and spaces. It totally makes sense but requires you to be super-aware of a whole lot of subtitles.

      And anyone who oversimplifies it should be slapped silly.

    33. Re:Both? by lgw · · Score: 1

      Never auto-format - auto-formatting is the worst menace ever to readable code. It's OCD over functionality.

      Autoformating can get stuff right 95% of the time, but that other 5% matters a lot. Sometimes it's important to show the structure of data clearly through aligning columns in some clever way. Sometimes code needs to be formatted as a 2-D array (large switch statements). There's doesn't seem to be a good set of rules yet for the corner cases using in-line lambdas and stream/list comprehension stuff.

      I've rejected many a code review where someone carelessly auto-formatted something important.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    34. Re:Both? by BronsCon · · Score: 1

      Very often I view files using a terminal window; 'more', 'grep', 'tail'. The files will be displayed by static analysis tools using a browser, and online repository browser won't know what the preferred settings should be.

      If your tools of choice don't allow you to set a tab width, perhaps that is a problem with the tools. For example, if your more doesn't allow you to set tab width (mine does), try less; you'll find that it brings many other useful features with it, as well. Less manages this by replacing tabs on the fly with the desired number of spaces; beyond that, the rendering of the TAB character itself is a function of your terminal; if you want 4 character tabs in your terminal, configure it as such using the tabs command. If your terminal is not POSIX compliant and does not honor the tabs command, you need better tools.

      Likewise for your static analysis tools and repo browser.

      You're right, experience is key, and that includes being experienced enough to know how to properly use your tools to achieve the desired results. I find it hard to believe anyone with 30 or 40 years of experience doesn't know that; I know it didn't take me a full 30 years to figure it out.

      Using a character in a file that means "1 to 8 characters" should go against the very grain of any self respecting programmer or engineer that values precision.

      We don't write it to look pretty or display identically on every medium it might be displayed on. We right it to function properly.

      We also shouldn't be imposing our own indentation preferences on others. Someone working on a 22:9 display might prefer 8 character tabs because, hell, they've got plenty of horizontal space so why the hell not? Someone working on a 16:9 display might prefer 4 characters, and someone working a a 4:3 or 6:4 display might prefer 2 because they don't have as much horizontal space. I fit into all 3 categories depending on where I happen to be working; I have a workstation with a pair of 16:9 4k displays (well, one is portrait, so 9:16), a desk at a remote office with a 22:9 display, and occasionally use a Chromebook with a 6:4 display.

      I'll tell ya, while I never prefer an indent of more than 4 spaces, when I'm working on that Chromebook or happen to be viewing code on the portrait display at my workstation, I do prefer 2 spaces so heavily nested code still fits on screen without wrapping or scrolling. In general, though, I prefer 4 spaces on the 22:9 and 16:9 displays. I could see 2 spaces being preferable when printing 8.5x11, while 4 or 8 would look better when printing 11x8.5.

      How does one manage that when using spaces to indent?

      Now sometimes there's just something wrong or lazy with developers. I have worked on one file that used FOUR different tab indentation levels, with three levels within one function.

      That's not an issue with TABs. That might be why people who don't desire to enter pissing matches over how far a line should be indented prefer them.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    35. Re:Both? by BronsCon · · Score: 1

      ... "We write it", we don't... right... it... FML...

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    36. Re:Both? by Anonymous Coward · · Score: 0

      How, exactly, does someone align with a single-character precision using tabs?

    37. Re:Both? by Darinbob · · Score: 1

      Just an addendum. After writring that I went off to a code review, using a web browser based code review tool. The "diffs" window clearly had problems because tabs were used for indentation and things were lining up badly. Meaning, you can change your editor to match your own style with tabs, but you can't go out and change every tool in the world. Thus, spaces are safer and always consistent.

    38. Re:Both? by Anonymous Coward · · Score: 0

      nobody would argue that you should use tabs to align after the indent, because that wouldn't work.

      Sadly, this is wrong. I've actually seen it...

    39. Re:Both? by BronsCon · · Score: 1

      How, exactly, do tabs mess up alignment? You shouldn't be aligning things at different indentation levels in the first place... If, for some reason, you find yourself needing to do that, then yes, I suppose you should just use spaces.

      When I say "alignment" I mean aligning arguments in a function call that has been split to multiple lines (and thus will be at the same indentation level), aligning operators in an IF statement that has been split onto multiple lines (and thus will be at the same indentation level), and things like that. If tabs are messing with that, you're using them way wrong.

      When two lines of code are indented to the same depth, how (or how far) they're indented becomes irrelevant; you could pull them out of their current context, remove any indentation, and alignment wouldn't be affected. You could indent them by 1 space, or by 100, and alignment would not be affected.

      Can you please show me an example of what you're talking about, as I'm now thoroughly intrigued.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    40. Re:Both? by Wraithlyn · · Score: 1

      The solution to this is switching to a tool that supports .editorconfig

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    41. Re:Both? by Anonymous Coward · · Score: 0

      What? That's completely ass backwards

      Tabs are for aligning tabular data. That's why it's called a "tab", and not an "ind".

      You indent with spaces, you align with tabs.

    42. Re:Both? by Anonymous Coward · · Score: 0

      I don't know what IDE BronsCon was referring to, but I know IntelliJ IDEA (and PHPStorem, and other IntelliJ-based IDEs) can do this. You can even save a settings file to the project root so anyone else using an IntelliJ-based IDE automatically gets your project settings. It's great for enforcing code formatting on large projects.

    43. Re:Both? by Anonymous Coward · · Score: 0

      >wtf? a professional developer uses both? really?

      >if and when i find a file that has mixed spaces / tabs, not only that, but 3 spaces instead of 4 then a tab for the fourth character. I slap that dev so fast the dev will try to rewrite git history.

      I don't see the problem. I use tabs for indentation and spaces for alignment. Consequently, many of my lines have some tabs in front and then spaces and then the text.

      That's the correct way to use it. That way, you can set tab with and also have your parameters, documentation, ascii art (no tabs in it ever) etc line up.

      Also, smart editors can hide the line if the text is starting at tab N where N is fixed until you press an editor key. That way you can gradually see your program as a tree. Newfangled editors call that "folding".

    44. Re:Both? by Anonymous Coward · · Score: 0

      Then you need an indentation tool that doesn't mess up manually formatted code.
      For many people, one that simply checks "does this stuff look manually aligned? Then don't touch it" should be enough and e.g. uncrustify can do that.
      If that's not good enough, some code annotations to switch off the tool, or per-file exceptions can probably handle it.
      It shouldn't mean to never use automated tools.

    45. Re:Both? by Darinbob · · Score: 1

      Some lines indented with spaces, some lines indented with tabs. Some lines assume tabs are 4 spaces, some lines assume tabs are 3 spaces, some lines assume tabs are 8 spaces, etc. Yes, I have seen lots of files that do this, multiple types of indentation assumptions in the same file. Most typically is that the file has no tabs at all, then later a developer comes along with a different tool that uses tabs and makes some changes, now you've got two styles of indenting in the same file. Usually the new developer knows nothing about this and doesn't even know tabs are being used, and barely even knows that there's such a thing as configuration for their editor or IDE.

      To me alignment means the start of each line, not aligning arguments (though the problem is there also). How far a line is indented is alignment. If two lines that should be at the same indentation show different amounts of white space in front of them then they are misaligned.

    46. Re:Both? by Darinbob · · Score: 1

      It is utterly irrelvant if "less" can be configured to know tab width. It does not know what the intended tab width is supposed to be for each file. You cannot set it once and have it work for every file. If I configure it to be four spaces instead of eight, then I will still encounter files that want three spaces. There is no universal standard here for how many spaces a tab should be and that is the entire problem - tab stops are not standardized, and the hard tab character is inherently imprecise for display purposes. If you've got 50 different developers all using different ideas of how to indent and what a tab stop should be, and 15 different tools with different defaults, then it's messy as hell.

      This is not just "less", I'm talking about browser based code review tools, online source code browsers, printers, source code control guis, and so forth. If you throw a random file at them they won't know what the intended tab stop is supposed to be. Ok, sure, I can have an alias for "less", "less4", "less8" and such and switch between them but it's clumsy and should not be necessary if people could just learn to avoid hardtabs in files.

      I have worked with files that were meant to use 2, 3, 4, and 8 space tab stops, and it is common for me to run across files where different lines have different intended tab stop settings, so that you cannot just use one tabstop setting and have all the indentation line up properly. I have even seen one file that either used four different tabstop settings (either that or the developers were insane). The developers are (usually) not trying to be disagreeable, most of them don't even know they're using tabs.

      With spaces you never have this problem. You don't have to guess or twiddle with settings until things line up.

    47. Re:Both? by BronsCon · · Score: 1

      To me alignment means the start of each line, not aligning arguments (though the problem is there also).

      To the rest of the industry, alignment is aligning attributes, arguments, operators, or, well... anything else found in the middle of a series of lines.

      How far a line is indented is alignment.

      No, that's indentation. At least, that's what the rest of the industry calls it

      And the problem you're complaining about, where some lines are indented with tabs and others indented with spaces, and those with spaces use varying indent widths, is solved by using tabs. The problem is that tabs and spaces are mixed in the same file.

      Proof: Even if all lines were indented with spaces, the space-indented lines are still inconsistent.

      The problem isn't the use of tabs, the problem is the inconsistent use of spaces and, restating the above in a different way, you would still have that problem regardless of the tabs. Tab indenting is the solution, in this case.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    48. Re:Both? by BronsCon · · Score: 1

      I the width of your tab matters, you're using tabs wrong. Period.

      There is a reason I asked you in the other thread to show me what you're talking about. IT is so that I can point out the real cause of the problem.

      Your comment in that thread that "experience is key" leads me to believe that you think I'm new to this. Boy, I've literally been programming since I was 5. Your mention of 30-40 years of experience leads me to believe that you may be older than me, as I fall at the lower end of that range, but the level of understanding you display renders you a boy in my mind.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    49. Re:Both? by Darinbob · · Score: 1

      No, the problem is that some lines are indented with tabs assumed to be 4 space, and other lines in the same file are intended assuming to be 8 spaces, and forth. Then when looking at the file the lines are are intended to be indented to the same level do not show as lined up visually. It's not good to have differing definitions of tab within a single file, but it does happen and it is a headache.

      Now lots of people will say "if they did everything my way, it would all just work out". That's called having a standard. With tabs there is no standard. There may be a standard for a particular tool or language perhaps but it's certainly not consistent across everything.

    50. Re:Both? by Darinbob · · Score: 1

      I am not using tabs. But I do have to read and modify files used by others. And they most certainly use tabs and many of them use tabs inconsistently (or their tools do).

    51. Re:Both? by umghhh · · Score: 1

      I use tab to produce spaces i.e. I use both. I suppose project given settings for preferred editor + coding guidelines may make some difference.

    52. Re: Both? by BronsCon · · Score: 1

      What the hell editor are you using that doesn't assume a single tab width?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    53. Re:Both? by Anonymous Coward · · Score: 0

      Oh for fuck's sake.

      I have no doubt set more coding standards than you have, and for more people. I'm a complete stickler for guessability rather than wanking over your preferences on slashdot.

      And the answer? Tabs for indentation.

    54. Re:Both? by edtice1559 · · Score: 1

      Almost every IDE can format code. And *good* IDEs will do it perfectly. Unfortunately what they don't do is preserve the original formatting mechanism for future checkins. There's a menu item in Eclipse but I don't know what it is. The key combination is Shift-Ctrl-F to reformat the code. For Java especially, it's super-easy for Eclipse to do this since Eclipse knows what the parse tree looks like. Some formatting utilities can be very weak in they rely on things like regexes and counting brackets which could be error prone. But if you format code by first parsing into the AST and then regenerating the code from that, you'll get an accurate formatting every time.

    55. Re:Both? by Anonymous Coward · · Score: 0

      Tabs are indentation characters and spaces are alignment characters. There's a difference and when used as such then you can change your indent to any size and things stay aligned.

    56. Re:Both? by Anonymous Coward · · Score: 0

      You can shudder all you want, but it is easy to set VI/VIM up to automatically do that for you. So, it is not the dev doing it.

    57. Re:Both? by BronsCon · · Score: 1

      Unfortunately what they don't do is preserve the original formatting mechanism for future checkins.

      Well, that's what you stated as "the answer" and that's what I was asking.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    58. Re:Both? by Anonymous Coward · · Score: 0

      ... only because small-minded developers of the masses don't know the difference.

    59. Re:Both? by Anonymous Coward · · Score: 0

      I preffer indenting with 2 spaces, but it doesn't matter because my IDE enforces the right format adopted by the team everytime i finish an expression or saves the file.

    60. Re:Both? by Anonymous Coward · · Score: 0

      Because "professional developers" have a job to get on with, a product to ship, and can't waste time posturing over irrelevant whitespace.

    61. Re:Both? by BronsCon · · Score: 1

      So you're saying the problem is mixing tabs and spaces for indentation. That's not a problem with tabs and tabs bring an advantage that spaces don't. You've already pointed out how using spaces doesn't fix the problem of inconsistent indent depth, what with some people using 2, 3, 4, 5, 6, or 8 spaces to indent, and some files containing multiple different space-dictated indent depths.

      Using tabs solves that, and when some idiot injects spaces you fix the error. The same should be done in your "only use spaces to indent world"; when you see inconsistent indent depths, decide which one is correct and fix the lines that are incorrectly indented.

      My point is, if you want consistent formatting you have to fix it anyway, so just switch to tabs in the process and keep fixing indentation errors as you find them, just as you should be doing anyway.

      To put it another way, if you're leaving files with mixed tabs and spaces, you're wrong because they should never be mixed (I think we've agreed on that point, that they should never be mixed). If you're removing the tabs but leaving the spaces inconsistent, you're wrong because you still have the inconsistent indentation you're blaming on the tabs (even though you've removed them -- follow that logic, buddy, the problem ain't the damn tabs).

      If you're removing the tabs and updating space-indented lines so they're all consistent, fine, that's one right way to do it. But the compromise is that you're forcing your preference of indent width on everyone else; that's what many of us take issue with. Once your indent widths are consistent, tabs alleviate that issue and everyone can have whatever indent width they want just by specifying their tab width.

      Once again, either way you go you still have to fix indentation errors introduced by lazy developers, assuming you care about that. And if you don't care about that, well, why are you even discussing tab vs space in the first place?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    62. Re:Both? by LostMyBeaver · · Score: 1

      Child, if you are this preoccupied with white space, I wouldn't let you near the git because we adults are to busy working to babysit you.

      I don't give a rats ass what spacing you use so long as your code is consistent and clean.

    63. Re: Both? by Reverend+Green · · Score: 1

      That's what vim's :retab command is for.

    64. Re:Both? by Theovon · · Score: 1

      I would agree, but I use goto in just about every C++ program I write.

    65. Re:Both? by edtice1559 · · Score: 1

      Well if you follow my original suggestion of having the code formatted upon checkin, the local formatting changes don't matter!

    66. Re:Both? by BronsCon · · Score: 1

      I'll grant you that point. However, shouldn't we as professionals be disciplined enough to follow code format specifications for the projects we work on? Yes, we can solve the social problem by technical means, but does that actually solve the social problem, or just hide it and let it fester?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    67. Re: Both? by Your.Master · · Score: 1

      You are assuming that everybody is using the same editor (and that their diff tool is the same as their editor).

    68. Re: Both? by BronsCon · · Score: 1

      Not at all so. I personally use a multitude of editors; primarily my IDE of choice (IntelliJ IDEA), but I can (and often do) use whatever editors exist within the environment I find myself working in, which often ends up being a terminal with access to nano or vim. I use IDEA's diff tool, the POSIX diff command, git's command line diff tools, and occasionally git's GUI diff tools.

      Every single one of them assumes the width of a tab remains the same throughout a given file, because it does. If it doesn't, whoever indented with spaces did something wrong. In addition to that, every single one of them displays tab-indented code exactly as I intend for it to be displayed, properly indented and properly formatted, regardless of the tab width I have set. The only time it's a problem is when some jackhole intermixes spaces and tabs within the same file and their preference does not match my own (or they can't seem to make up their damn mind how wide an indent should be).

      The same can be said of files indented with spaces, of course, withe the caveat that the editor or tool displays space-indented code exactly as the author intended for it to be displayed, which I suppose is fine if there is and will only ever be a single author; that is, if I don't have to edit it. The same caveats apply regarding the mixing of tabs and spaces and being indecisive about the width of an indent.

      That is to say, what you and Darinbob are complaining about is only a problem when someone indents different lines in the same file with varying numbers of spaces. In other words, it's a problem inherent in using spaces for indentation, wherein people get in pissing matches over whether 2, 3, 4, 5, 6, or 8 spaces should be used; this issue and argument is avoided by simply using tabs. Period.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    69. Re:Both? by swilver · · Score: 1

      You know why I think devs that use spaces make more money?

      They're more practical, they realize this debate (and many like it) are pointless wastes of time. Instead they pick a simple option that even the newbs in your team can understand and make that the standard. Then they continue with important issues.

    70. Re:Both? by swilver · · Score: 1

      Agreed. A developer should be able to check in properly formatted code without the use of a formatter. If they can't be precise and accurate enough to do that, then how can I trust them to do anything?

    71. Re:Both? by BronsCon · · Score: 1

      Oh, yes, the "tabs vs spaces" debate is absolutely pointless, I'm not even arguing. You know what's more pointless? The "how many spaces" debate.

      The only reason the "how many spaces" debate comes up is that some people would rather not use tabs and let everyone answer that question for themselves.

      When your employer pays you for hours on end to argue amongst yourselves over the proper number of spaces to indent by, yes, you're going to make more money; the real question is whether or not you're actually earning it during those pointless arguments that could have been avoided.

      Those of us who use tabs avoid those arguments and get more work done, so we might ultimately get paid less but that's only because we bill fewe hours for the same projects because we're more productive.

      At least that's what 3 decades of experience have shown me.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    72. Re:Both? by Anonymous Coward · · Score: 0

      You may be trolling ... but to clarify the intent (in my opinion), I have to use both all the time, since I abide by a project or client's rule. I change often even with the same client (25 year + code base, with some project fresh this year).

      I have no problem using both; but tabs are easier for me, since some projects have "2 spaces" and others 4; having tabs helps me use my favorite (6 spaces haha).

  6. Only dummies and newbs argue stupid shit by Anonymous Coward · · Score: 5, Insightful

    Proof: neither side makes jack-shit as a coder

    1. Re:Only dummies and newbs argue stupid shit by JaredOfEuropa · · Score: 2

      Just you wait. I bet a PHB is reading this right now, thinking: "If those coders get paid more, they must be better. So it must be the spaces that makes them better. I should go and change our coding standards". And then demand that you actually use the space bar to produce the spaces, in case you're still sneaking tabs in there somehow.

      --
      If construction was anything like programming, an incorrectly fitted lock would bring down the entire building...
    2. Re:Only dummies and newbs argue stupid shit by avandesande · · Score: 5, Insightful

      actually a smart PHB would force everyone to use tabs and give them a pay cut

      --
      love is just extroverted narcissism
  7. $59,140 and $43,750 are the medians? by Anonymous Coward · · Score: 0

    Damn, that's starting wages for someone right out of school! Maybe I should stop using tabs AND spaces.

    1. Re:$59,140 and $43,750 are the medians? by drnb · · Score: 1

      Damn, that's starting wages for someone right out of school! Maybe I should stop using tabs AND spaces.

      Those are global averages. Keep reading and you'll see the region specific charts and numbers.

    2. Re:$59,140 and $43,750 are the medians? by freak0fnature · · Score: 1

      We had one guy right out of college demanding $80k...we didn't hire him because he was an ass...but salary.com has 49k-84k for entry level for my area.

    3. Re:$59,140 and $43,750 are the medians? by 93+Escort+Wagon · · Score: 2

      Yeah, this is heavily weighted towards S/SE Asia - and the fact that spaces versus tabs actually matters to them may say something.

      --
      #DeleteChrome
    4. Re:$59,140 and $43,750 are the medians? by lgw · · Score: 1

      Damn, that's starting wages for someone right out of school! Maybe I should stop using tabs AND spaces.

      The Big 5 pay close to 6 figures now right out of college. But the numbers in TFA are a global average.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    5. Re:$59,140 and $43,750 are the medians? by Anonymous Coward · · Score: 0

      Oh, good.

      My first thought was: "Damn, I'm glad I only program for fun and not for a living." :-P

  8. Survey says by StikyPad · · Score: 4, Insightful

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

    1. Re:Survey says by avandesande · · Score: 1

      People that have been working 10+ years at this don't take surveys.

      --
      love is just extroverted narcissism
    2. Re:Survey says by bobbied · · Score: 1

      At least not in this country... In some places $50K is good money...

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re:Survey says by __aaclcg7560 · · Score: 1

      At least not in this country...

      Median household income in the US is $57,616 in 2016.

      https://en.wikipedia.org/wiki/Household_income_in_the_United_States

    4. 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.

    5. Re:Survey says by HornWumpus · · Score: 1

      CA median is over 60k$.

      Si Valley median is over 90k$

      In 2013, certainly higher now. That's median for everyone, competent techs should be north of that number.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    6. Re:Survey says by __aaclcg7560 · · Score: 1

      That's median for everyone [...]

      Median means that half make less and half make more. It doesn't mean everyone makes the median.

      [...] competent techs should be north of that number.

      Entry-level tech jobs in Silicon Valley starts off at minimum wage ($10 per hour/$20K per year).

    7. Re:Survey says by HornWumpus · · Score: 1

      Show me one job listing looking for techs in SI valley at $10/hour? Geek squad pays better and has no competent employees.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    8. Re:Survey says by Dog-Cow · · Score: 1

      Most developers live in neither place, you stupid ass-wipe.

    9. Re:Survey says by __aaclcg7560 · · Score: 1

      Show me one job listing looking for techs in SI valley at $10/hour?

      Dell techs who have to drive 200+ miles per week. Those positions are typically available between $10 to $15 per hour. Prior to the last minimum wage increase or two, Dell paid $7.50 per hour.

      One small company I interviewed for in 2014 tried to talk me down into accepting a position at $10 per hour. Since my name was similar to another employee, the recruiter accidentally sent me the salary spreadsheet. All the techs were making $10 per hour.

      Geek squad pays better and has no competent employees.

      They can't be making that much if they're also on the government payroll.

      https://yro.slashdot.org/story/17/05/31/219209/eff-sues-fbi-for-records-about-paid-best-buy-geek-squad-informants

    10. Re:Survey says by Anonymous Coward · · Score: 0

      And I live in Europe.
      Maybe it just means that americans use spaces and others use tabs.

    11. Re:Survey says by Solandri · · Score: 1

      Yeah, my hunch is in a true survey of all programmers, it's the tab-users who make more money. Tabs are a relic from the old typewriter days, so older programmers are more likely to use them. And older programs tend to make more money.

      Tabs worked great on typewriters because they were a fixed size (there was a mechanical stop you could move along notches to set the tab stop length). But when computers came out, they failed to standardize the number of spaces in a tab. So tabs turned into a hindrance which would make code display differently on different computers. I loved tabs on typewriters, and used them extensively on my first computers (for writing reports - before all this networked sharing of files began). But once I had to share what I wrote in software format with others, I switched to using spaces. I only use tabs in Word, which retains the old typewriter ability to manully set the amount of indentation you get from a tab.

    12. Re:Survey says by bobbied · · Score: 1

      Computer techs and programmers are NOT interchangeable... I would imagine their salary requirements are not the same either.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    13. Re:Survey says by bobbied · · Score: 1

      At least not in this country...

      Median household income in the US is $57,616 in 2016.

      https://en.wikipedia.org/wiki/Household_income_in_the_United_States

      We are discussing programmers, which, if you bother to check median salaries for you'd find is well above the national median.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    14. Re:Survey says by __aaclcg7560 · · Score: 1

      Computer techs and programmers are NOT interchangeable...

      The bottom half of IT is techs, the top half of IT is programmers. You can't have one without the other.

      I would imagine their salary requirements are not the same either.

      Bottom half, bottom rates. Top half, top rates. I'm always amused when someone tells me that I should be making $120K+ per year after 20+ years. The problem is I don't work in the top half of IT. I'm a tech, not a programmer.

    15. Re:Survey says by Anonymous Coward · · Score: 0

      They can't be making that much if they're also on the government payroll.

      I made 13 at geeksquad in the middle of nowhere in the midwest 15 years ago. The same shop pays 20 today.

      Silicon Valley must be a shitehole.

    16. Re:Survey says by swillden · · Score: 3, Insightful

      Yeah, my hunch is in a true survey of all programmers, it's the tab-users who make more money. Tabs are a relic from the old typewriter days, so older programmers are more likely to use them. And older programs tend to make more money.

      It's the other way around. Old programmers worked on systems where the size of a tab was fixed at 8 spaces and could not be changed. Since 8-space indentation is way too much, they used either a mix of tabs and spaces to get the right indentation level, or spaces only. And then when we all started to get editors with configurable tab sizes, the mixed solution resulted in an unholy mess which was most easily fixed by standardizing on spaces only.

      And old programmers tend to make more money, so money is correlated with spaces-only indentation.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    17. Re:Survey says by sbaker · · Score: 1

      The thing is, TFA says that they controlled for years of experience - and the phenomenon didn't go away.

      They also controlled for a bunch of other effects such as which language is used, what field they worked in, what country they lived in....this makes no sense, other than (somehow) people who use spaces are somehow better programmers.

      The other astounding thing is the HUGE magnitude of the effect. If it was only (say) a thousand dollars different - we'd be laughing this up and calling it a statistical anomaly...but this is EIGHT PERCENT of people's salaries.

      It really doesn't make sense.

      We need to get some industrial-strength statisticians on this - the kind of statisticians who indent their tables with spaces!

      --
      www.sjbaker.org
    18. Re:Survey says by PIBM · · Score: 1

      Interns get > 90k a year or > 45 USD / hour as a starting salary. You are doing it wrong.

    19. Re:Survey says by __aaclcg7560 · · Score: 1

      Obviously, I'm not a programmer.

    20. Re:Survey says by Spacelem · · Score: 1

      When I open up someone else's code, and I find the indentation isn't quite what I find comfortable, I can easily change the tab size and everything magically appears the way I like it. With spaces I have to manually reindent everything to look right.

      Sorry, as far as I'm concerned, it's spaces that are the unholy mess, not tabs. Unless you're talking about right-aligning comments after code, but frankly that's a mess no matter how you try it. At least with tabs the comments line up 3/4s of the time.

    21. Re:Survey says by 50000BTU_barbecue · · Score: 1

      Do you want to be? You talk a lot about programs you write.

      --
      Mostly random stuff.
    22. Re:Survey says by Anonymous Coward · · Score: 0

      Creimer is always "going to be" something - next year. Or in two years. He's been claiming for at least 3.5 years that he's studying for his Security certifications which will allow him to command 100K+ according to his claims here.

      Yet, he still keeps talking about how he's just about to start studying for the certs. The problem is this: he talks a lot about how he's on track for everything to be amazing, but he doesn't DO the things he needs to do to make that amazing stuff happen.

      So, he'll keep talking about how he's "learning python," by writing a script that scrapes his slashdot shit-posting history. He'll keep talking about how he's "studying for his certifications" in InfoSec. He'll keep talking about how he's working out, and eating 1500 calories a day. But he'll never actually FINISH his python program, or his InfoSec certifications, or achieve his goal weight. Because he's creimer.

    23. Re:Survey says by 50000BTU_barbecue · · Score: 1

      Well, you can write programs at home and not be a professional programmer. I guess that's all he said.

      --
      Mostly random stuff.
    24. Re: Survey says by Anonymous Coward · · Score: 0

      You really ought to stop raping goats. Your neighbors are complaining about the smell.

    25. Re: Survey says by Anonymous Coward · · Score: 0

      Not the noise? Good. The gag works. But where do you get this goat stuff in response to these posts? It's not clever or funny... or really meaningful in any way.

    26. Re:Survey says by hawk · · Score: 1

      more bluntly, the finding is "Coders not smart enough to configure vim make less than those that do." :)

      hawk

  9. 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
    1. Re:Of course they earn more! by Anonymous Coward · · Score: 0

      Corollary: They appear to be working longer and appear to be more dedicated to their jobs.

      Tabbers are lazy people who don't want to work.

    2. Re: Of course they earn more! by JoeyRox · · Score: 1

      Modern editors have an amazing feature which automatically inserts spaces whenever you hit the tab key.

    3. Re:Of course they earn more! by Anonymous Coward · · Score: 0

      You know what's scary...some HR type is going to read about this and ...you can guess the rest...

    4. Re: Of course they earn more! by Anonymous Coward · · Score: 0

      We can hit the space bar 4 times while you are still searching for the TAB key!

    5. Re: Of course they earn more! by Anonymous Coward · · Score: 0

      Do they have a feature to automatically go "whoosh" too?

    6. Re: Of course they earn more! by Anonymous Coward · · Score: 0

      Do they have a feature to point out humor or sarcasm on the web?

    7. Re: Of course they earn more! by lgw · · Score: 1

      Do they have a feature to automatically go "whoosh" too?

      I'm sure EMACS does. I think it's quadrupal-buckey-shift-Q. No, wait, that's left bracket.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    8. Re: Of course they earn more! by Anonymous Coward · · Score: 0

      Modern editors have this amazing feature where they automatically indent when you hit a curly brace.

      And by modern, I mean "every editor I've used since 1987".

    9. Re: Of course they earn more! by Anonymous Coward · · Score: 0

      This. I'd say my first 10 years of dev I used tabs because I was lazy, but then I would inevitably run into alignment issues when switching between various editors so I switched to spaces, but it was such a waste of time hitting the space bar multiple times so now I use tab that is automatically converted to spaces!

    10. Re:Of course they earn more! by Anonymous Coward · · Score: 0

      The basic reason is junior developers think tabs are good but after a number of years of loading old files and seeing how tabs get everything screwed up on screen they switch to preferring spaces.

    11. Re:Of course they earn more! by Anonymous Coward · · Score: 0

      Why don't you just use vim over Emacs while you're at it, Winnie!

    12. Re:Of course they earn more! by Anonymous Coward · · Score: 0

      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.

      I think the only idiot here is the one that doesn't realize this isn't a conversation about which key you are using, but how it's encoded. You can set any reasonable editor to use 4 SPACES on a tab keystroke.

    13. Re:Of course they earn more! by martinfb · · Score: 1

      They are SALARIED, not HOURLY! SPACES per hour do not matter!

      Yet, that is mildly humorous!

      --


      Self-importance and self-indulgence is the root of ALL evil.
  10. That's because by Anonymous Coward · · Score: 0

    if you create more code you did more work. Using spaces is basically creating 4-8 times as many code as with tabs

  11. If characters matter... by Anonymous Coward · · Score: 0

    I am going to try adding a 0 to the end of all my lines and see if it increases my salary 10-fold.

  12. Do you have a choice? by godamntheman · · Score: 1

    You're supposed to adopt to the coding style of the project you're working on.

    1. Re:Do you have a choice? by PmanAce · · Score: 1

      4 spaces or a tab (set to indent 4 spaces) is the same thing, resulting in the same coding style no?

      --
      Tired of my customary (Score:1)
    2. Re:Do you have a choice? by bobbied · · Score: 1

      THIS!

      Personally, I don't care about tabs verses spaces, it doesn't make much of a difference to me.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    3. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      Emacs users had to be removed from the sample because of their cluster dissolving non-publishable nature.

    4. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      The group I work with has adopted 3 spaces. I have no idea why. It's probably some sick compromise. Does anyone else know of coding standards that use 3 spaces?

    5. Re:Do you have a choice? by __aaclcg7560 · · Score: 1

      Personally, I don't care about tabs verses spaces, it doesn't make much of a difference to me.

      Unless you Python and get the two mixed up in the same file. That's why your text editor or IDE should have tab set to four spaces.

    6. Re:Do you have a choice? by MightyYar · · Score: 1

      The problem is you don't know what everyone's indent has been set to. I work with files that have tabs that were clearly set to 2, 3, 4, and 8 spaces. I favor 2, but don't really care one whit. If the file uses tabs, I use tabs - if the file uses spaces, I use spaces. My editors all handle this just fine (sometimes with a manual tweak). However, if the file is already a mix of tabs and spaces, then I go with spaces. My OCD would like to change them, but that makes the diff tools show waaaaaay too many changes. Don't poke a crusty turd.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    7. Re:Do you have a choice? by isj · · Score: 1

      [3 spaces]

      I seem to recall that the C examples that came with MS QuickC used an indentation 3. It is the only time I have encountered that in C/C++ code.

    8. Re:Do you have a choice? by godamntheman · · Score: 1

      Yes, all VMware projects use 3-spaces.

    9. Re:Do you have a choice? by lpq · · Score: 1

      You're supposed to adopt to the coding style of the project you're working on.

      Which always seems to be set before you got there.

    10. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      Which is why you shouldn't use python.

    11. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      I use Visual Studio all day long. I prefer tabs. Alt-E,V,T is Edit > Advanced > Tabify Selected Lines. It takes no time at all. For those that take the other side of the holy war, Alt-E,V,B does the opposite and takes a similar amount of time.

      And the diff tool built into VS hasn't compared whitespace since I don't remember when. TFS will still take whitespace changes, but I honestly don't care that much.

      And I make more than their median for either group, and I live in "flyover country". My point being that their study is poorly constructed (self-reporting is unreliable) and if you have problems with tabs vs. spaces, you're either doing it wrong or you're using poor-quality tools that don't handle trivial crap like that for you. Seriously, it's 2017, why is this even an issue, much less a holy war?

    12. Re:Do you have a choice? by bobbied · · Score: 2

      Still, it doesn't matter to me, only to the python parser....

      BTW.. Any language that puts requirements on white space (like python) are bad ideas... That stuff when out of style a LONG time before even I started this software engineering thing 25+ years ago and there are good reasons for this.

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    13. Re:Do you have a choice? by __aaclcg7560 · · Score: 1

      Any language that puts requirements on white space (like python) are bad ideas... That stuff when out of style a LONG time before even I started this software engineering thing 25+ years ago and there are good reasons for this.

      I guess someone didn't get the memo when Python came out in 1991 (26 years ago).

    14. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      We use 3 as our company defined standard. Also not sure if it was done as a compromise or someones personal preference but even before these standards were written up in their current form most people in the company used 3

    15. Re:Do you have a choice? by bobbied · · Score: 1

      It's still out of style these days....

      --
      "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
    16. Re:Do you have a choice? by Anonymous Coward · · Score: 0

      I once knew a programer who used 1 space indent for everything. I can spot his code from a mile away without understanding any of it, just by looking at his indentation and variable naming.

  13. That's because they get paid by the character by JoeyRox · · Score: 5, Funny

    Using spaces increased my earnings by 4x over tabs.

    1. Re:That's because they get paid by the character by Anonymous Coward · · Score: 0

      Poor young devs today.

      You only get 4x pay for using spaces over tabs but I get 8x because I started in the 90s and I had a gullible boss.

    2. Re:That's because they get paid by the character by maglor_83 · · Score: 1

      I use a 16 character indent. Cha-ching!

  14. Editor by Slalomsk8er · · Score: 2

    I press tab but the editor inserts whatever the project requires. Did the question account for this?

    1. Re:Editor by MightyYar · · Score: 1

      Haha, yup. This. Don't sweat the small stuff.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
  15. Do I really need to say it? by Kierthos · · Score: 1

    Correlation is not causation.

    --
    Mr. Hu is not a ninja.
    1. Re:Do I really need to say it? by ndnet · · Score: 1

      Thank you for saying it so I don't have to. Good grief, even the article says it... but only in the last paragraph.

    2. Re:Do I really need to say it? by beelsebob · · Score: 1

      Yep, I'd be willing to take a bet on what the actual causation here is.

      Large tech companies employ a lot of people, and pay a lot of money.
      Most large tech companies use the WebKit style guide.
      The WebKit style guide says to use spaces, not tabs.
      Thus, most people who are getting paid big money are working at a shop that asks them to use spaces.

    3. Re:Do I really need to say it? by JoeRobe · · Score: 1

      How about this (no clue if this is reasonable):
      1) older programmers use spaces, younger use tabs.
      2) older programmers have more seniority leading to higher salary (even if their job title doesn't change).

      ---> programmers that use spaces make more money.

      I work at a company for which the above would be correct, but I'm not a programmer so I don't know if programming positions are similar (increases in pay with seniority while maintaining job title).

      --
      The best way to predict the future is to invent it.
    4. Re:Do I really need to say it? by glenebob · · Score: 1

      Close, but I doubt it has much to do with Webkit. Tabs work great for projects with one developer. Tabs generally seem to turn into a cluster fuck when there's any kind of diversity in the team. Large tech companies means large teams. Tabs mean war in big teams.

    5. Re:Do I really need to say it? by msauve · · Score: 1

      Unless they're getting paid by the character, that is.

      --
      "National Security is the chief cause of national insecurity." - Celine's First Law
    6. Re:Do I really need to say it? by Anonymous Coward · · Score: 0

      It's a neat idea, but I think you'll find that older programmers are more likely to use tabs. Back in the day, we didn't have the tabs vs spaces war. Everybody just used tabs, and we liked it. It really only takes 2 minutes to learn to use them properly. The teams were usually small and consisted of disciplined professionals. We didn't have modern editors that automatically converted a tab into spaces in the file, and then spaces back to tabs in the editor.

      Nobody suggested using spaces for alignment until wide-spread collaboration with both professionals and amateurs across the world became common.

      At least, that's been my experience.

    7. Re:Do I really need to say it? by lgw · · Score: 1

      It's a neat idea, but I think you'll find that older programmers are more likely to use tabs. Back in the day, we didn't have the tabs vs spaces war. Everybody just used tabs, and we liked it.

      Kids these days. I'm my day, the keyboard didn't have a tab key, and no insert either! If you wanted to indent more you typed the line over again!

      That's mostly true, BTW. I think there was a tab key, but it didn't do anything useful, and you had to do something really elaborate to shift a range of characters left or right. The bad old days of mainframe coding.

      --
      Socialism: a lie told by totalitarians and believed by fools.
  16. Self explanatory really. by Dishevel · · Score: 1

    Some developers have more space to hold money, and TAB, when you can even find it is expensive.

    --
    Why is it so hard to only have politicians for a few years, then have them go away?
  17. At only 43k you can't afford extra key strokes by Anonymous Coward · · Score: 0

    But seriously, the causation might go in the other direction?

    Entry-level web developers with a 4-year degree get over 60k, and these sorts of offers have to be made after barely confirming a pulse much less any keyboard skills. I could imagine they don't know what a tab character is since there isn't really much use for one on a smart phone and tabs versus spaces don't really render differently in your typical web page.

    To be accepting 43k in this decade, I imagine the hiring environment might be so regressive that you also had to use punch-cards in your school work.

  18. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    If you're using two spaces, you probably work at Google. Do they dock your pay for using extra spaces?

  19. Does the salary data account for beer expenses? by Anonymous Coward · · Score: 0

    If the salary data is based on after-beer costs, then of course those using tabs are going to be worse off...

  20. Did they take language into account? by RobinH · · Score: 3, Interesting

    I'd think that space vs. tab use is highly dependent on which programming language you're using, and I'd also think that language is correlated with earnings, so I highly doubt this conclusion (if they're trying to conclude anything). Correlation is not causation.

    --
    "I have never let my schooling interfere with my education." - Mark Twain
    1. 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?

    2. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      I use both spaces and tabs, but I still can't earn any money, I don't understand why. Is it because of the programming language? https://en.wikipedia.org/wiki/Whitespace_(programming_language)

    3. Re:Did they take language into account? by houghi · · Score: 0

      Also interested to see years experience and age. Perhaps older and thus more expensive coders use spaces, while people who are younger and/or have less experience use tabs.
      This could be on how they learned things and that could have changed.
      It does not even mean that spaces is better than tabs. It could even be that those who use tabs earn more compared to spaces when they have the same experience, because they are more interested in efficiency and thus produce better code and thus get better payment.

      Or it could mean that people who use spaces are more interested in money than those who use tabs who are interested in neat code.

      Or it could mean absolutely nothing at all.

      --
      Don't fight for your country, if your country does not fight for you.
    4. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      https://en.wikipedia.org/wiki/Whitespace_(programming_language)

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

      Yes, they did take it in to account. That's why you'll want to read the article before commenting.

    6. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      Have you ever heard of clicking on a link?

      No, I tab until the proper link is selected then press space to activate said link. That's the best way to maximize your income. Only the poor click on links.

    7. Re:Did they take language into account? by Darinbob · · Score: 1

      I couple reasons I think. First, those who have experience have encountered the tabs vs spaces headaches before. Those with less experience may have only used a few languages, have used fewer tools.

      Second, someone who favors precision will tend to favor a space over a tab. People favoring precision tend to get ahead in programming and engineering jobs compared to those who don't mind slack.

    8. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      This is slashdot 99% of the links go to click bait articles full of adverts and malware on sites I'd never visit. So I never click through to the article until someone posts a safe version. Its a shame people have stopped posting text mirrors threads these days.

    9. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      I know Python is in fashion this decade and it uses tabs as part of its sintaxys, using spaces instead of tabs and the script will not run... It tries to enforce "beauty code".

    10. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      This. Fortran for example doesn't support tabs, requiring that you indent using spaces.

    11. Re:Did they take language into account? by Anonymous Coward · · Score: 0

      Have you ever heard of clicking on a link?

      You must be new here.

  21. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 1

    I'm going to start using 8 spaces indentation and ask for a raise (i'll report back about how it goes)

  22. Irrelevant. by Anonymous Coward · · Score: 0

    One thing has nothing to do with the other.

  23. Re:I use spaces but indent by 2 spaces rather than by beelsebob · · Score: 1

    No, what it means is that the major tech companies that employ a lot of people, and pay a lot of money all have coding guidelines that say to use spaces.

    I know for a fact the two very big ones use WebKit's style guide as a basis for most of their work, and that it asks you to use spaces.

  24. Reindent by kcdoodle · · Score: 1

    All of my editors do it for me.

    I used to be religious about using a 2 space indent, but I no longer program in Python, so, now, who gives a flip?

    Now I just want my code to look good. In Visual Studio, I do Ctrl-A, Ctrl-K, Ctrl-F, and I don't even know if it does tabs or spaces, and I don't care.

    Also, I agree that those surveyed are incredibly underpaid.

    --

    - I live the greatest adventure anyone could possibly desire. - Tosk the Hunted
    1. Re:Reindent by Anonymous Coward · · Score: 0

      ctrl-e, d

  25. Apps use fingers by Anonymous Coward · · Score: 0

    I use only fingers to develop Appy apps !

  26. How about comments? by bobbied · · Score: 1

    Anybody dare try a study about in code comments and Salary levels?

    My guess is you will see the same difference between Emacs and VI users...

    --
    "File to fit, pound to insert, paint to match" - Aircraft Maintenance 101
  27. Who are the people on the graph using both?!? by Gumbercules!! · · Score: 1

    I use tabs and I understand some people prefer spaces but what kind of hybrid-hell-beast uses both??

    1. Re:Who are the people on the graph using both?!? by Kvan · · Score: 1

      If I'm working on an existing codebase I use whatever that uses, and if I'm writing something from scratch I use whatever's the default for the editor I'm using.

      --

      "A *person* is smart. People are dumb, panicky, dangerous animals and you know it."
      - 'K' in Men in Black.

    2. Re:Who are the people on the graph using both?!? by MightyYar · · Score: 1

      I work on several projects with hundreds of different contributors. I just use whatever is there (sometimes within the same file!). So count me as "both" - though I prefer 2 spaces in general. I have to admit using a lot of 4 spaces in Python since that's what the editors seem to default to and it looks nice.

      --
      W..w..W - Willy Waterloo washes Warren Wiggins who is washing Waldo Woo.
    3. Re:Who are the people on the graph using both?!? by Wraithlyn · · Score: 1

      People that work with multiple file formats?

      For instance YML specifies that spaces must be used.

      Either way, everyone should be using .editorconfig these days.

      --
      "Mind, as manifested by the capacity to make choices, is to some extent present in every electron." -Freeman Dyson
    4. Re:Who are the people on the graph using both?!? by Gumbercules!! · · Score: 1

      Ok everyone - it was a joke...

    5. Re:Who are the people on the graph using both?!? by Misagon · · Score: 1

      There could be many explanations:
      * GNU style formatting of block statements put braces on their own lines, indented half-way.

      * Respondents refer not to left-side indentation but to how they line up comments, member names, parameters etc. This can be fidgety when using tabs only (unless you are using elastic tabs) and using spaces for this would make it independent of tab size.

      * Other things indented half-way: Preprocessor statements, labels, etc. Indenting of #ifdef's around code become independent of the code it surrounds, switch-case statements don't become so deep. You could also argue that classes (and functions...) become more readable.

      --
      "We mustn't be caught by surprise by our own advancing technology" -- Aldous Huxley
    6. Re:Who are the people on the graph using both?!? by locofungus · · Score: 1


      <tab>this line...........//1 tab, 9 characters, 11 spaces to comment
      <tab><tab>new level......//2 tabs, 9 characters, 6 spaces

      Indenting only works when you have a fixed space (5 in this case) tab width.

      Even if you decide to deny the ability to line up comments across different indent levels, I've not come across an editor that can correctly insert tabs and spaces into the blank line you add to get across to the RH side to continue your comment.

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  28. And the smart ones by oshkrozz · · Score: 1

    Use Notepad++ and just convert all the Tabs to 4 spaces so they get paid more and work less ...

  29. 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.

    1. Re:Eclipse serializes with spaces or tabs by Anonymous Coward · · Score: 0

      Indeed. The default in VS is to use spaces as well.

    2. Re:Eclipse serializes with spaces or tabs by Darinbob · · Score: 1

      So salary difference dividing up those who use default settings (almost always tabs for some bizarre reason) versus those who go through and learn how their tools work and how to get the most out of them.

    3. Re:Eclipse serializes with spaces or tabs by Anonymous Coward · · Score: 0

      Every dev I know knows whether their files are being filled with spaces or tabs, that's for fucking sure.

  30. Charming and fun, but not informative by TimothyHollins · · Score: 2, Insightful

    Let's say that using spaces was taught in the 70s, while tabs was taught in the 80s.

    Now let's say we ask people for their style and their income. The older programmers that by now make more money will say they use spaces, while the younger programmers will say tabs. This would account for the differences.

    In short, this survey isn't providing enough data to control for any factor, and the likelihood that tabs and spaces actually impact the earnings of any programmer is 0.

    Also, any programmer that uses spaces is going to Hell (which runs Windows ME on the user machines)

    1. Re:Charming and fun, but not informative by HornWumpus · · Score: 1

      At these Salaries? The explanation is that only newbies answered the poll.

      The tab/space 'debate' has been going on so long that 'tabs produce smaller files' was once a valid argument.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    2. Re:Charming and fun, but not informative by angel'o'sphere · · Score: 1

      UCSD Pascal on Apple ][ runlength encoded the indentation.
      That actually really saved quite some space.

      --
      Cost free eBook I read (by iBook/Kobo/Amazon/ObookO/Gutenberg etc.): "The Green Odyssey" by Philip Jose Farmer.
    3. Re:Charming and fun, but not informative by HornWumpus · · Score: 1

      Damn, we're old...I remember that.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    4. Re:Charming and fun, but not informative by Darinbob · · Score: 1

      I started int he 80s. The vi editor default settings would change some spaces to tabs automatically, giving the same layout but conserving a few characters. This was in the days of not having manuals handy and certainly no built in help. So I had noticed this but didn't know how to fix it, but being a noob I didn't worry about it. Until I had to use Occam which used indentation for structure (later borrowed by Python), so when vi converted the spaces to tabs it would cause compilation errors. At that point I had to make a major effort to get some documentation about how to configure things to stop doing that.

      My guess at the time was that in the 70s it was more important to save characters and thus tabs were preferred (witness the sheer sparseness of comments and short variable names in Unix source). Back then a tab stop was almost always meant 8 characters, especially since any change would mean your printouts would come out wrong.

    5. Re:Charming and fun, but not informative by Anonymous Coward · · Score: 0

      > Let's say that using spaces was taught in the 70s, while tabs was taught in the 80s.

      In the 70s most coding was done by writing on coding sheets and sending these to the punch room where it would be turned into 80 column cards (or sometimes 128 col cards or papertape). The card punches had a format card that specified the tab stops suitable for the particular job. For COBOL this may be set to columns 7,8,12,16,20,24,..,73. Pressing the tab key left spaces on the card.

      The 'tab' key comes from typewriters which never used a tab character, that came from teletypes where bandwidth saving was useful.

      Tab characters need to be expunged from all files.

  31. Space bar vs tab key by drnb · · Score: 1

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

    I read some of the comments expecting amusement, I was not disappointed. One specifically thought spaces-favoring developers were using the space bar rather than the tab key.

    1. Re:Space bar vs tab key by gweihir · · Score: 1

      That would indicate that the dumb ones are on the side of the tab. Maybe they do not even know how indention using spaces works or that a sane editor does most of it automatically.

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
  32. How much money... by AC-x · · Score: 1

    How much money do developers who let their damn IDE do the indenting for them make? :)

    1. Re:How much money... by Anonymous Coward · · Score: 0

      Letting the IDE do it: You much, much more, since it indicates superior intellect and efficiency. I make about $300,000 pa. With a sample size of 1, that must be a holy truth for everyone.

      (It is of course also possible that the really, really shit place I work in has something to do with it. The temperature today was 48 Celsius again. My eye balls are boiling when I go outside.)

    2. Re:How much money... by Tailhook · · Score: 1

      Good question. Not 100% sure I'd notice what some of the tools I use are doing wrt spaces vs. tabs. If a good formatting tool is available I will NOT manually format code. Don't care how unfortunate the result is; bang on the 'format source code' key and stop thinking about it. I don't think any one of webstorm, qtcreator, visual studio, vscode or netbeans are using tabs, but as I said; it's possible I might not notice if they did. The one thing I can affirm with metaphysical certitude is set ts=4;set sw=4;set expandtab.

      --
      Maw! Fire up the karma burner!
  33. I write ... by PPH · · Score: 1

    ... obfuscated C. What's white space?

    --
    Have gnu, will travel.
    1. Re:I write ... by Anonymous Coward · · Score: 0

      It's that stuff you insert to ensure things line up so your ascii smiley face looks right.

  34. 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.
    1. Re:Alternate interpretation of the data by Anonymous Coward · · Score: 0

      Or, programmers who use tabs are more likely to lie in their tax return

    2. Re:Alternate interpretation of the data by Anonymous Coward · · Score: 0

      Or: Programmers who are allowed to use tabs like their job so much that they care less about the money.

  35. Bad Statistics. by jellomizer · · Score: 1

    There is a lot of questions out there, that these numbers don't seem to show.
    1. Which languages do they use primarily. Python for example while can handle tabs, your code needs to be consistent so using spacing is better. Normally you also set the IDE to replace tab with spaces. Other languages that don't care about white space may allow tabs and spaces to be mixed.
    2. What type of projects are they working on. Larger projects with mutable developers need to keep their coding style more or less synchronized. Space intents are normally preferred as tab spacing will be inconsistent across system settings.
    3. Is this based on code review. If so, does the IDE just replace Tabs with spaces.

    I myself am normally will follow the Tab key, with the IDE replacing it with spaces. As the Tab takes one keypress and makes jagged ends often move to the correct tab point (Still an IDE thing)

    --
    If something is so important that you feel the need to post it on the internet... It probably isn't that important.
  36. cause vs correlation. by fish_in_the_c · · Score: 1, Insightful

    This is probably an excellent example of where cause and correlation are not the same thing.
    Here is my suspicion, as an old programmer. The REASON why spaces are encourage over tables is for consistency of printing on a physical paper.
    Which is unimportant or irrelevant if you are not. a) doing code reviews where you are passing out dead tree copies like may have been done 10 to 15 years ago OR b) submitting source code formatted on word docs as some part of documentation to a customer as government contractors are some times required to do.

    SOOO.... my hypothesis is that most people who regularly used spaces and were trained when it matters are either senior developers ( who tend to make more money) or working in government contracting, thus being the cause of the correlation noticed in the study. Of coarse without gathering enough data to control for the those variables you cannot have certainty of the answer. The original post doesn't include age of developer in it's data set as near as I can see , which to me is a obvious omission if you want to actually say anything useful about salary vs habits as many habbits will track with 'when' you trained.

    --
    âoeTolerance applies only to persons, but never to truth. Intolerance applies only to truth, but never to persons.
    1. Re:cause vs correlation. by Baron_Yam · · Score: 1

      >Here is my suspicion, as an old programmer. The REASON why spaces are encourage over tables is for consistency of printing on a physical paper.

      Not just. I tend to use tabs because hey, 5 spaces for one key press, and also because it aligns non-proportional fonts.

      However, MS SQL is inconsistent in its rendering of tabs. If I copy code from a script window to a SQL Agent job, everything looks like garbage... so sometimes spaces win out.

      I suspect a good part of the spaces vs. tabs debate ignores what environment the developer is working in.

    2. Re:cause vs correlation. by Anonymous Coward · · Score: 0

      There are other reasons.
      For example, enforcing a "no tabs" rule on a project is trivial, good luck enforcing a "no spaces" rule.
      Allowing tabs usually ends up with files becoming an unholy mess of tabs and spaces, such that your indentation ends up 1 space, 1 tab, 5 spaces, 1 tab or such atrocities. It gets even funnier if it's python code and your code then actually does something completely different from what it looks to do (python and especially pylint help and catch most issues, but not necessarily all).
      In theory there are tools and editors etc. that should help you avoid that, but in practice in even a medium-sized team there will be always someone who can't be bothered.

    3. Re:cause vs correlation. by Anonymous Coward · · Score: 0

      I enforce a no tabs or spaces rule in Python.

    4. Re:cause vs correlation. by kiminator · · Score: 1

      There may also be policies related to use of spaces vs. tabs at the specific companies people work for. For example, Google's C++ style guide requires using spaces for indentation.

      My experience has been that spaces are markedly superior to tabs in shared projects, for the reason that different developers are likely to have different editor settings. If I write some code, I might not realize at the time of writing that I've accidentally mixed some tabs and some spaces. But the moment I send the code to somebody else who uses a different editor with a different tab setting, that code will have weird formatting. And even if the original author was consistent about using tabs everywhere, a different tab setting would make lines end at different locations, potentially making for odd line breaks.

      I'd be willing to bet that this consistency argument makes it so that companies working on large codebases with lots of developers are more likely to require use of spaces than not, and they probably also have higher salaries.

  37. Holy War by Anonymous Coward · · Score: 0

    For true "Holy War" status it must compare salaries of vi vs. emacs users.

  38. 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.
  39. Hey you kids! by Anonymous Coward · · Score: 0

    Get off of my white space and take your TAB cola with you!

  40. Principles by bill_mcgonigle · · Score: 1

    Sure, if you sell your soul to the devil you can make a ton of money working for the Banksters or the Military Industrial Complex.

    Am I late for the holy war?

    --
    My God, it's Full of Source!
    OUTSIDE_IP=$(dig +short my.ip @outsideip.net)
  41. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 0

    Well, I do use two spaces, and I make no money at all. No idea what I'm doing wrong, if it isn't the spaces!

  42. Why not make it a default? by WDot · · Score: 1

    If spaces are so great, why not make it more of a default in text editors and IDEs? When I get a new machine or start using a new tool, I might write a whole bunch of code using the default tabs, then realize that my Python interpreter complains about mixing tabs and spaces.

    1. Re:Why not make it a default? by QuietLagoon · · Score: 1

      ... Python interpreter complains about mixing tabs and spaces....

      Really? I had heard a lot of good things about Python. But if it get confused when spaces and tabs are used interchangeable, that's pretty bad.

    2. Re:Why not make it a default? by Rockoon · · Score: 1

      Yes. Python is basically the edge case of white space in programming. I dont know why it is that they thought that it would be a good idea to ride on the edge case. Its never a good idea to ride on an edge case.

      --
      "His name was James Damore."
    3. Re:Why not make it a default? by itsdapead · · Score: 1

      But if it get confused when spaces and tabs are used interchangeable, that's pretty bad.

      I think that's by design to punish anybody who deviates from whatever the One True Indentation Style is this week. I'm only surprised that Python 2 doesn't require tabs and Python 3 spaces.

      Any good thing said about Python comes from a person who can't see any problem with significant white space and never read the 20th Century "Thompson & Richie admit than Unix was a practical joke" email (in which significant whitespace in makefiles was "evidence").

      Tried Python once - gritted my teeth and decided to get over the whitespace thing, flipped a coin to get over the whole "Python 2 or 3" thing... started on a little project... needed XML DOM and XPATH libraries so looked around and found about 4 half-written subsets plus a long argument about how DOM could be implemented in a truly "pythonesque" fashion - gave up and went back to another well-known scripting language beginning with a 'p' (tm) that is admittedly a pile of festering shit in terms of elegance and purity, but which offered bindings for the ubiquitous Apache XML libraries and thus got the job done.

      Admittedly, that was years ago. so maybe they've found a way of implementing that particular requirement in a way that won't alert the Spanish Inquisition to break out the Comfy Chair. Maybe they've even sorted the "3rd Version of Python vs. Python Version 2" schism. Since all the evidence suggests that some people have managed to write substantial software in it, I might give it another spin someday, but my general feeling is that its just gratuitously different from C-descended-or-inspired syntax the sake of it.

      It does have the advantage that it's not (AFAIK) indentured to Microsoft (C#), Apple (Swift), Oracle (Java) or Google (what day is it?) and doesn't promote mono-paradigm zealotry, so it might be a good choice for teaching principles.

      --
      In a survey of 100 programmers, 111111 thought that duck-typing was a good idea.
    4. Re:Why not make it a default? by Anonymous Coward · · Score: 0

      Indentation in Python is syntactic. It's how lexical scope is expressed. It matters to the compiler, not simply to the human reader of the code. To that end, it must make a choice about exactly how indented a line is. That requires an interpretation of the equivalent number of spaces to a tab, but depending upon the programmer's editor they may not match. Should 9 spaces mean the same as 8 spaces and a tab, the same as 7 spaces and a tab, the same as 6 spaces and a tab, etc So it's really a bad idea to try to mix spaces and tabs when writing Python.

    5. Re:Why not make it a default? by QuietLagoon · · Score: 1

      ... Indentation in Python is syntactic. It's how lexical scope is expressed. ...

      OK, thanks for the explanation. It is worse than I had thought.

  43. Low Salaries? by Anonymous Coward · · Score: 0

    Anyone else find the salaries rather on the low side?

  44. 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 whoever57 · · Score: 1

      One space or two after a period?

      The question is another example of why you should be using tabs.

      Obviously one space is the right answer: the tool should provide the appropriate spacing without the user having to hit another key. If you need to hit space twice, then your tool is deficient.

      Similarly, tabs allow better control of indentation without the need for either the user or the tool to insert multiple characters.

      --
      The real "Libtards" are the Libertarians!
    2. Re:The real question... by Anonymous Coward · · Score: 0

      There isn't even a question, DIN 5008 clearly says one.
      What, your national standards organization doesn't have a standard on that?

    3. Re:The real question... by Tihstae · · Score: 1

      One space or two after a period?

      Sorry wrong crowd :P

      (and don't you heathens dare say one)

      It is two when using a typewriter. :-)

    4. 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.

    5. Re:The real question... by Anonymous Coward · · Score: 0

      One space or two after a period?

      Sorry wrong crowd :P

      (and don't you heathens dare say one)

      One space, one ACSII-255, and then a second space.

      Just to mess with control-H replacement by people who don't know their ASCII tables.

    6. Re:The real question... by Anonymous Coward · · Score: 0

      I prefer tabs after my periods personally.

    7. Re:The real question... by Anonymous Coward · · Score: 0

      Obviously one space is the right answer: the tool should provide the appropriate spacing without the user having to hit another key. If you need to hit space twice, then your tool is deficient.

      In the digital world, the only way to ensure that a sentence ending punctuation mark has more visible space after it than other mid-sentence punctuation marks (e.g. the period ending "e.g.") is to use more than one space character. You don't know what font or even what program someone will use to read your text data.

      And don't give me the "but it's APA style to have only one space!" crap. Look at the written word going back centuries and the printed word from the age of presses. A larger visible space after the sentence is what denoted the end of the sentence. Period.

    8. Re:The real question... by R3d+M3rcury · · Score: 1
    9. Re:The real question... by is+as+us+Infinite · · Score: 1

      Hey you insensitive clod, I use a single tab after each period. It's much better for readability. Your eye skips directly to the beginning of each sentence and sometimes your tabs even line up, creating meaning that didn't even exist before. Also, it makes the spacing a little bit variable so you get this very organic feeling to what you're writing. It's just the best and I recommend it to everybody who writes paragraphs in English++ (or even English#).

      --
      Quidquid latine dictum sit, altum sonatur. . . . . . . .
    10. Re:The real question... by is+as+us+Infinite · · Score: 1

      Oh no! Slashdot has removeth my tabs. I am become undone!

      --
      Quidquid latine dictum sit, altum sonatur. . . . . . . .
    11. Re:The real question... by Anonymous Coward · · Score: 0

      One space or two after a period?

      Sorry wrong crowd :P

      (and don't you heathens dare say one)

      Hahahahahahahahaha
      >breathe
      Hahahahahahahahahahaha

      That was a good one.

    12. 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.
    13. Re:The real question... by sl3xd · · Score: 1

      I had the same problem with LaTeX and LyX. Took ages to get used to...

      --
      -- Sometimes you have to turn the lights off in order to see.
    14. Re:The real question... by tepples · · Score: 1

      One space or two after a period?

      the tool should provide the appropriate spacing without the user having to hit another key. If you need to hit space twice, then your tool is deficient.

      I want to make my writing tool no longer deficient. How do I make it distinguish the end of a sentence from the end of an abbreviation?

    15. Re:The real question... by linear+a · · Score: 1

      Two spaces after a period except for just one space after the period that ends a paragraph.

    16. Re:The real question... by Darinbob · · Score: 1

      For typewriter, it's two. With such things becoming more rare, I think it's up for debate now. Muscle memory means it's hard to stop the two spaces.

      But any good word processor or typesetting tool will treat them both the same anyway. One space or one hundred spaces should make no difference. Of course, a lot of these tools just plain suck. Which is why I always preferred TeX or LaTeX back when I wrote papers and Word was a cruel joke.

    17. Re:The real question... by swillden · · Score: 1

      One space or two after a period?

      Sorry wrong crowd :P

      (and don't you heathens dare say one)

      The correct answer depends on the font. With monospaced fonts, two spaces after a period. With proportional fonts, it's up to the rendering system to recognize the end of the sentence and render the single space after a period as an em space. A good rendering system should recognize periods in abbreviations, and use a smaller space. But few do, so we just live with the egregiously large space in the middle of "Mr. Green".

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    18. Re:The real question... by DRJlaw · · Score: 1

      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.

      Nobody has ever suggested to me that it is improper form. In my opinion, it still makes paragraphs more easily readable. I'm also old enough that if someone were to suggest to me that it was improper form I could safely ignore them.

      Now get off my used-to-be-fixed-spaced lawn.

    19. Re:The real question... by Anonymous Coward · · Score: 0

      I have two things going against me: I'm a typography geek, and my wife studied to be a newspaper editor.

      Both the Chicago manual of style and the AP style guide recommend one space after a period. I know LaTeX has long automated away the double space.

      But I haven't been able to break the habit.

    20. Re:The real question... by Anonymous Coward · · Score: 0

      After a period, just wait 1 day to be safe before diving in...
      *ducks*

    21. Re:The real question... by Anonymous Coward · · Score: 0

      I still put two spaces so that I can search for [period][space][space] to count sentences more accurately than looking for [period][space]. (because [period][space] can appear in many other situations, whereas [period][space][space] is almost exclusively at the end of the sentence.) Hence I even do [period][space][space][cr] at the ends of paragraphs.
      It also comes in handy if I want to split the paragraph into individual sentences; I can do a search and replace on [period][space][space].
      How do [period][space] always people handle that?

    22. Re:The real question... by Anonymous Coward · · Score: 0

      I always use 2 spaces after a period, no matter what I'm typing on. It just LOOKS right.

      And when I'm ON the period, you'd probably better give me at least 8 spaces. And throw me some chocolate. And Advil. And back away slowly. Thank you.

    23. Re:The real question... by z3alot · · Score: 1

      In latex, to force word spacing after an abbreviation, you escape the space like '\ '. I suppose if it has to be spaced as a text document, the editor should unconditionally insert two spaces after a period, then in the case of an abreviation the user should backspace.

    24. Re:The real question... by michael_wojcik · · Score: 1

      The real error here is the appeal to "considered proper form".

      None of these conventions of mechanics, usage, or typography are "proper" in any real sense. They are at best the highly subjective dictates of house style sheets and style guides for writers, generally no more than a reflection of the whims and prejudices of some senior editor or author.

      In some cases, they're supported by the requirements of typographers - that's the source of the "punctuation inside closing quotation mark" convention - but such rules are now mostly or entirely atavistic. Others claim to derive from various authorities that, on cursory inspection, have no authority at all; the Augustan invention and vilification of the "split infinitive" is the classic example. ("You can't do it in Latin, so you shouldn't be allowed to do it in English.")

      Ultimately none of these rules are anything more than codified, contested personal preferences, and their only claim to be "proper form" is what little support they can gain through popularity. And that propriety is fickle.

  45. Possible Explanation... by sycodon · · Score: 3, Interesting

    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.

    So maybe the real lesson is the OCD programmers make a bit more than non-OCD programmers.

    --
    When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    1. Re:Possible Explanation... by krotscheck · · Score: 2

      Alternative explanation: People who use spaces have gotten so annoyed at how much a PITA formatting is, wrote an autoformatter, and have suddenly reclaimed all that time they would have otherwise spent formatting.

      --
      This signature can save you $400 on your car insurance!
    2. Re:Possible Explanation... by donaldm · · Score: 3, Insightful

      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.

      So maybe the real lesson is the OCD programmers make a bit more than non-OCD programmers.

      If you are using a decent text editor (eg. gvim and emacs to name two) indentation is actually done by the editor and is fully customizable, all you as the coder has to do is make sure that what you are coding has as few errors as possible. If you have to worry about indentation then you are not doing it right.

      --
      There ain't no such thing as proprietary standards only proprietary formats. Standards are by definition open.
    3. 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.

    4. Re:Possible Explanation... by Rockoon · · Score: 2

      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.

      If you think that there is a lot of counting, its because you have a ridiculous tab setting. It should be 2.

      --
      "His name was James Damore."
    5. Re:Possible Explanation... by unrtst · · Score: 0

      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.

      Bullshit. And this sort of idea is why people using tabs get paid less :-P

      Working with spaces is nearly identical if you set up your editor correctly. If I hit tab, it inserts enough spaces to go to the next tabstop, which I have set to 4. If I hit backspace within the leading whitespace indentation, it deletes back to the previous tab.
      Converting between them is even trivial, assuming the indents are consistent. Just set up the shiftwidth to make tabs the same as what spaces are using, then in vim it's just ":retab" and they're all switched over to whatever your current settings are.

      The only benefit tabs had/has is the ability to visually change how much indentation they represent on the fly without modifying the content. For example, if you have some deeply indented code, ":set tabstop=1" can help condense it quickly. Conversely, ":set tabstop=8" will make indents very visible, and you can quickly switch back and forth at will, with no impact on the data in the document. While I do recall using that decades ago, I can't remember the last time I needed/wanted to do that.

      Plopping something like this at the top of your file can help too:
      # ex: set tabstop=4 expandtab smarttab softtabstop=4 shiftwidth=4:
      # -*- Mode: tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- #
      (if your editor doesn't know what to do with those, it's not worthy of use)

    6. Re:Possible Explanation... by DrStrangluv · · Score: 5, Interesting

      > 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.

      I think you've hit the crux of it. Emacs, Visual Studio, and Eclipse (at least) all use tabs by default. What we may be seeing is a selection for people who know enough about their environment to configure it to work for them.

    7. Re:Possible Explanation... by serviscope_minor · · Score: 2

      I use spaces at work so the code looks the same for everyone.

      I use tabs so the code looks how everyone wants it to look. Like 4 spaces per indent? set ts=4. Like 8? Use set ts=8. etc.

      For Python, I always use spaces since whitespace is part of the syntax.

      For python I use a mix of spaces and tabs because I'm a shithead.

      --
      SJW n. One who posts facts.
    8. Re:Possible Explanation... by Gr8Apes · · Score: 5, Insightful

      The whole spaces vs tabs argument is so 90s, and seems more like arguing whether cow or bull leather whips are better.

      Intelligent devs use IDEs that handle all this formatting nonsense for them, removing the entire argument in the first place and just get things done. If your preferred language doesn't have a modern IDE that handles this for you, perhaps that tells you all you need to know about your preferred language.

      --
      The cesspool just got a check and balance.
    9. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      The correct way to hold a Python is briefly, over a dumpster.

    10. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      I would guess that it might be based on experience.

      Disk is cheap, memory is plentiful, spaces always work, and decent editors auto-indent correctly.

      So the more experienced developers eventually figure out that it is best to try and keep stuff as simple as possible, and spaces (1 character) are simpler than tabs (2,4,8 characters), or an unholy mix of tabs and spaces.

      In my extensive experience diffs with spaces always work as expected. Tabs, no so much.

    11. Re:Possible Explanation... by Grishnakh · · Score: 1

      The only benefit tabs had/has is the ability to visually change how much indentation they represent on the fly without modifying the content. ... you can quickly switch back and forth at will, with no impact on the data in the document. While I do recall using that decades ago, I can't remember the last time I needed/wanted to do that.

      It's useful when you're not the only person working on that code, and your cow-orkers have different ideas of how many spaces each indentation level should be. If you have one weirdo on the team who insists on 8-space or 2-space indents, then using tabs keeps you from fighting over this all the time and filling up the git repo with constant whitespace changes.

    12. 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.

    13. Re:Possible Explanation... by ausekilis · · Score: 1

      The only benefit tabs had/has is the ability to visually change how much indentation they represent on the fly without modifying the content. ... you can quickly switch back and forth at will, with no impact on the data in the document. While I do recall using that decades ago, I can't remember the last time I needed/wanted to do that.

      It's useful when you're not the only person working on that code, and your cow-orkers have different ideas of how many spaces each indentation level should be. If you have one weirdo on the team who insists on 8-space or 2-space indents, then using tabs keeps you from fighting over this all the time and filling up the git repo with constant whitespace changes.

      Or you can use and IDE/git repo manager with a setting to ignore whitespace differences.

    14. Re:Possible Explanation... by amicusNYCL · · Score: 5, Insightful

      Plopping something like this at the top of your file can help too:
      # ex: set tabstop=4 expandtab smarttab softtabstop=4 shiftwidth=4:
      # -*- Mode: tab-width: 4; indent-tabs-mode: nil; basic-offset: 4 -*- #
      (if your editor doesn't know what to do with those, it's not worthy of use)

      I delete that cruft when I encounter it. Editor settings belong in an editor, not in my code, thank you very much.

      --
      "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
    15. Re:Possible Explanation... by 0100010001010011 · · Score: 5, Funny

      Intelligent devs use IDEs

      Would that be vim or emacs?

    16. Re:Possible Explanation... by skids · · Score: 2

      If you have to worry about indentation then you are not doing it right.

      Or you care what your code looks like more than any automated algorithm ever could.

      Though lately I've been making an effort to use tabs because I've been working on WRT stuff where every byte saved is worth something.

    17. 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.

    18. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      Exactly. And those ides use spaces.

    19. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      No idiot. They use spaces by default. A tab = 5 spaces. This is default. Its a very simple setting. How you managed to misread it is another story I don't care about.

    20. Re:Possible Explanation... by minogully · · Score: 1

      I use spaces at work so the code looks the same for everyone.

      I use tabs so the code looks how everyone wants it to look. Like 4 spaces per indent? set ts=4. Like 8? Use set ts=8. etc.

      Both of these reasons are exactly why I use a combination of tabs and spaces. All Tabs for regular code indentation, but when I need to split a line of code across multiple lines I use tabs up to the point of the regular code's indentation, then spaces afterwards since the extra indentation for readability is usually lined up with some piece of code from the line before.

      This ensures that for everyone, they will both see it how they want it to look AND the code won't get misaligned in these circumstances. Unfortunately, Eclipse doesn't automatically do it this way.

    21. Re:Possible Explanation... by greythax · · Score: 4, Insightful

      And truly intelligent devs check the "use spaces instead of tabs for formatting" in the options of their IDE...

    22. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      What kind of compromise is that? No wonder everyone is unhappy. The kids should be using 5 spaces. (8+2)/2 = 5

      Or you guys can switch to a more enlighten language like Piet. While some Piet programs have a lot of whitespace, you'll use neither tabs nor spaces when writing them.

    23. Re:Possible Explanation... by SCVonSteroids · · Score: 2

      An excellent solution to your situation would be for your entire family to use no spaces.
      You all get to spend time closer together as a result!

      --
      I tend to rant.
    24. Re:Possible Explanation... by computational+super · · Score: 1

      See and here I was thinking that the developers who get paid more are the ones who get paid by the hour and type "space space space space space" to begin every line.

      --
      Proud neuron in the Slashdot hivemind since 2002.
    25. Re:Possible Explanation... by religionofpeas · · Score: 1

      If you have one weirdo on the team who insists on 8-space or 2-space indents, then using tabs keeps you from fighting over this all the time and filling up the git repo with constant whitespace changes.

      Except when there's a mix of tabs and spaces.

    26. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      But the developer enters tabs in those IDEs...

    27. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      AND the code won't get misaligned in these circumstances.

      I see you've never had to deal with fixed-width vs variable-width fonts.

    28. Re:Possible Explanation... by lgw · · Score: 1

      I use tabs so the code looks how everyone wants it to look. Like 4 spaces per indent? set ts=4. Like 8? Use set ts=8. etc.

      Worrying about that is a sign of too much OCD. Code is code regardless of formatting. But if you indent more than 4 you're a heretic who will be first up against the wall when the revolution comes! Ahem.

      --
      Socialism: a lie told by totalitarians and believed by fools.
    29. Re:Possible Explanation... by DickBreath · · Score: 2

      > argument is so 90s, and seems more like
      > arguing whether cow or bull leather whips are better.

      Bull leather whips work better.

      Most employers would agree.

      --

      I'll see your senator, and I'll raise you two judges.
    30. Re: Possible Explanation... by Anonymous Coward · · Score: 1

      The fastest route to a pay raise.

    31. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      I do not know if vim has auto formatting. Emacs does. At least it could in the 1990s.

    32. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      Intelligent devs use IDEs that handle all this formatting nonsense for them

      Intelligent devs shouldn't need an IDE to help them format their code properly.

    33. Re:Possible Explanation... by Cederic · · Score: 1

      Then fucking compile the code instead of shipping the source and running it dynamically on the fly - given that's the only way the source code formatting would ever get anywhere fucking near the device on which you're running.

      I think you just demonstrated a core reason for the pay differential.

    34. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      Well you got the better end of the deal, 5 is what she should have settled for.

    35. Re:Possible Explanation... by Cederic · · Score: 1

      So how the fuck did neither of you think to use a pretty-printer on check-in/out so that you can both work at your preferred indentation without fucking over the change record?

    36. Re:Possible Explanation... by swillden · · Score: 1

      Intelligent devs use IDEs that handle all this formatting nonsense for them, removing the entire argument in the first place and just get things done

      I see you're a novice programmer.

      IDEs do not solve this problem; they just hide it, in a way that arguably makes it worse. I made your same argument 25 years ago, saying that decent editors (like EMACS, still my editor of choice) handle all that nonsense, removing the entire argument. So, I had EMACS configured to use an optimal mix of (proper 8-space) tabs and spaces, and life was good.

      Then others had to edit my code, and they cursed me, because they used tabs only, and set their tab width to the indentation level, and my code was all misaligned in their editor, and hard to read. So they "fixed" my code, and life was good.

      Then others had to edit their code, and they also used tabs only, but set their tab width to a different preferred indentation level; and lots of carefully aligned code became misaligned, and hard to read. So they fixed the code to use a correct number of tabs for indentation levels, and then spaces after that for alignment (which is how their editors/IDEs were configured).

      And then the code came back to me, and although the alignment was fine, my 8-space tabs pushed much of the code way to the right. So then I told my editor to reformat and replace all the tabs with appropriate numbers of spaces....

      And it looked right in everyone's editors, IDEs, and when printed, and cat'ed, and everything else. It did mean that people couldn't easily use different indentation levels, but that's a small price to pay.

      So... the right answer is spaces. Which is what all the old hands have learned. And old hands make more money than young novices. So this finding of correlation between salary and using only spaces makes perfect sense.

      However, I've since moved on to another approach to code formatting: I do not format code. I write a configuration file for a code formatter (I'm really liking clang-format lately), and I check it in with the code, and I add a commit hook that runs all code through the formatter, with the specified config, and rejects the commit if the output of the code does not match the input.

      Use whatever tool you want to edit, but you have to run the formatter before you can commit. If you're an intelligent developer, then, what you'll do is bind the formatter to a hotkey in your editor/IDE and never worry about formatting at all. I almost never hit the return key while typing code, and don't bother much with spaces or at all with tabs. I type stream-of-consciousness, format-free code, then hit the formatter hotkey.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    37. Re:Possible Explanation... by Gr8Apes · · Score: 2

      You've missed my point. IDEs should handle formatting into whatever you wish to see, and the storage format should store code, for which all white space after the initial demarcation is redundant. I personally despise spaces, as I generally have no use for them at all past 1. Tabs are better IMNSHO because they eliminate extra spaces, but they're still not awesome. Either way, my IDE works with spaces and tabs and deals with the formatting as necessary, so a proper project config file removes any formatting issues as far as coding standards of the day go.

      BTW, as far as I'm concerned, any language that is whitespace dependent isn't really a candidate for a usable language. We'll throw that out there as well.

      --
      The cesspool just got a check and balance.
    38. Re:Possible Explanation... by Gr8Apes · · Score: 1

      I'd mod you funny if I could. Awesome.

      --
      The cesspool just got a check and balance.
    39. Re:Possible Explanation... by swillden · · Score: 1

      This ensures that for everyone, they will both see it how they want it to look AND the code won't get misaligned in these circumstances.

      And it ensures that for those who use proper 8-space tabs indentation gets shoved way to the right. Which is also what happens when the code is cat'ed on a terminal, looked at in a diff program, etc., unless you configure tabs to be smaller in all of those other contexts... and then other things that expect tabs to have the correct size get broken.

      No, spaces only is the best overall answer.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    40. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      Spoken like a fat tub wearing a wizard robe while basking in the glow of a monitor, caressing his Adam's apple in his mother's basement.

    41. Re: Possible Explanation... by Gr8Apes · · Score: 1

      vim definitely has formatting capabilities but I generally don't use them much. My vim usage is very specific to certain functions that just work better in vim than any purpose built IDE I've ever come across, and also for a consistent editor experience across all platforms I deal with. Emacs never grew on me, but I started with vim first, which is probably why.

      --
      The cesspool just got a check and balance.
    42. Re:Possible Explanation... by Gr8Apes · · Score: 1

      Intelligent devs shouldn't need an IDE to help them format their code properly.

      But it certainly makes them more productive by removing a bunch of manual steps.

      --
      The cesspool just got a check and balance.
    43. Re:Possible Explanation... by Gr8Apes · · Score: 1

      Intelligent devs use IDEs that handle all this formatting nonsense for them, removing the entire argument in the first place and just get things done

      I see you're a novice programmer.

      Quite the contrary:

      So... the right answer is spaces.

      Actually, it is the LCD answer to viewing code, equivalent to everyone coding in Comic Sans typeface because it's on everyone's system. (yes, purposefully said to indicate the square peg / round hole problem)

      Now for a more appropriate answer:

      However, I've since moved on to another approach to code formatting: I do not format code. I write a configuration file for a code formatter (I'm really liking clang-format lately), and I check it in with the code, and I add a commit hook that runs all code through the formatter, with the specified config, and rejects the commit if the output of the code does not match the input.

      Use whatever tool you want to edit, but you have to run the formatter before you can commit. If you're an intelligent developer, then, what you'll do is bind the formatter to a hotkey in your editor/IDE and never worry about formatting at all. I almost never hit the return key while typing code, and don't bother much with spaces or at all with tabs. I type stream-of-consciousness, format-free code, then hit the formatter hotkey.

      Thanks for agreeing with "Intelligent devs use IDEs that handle all this formatting nonsense for them" because my IDEs incorporate exactly this solution and it is done automatically without even thinking about it. Some of us have been doing that for more than a decade, hence the statement that this is so reminiscent of the 90s.

      --
      The cesspool just got a check and balance.
    44. Re:Possible Explanation... by Darinbob · · Score: 1

      Nobody hits the space bar 4 times to indent. You use the tab key and the editor puts in 4 spaces. There's no OCD involved here.

    45. Re:Possible Explanation... by Darinbob · · Score: 1

      And the other person who's trying to use your file has to guess. And guessing turns out to be hard when the file uses more than one tab stop setting (and this is extremely common).

    46. Re:Possible Explanation... by sycodon · · Score: 1

      Just behind the head?

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    47. Re:Possible Explanation... by Hognoxious · · Score: 0, Troll

      Intelligent devs use IDEs that handle all this formatting nonsense for them

      That's fine if you can infer the nesting level from if and fi or { and }, but what when it works the other way round like Python?

      Oh, hang on. You said intelligent devs. As you were, carry on.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    48. Re:Possible Explanation... by sycodon · · Score: 1

      Man, you try to complement some people and they lose their shit.

      LOL!

      --
      When Fascism comes to America, it will call itself Anti-Fascism, and tell you to give up your guns.
    49. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      Though lately I've been making an effort to use tabs because I've been working on WRT stuff where every byte saved is worth something.

      Wait, what? If you're coding for a platform where byte counting matters, you should be using a compiled language, so spaces Vs tabs in the source is irrelevant.

    50. Re:Possible Explanation... by Hognoxious · · Score: 1

      If twp spaces of indentation is too small for you to see you should get your eyes checked.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    51. Re:Possible Explanation... by roman_mir · · Score: 1

      Personally I hate spaces. I just hate them and that's that. I hate everything about them. The way they get the largest key on the keyboard, what are they compensating for?

      Of-course I do like money, I like money quite a bit and I would like to get more money so here is what I am going to do. I am going to use spaces for a while and see if I start making more money.

      I will start using spaces and then I will demand a raise and see how that goes. Of-course I know how that goes because I know who will be handling the demand. I will demand more money and I will have to approve that demand so... but who knows, maybe I will look at all those spaces and will appreciate them so much that I will give me a raise!

    52. Re:Possible Explanation... by ShanghaiBill · · Score: 1

      So how the fuck did neither of you think to use a pretty-printer on check-in/out

      I suggested that to her attorney during the mediation process, but I don't think he understood. The 4 space indent is the only formatting requirement that made it into the final settlement.

    53. Re:Possible Explanation... by swillden · · Score: 1

      Did you intend that to be in reply to a different post? I don't see how it's related to what I said.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    54. Re: Possible Explanation... by CAIMLAS · · Score: 1

      I personally use whatever, but its irritating to work on other's code which isn't using what I use by default - because then I've got to go through and reformat.

      --
      ~/ssh slashdot.org ssh: connect to host slashdot.org port 22: too many beers
    55. Re: Possible Explanation... by tattood · · Score: 1

      Sublime Text has an option to use spaces or tabs for when the tab key is used.

      --
      WTB [sig], PST!!!
    56. Re:Possible Explanation... by swillden · · Score: 1

      However, I've since moved on to another approach to code formatting: I do not format code. I write a configuration file for a code formatter (I'm really liking clang-format lately), and I check it in with the code, and I add a commit hook that runs all code through the formatter, with the specified config, and rejects the commit if the output of the code does not match the input.

      Use whatever tool you want to edit, but you have to run the formatter before you can commit. If you're an intelligent developer, then, what you'll do is bind the formatter to a hotkey in your editor/IDE and never worry about formatting at all. I almost never hit the return key while typing code, and don't bother much with spaces or at all with tabs. I type stream-of-consciousness, format-free code, then hit the formatter hotkey.

      Thanks for agreeing with "Intelligent devs use IDEs that handle all this formatting nonsense for them" because my IDEs incorporate exactly this solution and it is done automatically without even thinking about it.

      Your IDE alone cannot incorporate that solution, unless you can force everyone to use the same IDE and you can enforce everyone's IDE to be configured identically. To make it work you really need a standalone tool that you can integrate with source control.

      And unless you force everyone to use the same IDE, you still need the spaces-only LCD approach to indentation. Otherwise all of the old problems come back, it's just that you've managed to isolate them to a per-developer basis, because the shared code is consistent.

      And if you think you can force everyone to use the same IDE, then I see you're a novice programmer.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    57. Re:Possible Explanation... by serviscope_minor · · Score: 1

      Yes, this! Why oh why is it so fucking hard to understand???

      --
      SJW n. One who posts facts.
    58. Re:Possible Explanation... by serviscope_minor · · Score: 1

      Basically it sounds like you're saying everyone should use the same indent as you because you can't be arsed to set up indentation properly.

      There's nothing "proper" about 8 spaces per tab.

      And why are you still catting code to a terminal in this day and age? Why not use a tool like vimcat which cats the code, but passing through vim so you get syntax highlighted code in your terminal along with a sane indentation scheme.

      --
      SJW n. One who posts facts.
    59. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      im happy to finally know the truth about my husband infidelities all these yearsand promised Mich to share his contact to anyone in need of same help after getting all the evidence and proofs on my husband’s phone.contact michackersolution@ gmailcom for any real Hacking job has my experience online with hackers have really been frustrating until i met Mich..within some few hours he was able to reveal all the real truth of his infidelities and lies on fb,whatsap, emails and instagr without touching the phone you can call, text or whatsap him on his contact +16282043675
      tell him Lille referred you gt

    60. Re:Possible Explanation... by serviscope_minor · · Score: 1

      And the other person who's trying to use your file has to guess.

      Guess what? The thing is they *can't* guess how many spaces per tab I personally use, that's the beauty of it. One tab semantically means one indent level.

      --
      SJW n. One who posts facts.
    61. Re:Possible Explanation... by skids · · Score: 1

      WRT is glued together with bash scripts. Not my decision.

    62. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      Expect to find your kids rebel and start using 1, 3 and 5 space indents.

      Disown them if they try bringing CamelCase or Hungarian notation to dinner.

    63. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      I think the explanation comes down to the idiom "it's harder to read code than it is to write it".

      By using exclusively spaces (and having tabs automatically convert to spaces) you are guaranteeing that the next person to come along and uses your code gets CONSISTENT indents regardless of editor/IDE/OS/printer/whatever.

      I can't speak for others, but I know I use exclusively spaces because I got sick of colleagues who would use tabs and sneak in the occasional space indents (making formatting inconsistent) or vice-versa. I don't care how much it is indented, what I care about is that it's consistent. It comes down to consideration for others, and spending additional time when writing code to make it easier for others to work with is a perfect example of consideration.

      How does this factor into salary? Well, I'd rather have someone on my team that writes code that's easier for other people to work with, and I'd pay more for that attribute because in the long run I'll get more bang for my buck.

    64. Re:Possible Explanation... by ShanghaiBill · · Score: 1

      you're a heretic who will be first up against the wall when the revolution comes!

      No, you will just be paid less.

    65. Re:Possible Explanation... by erapert · · Score: 1

      Intelligent devs use IDEs that handle all this formatting nonsense for them

      And that's precisely the point of tabs in the first place!
      1 tab == 1 indentation!
      instead of futzing around and worrying about how many spaces to use.

    66. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      They have space for a Unix with shell and are counting shell script bytes? How big are the scripts, really? Why?

    67. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      No they don't. What you is that these IDE:s however can display the tabs as if they represented X number of spaces, the saved source contains only tabs however.

    68. Re: Possible Explanation... by Anonymous Coward · · Score: 0

      I bet you have to press right 4 times though when you navigate with keyboard.

    69. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      FYI, Emacs does not use tabs by default, at least for the two languages I tested (shell and C), using emacs -Q to ignore my current emacs configuration.

    70. Re:Possible Explanation... by Junta · · Score: 1

      Actually, there is still the matter of what you *tell* the IDE to do.

      The popular opinion on each project wins. I did enjoy changing tabstop the other day for someone's code that had perhaps way too much nesting...

      --
      XML is like violence. If it doesn't solve the problem, use more.
    71. Re:Possible Explanation... by Cederic · · Score: 1

      So build the scripts off-platform and run them through a deployment utility that strips symbols down to a single character and removes all extraneous spaces and carriage returns.

    72. Re:Possible Explanation... by Gr8Apes · · Score: 1

      And that's precisely the point of tabs in the first place! 1 tab == 1 indentation! instead of futzing around and worrying about how many spaces to use.

      Just wait for it....wait for it....

      The next level of understanding is just around the corner.

      --
      The cesspool just got a check and balance.
    73. Re:Possible Explanation... by Gr8Apes · · Score: 1

      The popular opinion on each project wins.

      No, the consensus was that there wasn't a single best coding format that everyone could agree upon. Otherwise we would never have had the initial spaces vs tabs discussion, much less any of the other coding format holy wars.

      --
      The cesspool just got a check and balance.
    74. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      No, of course not.

    75. Re: Possible Explanation... by Gr8Apes · · Score: 1

      vim has code formatting capabilities far beyond merely subbing spaces for tabs. I'm sure Sublime Text does as well.

      --
      The cesspool just got a check and balance.
    76. Re:Possible Explanation... by networkBoy · · Score: 1

      BTW, as far as I'm concerned, any language that is whitespace dependent isn't really a candidate for a usable language. We'll throw that out there as well.

      +1

      --
      whois gawk date unzip strip find touch finger mount join nice man top fsck grep eject more yes exit umount sleep dump
    77. Re: Possible Explanation... by KGIII · · Score: 1

      Whitespace?!? Racist!

      --
      "So long and thanks for all the fish."
    78. Re:Possible Explanation... by gweihir · · Score: 1

      Ah, no? My editor does it for me, mostly. Maybe the lesson here is that competent developers use better editors?

      --
      Most ACs are not even worth the keystrokes to insult them. Be generically insulted by this and ignored otherwise.
    79. Re:Possible Explanation... by Gr8Apes · · Score: 1

      Your IDE alone cannot incorporate that solution,

      Actually, they can. I use at least 3 different IDEs, they all can conform. If I choose to use an archaic IDE that cannot be made to conform, well...

      To make it work you really need a standalone tool that you can integrate with source control.

      To have a version control extension that validates and modifies code is cause for concern. Let's just say at the version control point is not where you want to muck with code. There's a whole lot more validation than mere code formatting I like done, and the build and test systems is where all of that should and does occur.

      You have a version control workflow that accepts changes into the various release branches, correct? We are living in the 21st century after all.

      And unless you force everyone to use the same IDE, you still need the spaces-only LCD approach to indentation.

      I'll be succinct: Spaces suck.

      And if you think you can force everyone to use the same IDE, then I see you're a novice programmer.

      Your trolling remarks are merely a sign of your inexperience. See above, I only require that IDE's are capable of properly formatting code. If you're still stuck using something from the notepad era, well, a world of wonder awaits you.

      --
      The cesspool just got a check and balance.
    80. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      That's why you use tabs, and you set it to render as 2 spaces on your editor, your wife sets it at 8, but the commits are unaffected.
      Spaces are for aligning things, not indenting. So simple, a (code) monkey could figure it out!

    81. Re:Possible Explanation... by Hognoxious · · Score: 1

      I do. I find it quite therapeutic. Though more often than not I just let the pretty printer do it.

      --
      Confucius say, "Find worm in apple - bad. Find half a worm - worse."
    82. Re:Possible Explanation... by Darinbob · · Score: 1

      Except that it is only semantically one indent level to you. To other people the tab is used differently. There's no standard here. Using tab the way you described, if done universally, would resolve a lot of problems. However what actually happens is that people don't use them the same way and you end up with screwed up files with a mix of tabs and space and a mix of different tab stop settings. If you have to split a line (and you usually do because line length limits should apply) then you have to deal with aligning the broken parts of the line and you can't do that with just straight up indentation depending upon the coding style in use.

    83. Re:Possible Explanation... by BronsCon · · Score: 1

      Dude, he talks about "[dealing] with code for 30 to 40 years" but he just doesn't get it. I think we're both wasting our time.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    84. Re:Possible Explanation... by BronsCon · · Score: 1

      Except that it is only semantically one indent level to you. To other people the tab is used differently. There's no standard here.

      No, in truth there is a standard. You press the tab key once (or hit the spacebar X number of times, where X is your preferred indent width) to increase your indent level by 1. That's been the standard on every project I've ever touched; nobody indents by more than one tab at a time.

      Using tab the way you described, if done universally, would resolve a lot of problems.

      Indeed it would, which is why I advocate for the use of TAB for indents, and replace spaces as I find them.

      However what actually happens is that people don't use them the same way and you end up with screwed up files with a mix of tabs and space and a mix of different tab stop settings.

      In truth, that only happens when people indent with spaces. You get one guy who configures his editor to insert 2 spaces when he hits TAB, another who configures his editor for 4, and that oddball who just sues the spacebar and manually indents with 3, and now you've got 3 different standards in one file. If everyone just used fucking tabs, the guy who likes 2 would have 2, the guy who likes 4 would have 4, and the oddball could have his 3, with nobody having to engage in a pissing match over who is right or decide between enduring someone else's indent width or updating the file to match their own.

      If you have to split a line (and you usually do because line length limits should apply) then you have to deal with aligning the broken parts of the line and you can't do that with just straight up indentation depending upon the coding style in use.

      Right, you indent to the same level with tabs, then align with spaces. Of course, you have to use the same definition of "indent" and "align" as the rest of the industry to understand how that works.

      That code review you mentioned in the other thread, go grab that, I want you to try something. You said some lines were indented with 3 spaces, some with 4, and some with 8. Pick one of those values, any one, it doesn't matter, and replace all the tabs in that code with that number of spaces. Now open it in your code review tool and tell me, does that file look any better now that it's only indented with spaces? Or is the alignment still fucked up?

      If you really want to see the light, go through that same code and replace the spaces used for indentation with tabs, one for each level of indentation. Since the file has mixed indentation widths, you'll have to manually do this; 1 tab for every 3 spaces on lines indented with 3 spaces, 1 tab for every 4 on lines indented with 4 spaces, and 1 tab for every 8 spaces on lines indented with 8. Once that's done, look at it again in your code review tool.

      How does that suit you? It probably looks a lot more even and structured, right?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    85. Re:Possible Explanation... by Darinbob · · Score: 1

      You misunderstand, First, this is old code, still in use or still being viewed. Sometimes it is new files too of course. But there are tools that work different. One tab adds 4 spaces, two tabs is 8 spaces. So if the indentation is intended to be 8 spaces then the editor or tool adds 2 tabs. But if someone wants tab stop to be 2 spaces then the tool will stick in 4 tabs to get up to 8 spaces. This seems to be the most comon use that I see in older tools, it's the only way that explains why I see files where two lines in the same file that use only tabs but no spaces still don't line up like they should.

      Yes, it's dysfunctional. It exists though. People with experience have had to work with all sorts of dysfunction at some time or other.

    86. Re:Possible Explanation... by ben_kelley · · Score: 1

      vim you insensitive clod!

    87. Re:Possible Explanation... by serviscope_minor · · Score: 1

      If you have to split a line (and you usually do because line length limits should apply) then you have to deal with aligning the broken parts of the line and you can't do that with just straight up indentation depending upon the coding style in use.

      ???

      You split the line, indent it to the indentation level with tabs, the nspaces the rest of the way. That still works perfectly with changing the tab stops.

      --
      SJW n. One who posts facts.
    88. Re: Possible Explanation... by sirv · · Score: 1

      your salary ?

    89. Re: Possible Explanation... by BronsCon · · Score: 1

      What the hell kind of broken "tools" are you using? Just try what I said, you might be pleasantly surprised. Again, I fall squarely in the category of "people with experience", I have, in fact, encountered what you are talking about and I am trying to point out a solution. Hunor me and learn something, or keep arguing and remain ignorant, it's ultimately your ego's call, but you're never too old or experienced to learn a new trick.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    90. Re: Possible Explanation... by K.+S.+Kyosuke · · Score: 1

      Yes, the Intelligent Developer's Editors.

      --
      Ezekiel 23:20
    91. Re:Possible Explanation... by Anonymous Coward · · Score: 0

      This is precisely why tabs should be used to indent and spaces should be used to align - that way each person can set the tab width to their preference and everything will be automatically correct for the specific viewer.

    92. Re:Possible Explanation... by BronsCon · · Score: 1

      So... the right answer is spaces.

      Actually...

      So then I told my editor to reformat and replace all the tabs with appropriate numbers of spaces....

      The correct answer would have been to tell your editor to make tabs X spaces wide, where X is the number of spaces you wanted to indent by.

      It did mean that people couldn't easily use different indentation levels, but that's a small price to pay.

      And a price that would not have to have been paid had you properly understood the problem.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    93. Re:Possible Explanation... by BronsCon · · Score: 1

      I knew there was something I liked about you...

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    94. Re:Possible Explanation... by BronsCon · · Score: 1

      Otherwise we would never have had the initial spaces vs tabs discussion

      I still don't know why that discussion ever started in the first place. We use the TAB key to indent, why should that ever insert SPACES?! That's what the SPACE bar is for; TAB should insert tabs. End of story, amirite?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    95. Re:Possible Explanation... by BronsCon · · Score: 1

      YES! This is the one true way.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    96. Re:Possible Explanation... by BronsCon · · Score: 1

      No, because we're discussing professional developers. Using spaces won't help in that scenario, anyway.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    97. Re:Possible Explanation... by BronsCon · · Score: 1

      Which is also what happens when the code is cat'ed on a terminal, looked at in a diff program

      Your terminal doesn't honor the control code emitted by the tabs command? Sounds like you need to find a POSIX compliant terminal; then, your tabs can be whatever width you like.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    98. Re:Possible Explanation... by BronsCon · · Score: 1

      Precisely why I use tabs. I like 4 (or 2 depending on display dimensions as 4 can push heavily nested code off screen or off page), but some people like 3, 5, 6, 8, or whatever else. With tabs, whoever is looking at my code can decide how far it should be indented; and that includes me if I'm on my 6:4 display ratio Chromebook or printing to a portrait-orientation page.

      That way, nobody has to argue about indentation width as we can all choose what we like.

      The common argument against tabs is that someone inevitably slips a series of space-indented lines into the code and it no longer lines up if you change your tab width from whatever they were using when it happened. That's not an argument against tabs (which are consistent with the user's tab-width preference), though; it's an argument for replacing the erroneously-added spaces with tabs when you find them.

      Any good IDE or editor will actually tell you when there are mixed tabs and spaces in a file and offer to fix it for you, even, so it's not even any extra work.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    99. Re:Possible Explanation... by BronsCon · · Score: 1

      Working with spaces is nearly identical if you set up your editor correctly. If I hit tab, it inserts enough spaces to go to the next tabstop, which I have set to 4.

      And when I have mine set to 2? Do you not see a problem there? Let me explain.

      Your indents, then, all look too wide to me, and mine all look too narrow to you.

      If we used tabs, though, all of your indents would appear 2 spaces wide to me and all of mine would appear 4 spaces wide to you.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    100. Re:Possible Explanation... by BronsCon · · Score: 1

      Then you correct the mistake made by the person who used spaces. Problem solved.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    101. Re:Possible Explanation... by BronsCon · · Score: 1

      Bingo. I probably don't use the same editor as you and, even if I do, I probably don't want your settings.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    102. Re:Possible Explanation... by skids · · Score: 1

      Yes! And I could also eat my sandwich through a straw!

    103. Re:Possible Explanation... by aberglas · · Score: 1

      Nonsense.

      Tabs can mean one of two very different things. Namely indent to the 8th tab stop or indent one level (might be 2 or 4 chars). IDEs cannot reconcile them, nothing can.

      And Git (now the only SCCS) will scream if tabs and spaces are changed -- lots of noisy diffs.

      In theory an IDE could ignore leading white and just display what it thinks is correct, but not one of them does that in practice.

      Personally, I prefer my code to just be justified. None of this indenting nonsense. Illiterate programming.

    104. Re:Possible Explanation... by swillden · · Score: 1

      You must have missed where I pointed out the problem with your solution.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    105. Re:Possible Explanation... by BronsCon · · Score: 1

      No, I saw it, you're just wrong. If you understood the problem you were trying to solve, you would see that. The problem wasn't the tab characters in the files, it was that you had your editor set to treat them as 8 spaces rather than your preferred indent width.

      Instead of forcing a compromise on everyone else, use your tools properly.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    106. Re:Possible Explanation... by swillden · · Score: 1

      There contexts other than editors. Terminal windows, printers, etc. Adjusting tab sizes everywhere that may be relevant, across multiple systems, is just silly.

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    107. Re:Possible Explanation... by BronsCon · · Score: 1

      You very well may want different indent depths for different mediums, sometimes even depending on the aspect ratio of the output. For example, I prefer 2 spaces on my 6:4 Chromebook and my portrait (9:16) 4k display, or when printing to an 8.5x11" page, because there's relatively less horizontal space compared to other output formats. This keeps heavily-indented lines from wrapping or getting cut off.

      On the other hand, I prefer 4 when displaying on a 16:9 or 22:9 display, or when printing at 11x8.5", because there's plenty of horizontal space and it looks nicer to fill it out more. I used to prefer 8 spaces on my 22:9 display, and I know many people who still do.

      TL;DR: In contexts other than editors, you may want a different indent depth anyway.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    108. Re:Possible Explanation... by HornWumpus · · Score: 1

      A self loading, sandwich firing gatling straw! Compressed air powered, across the room. Without breaking your 'stream of code' to eat.

      There is no better use of your boss's time. It will do wonders for your efficiency.

      --
      John McAfee 'It was like that time I hired that Bangkok prostitute; to do my taxes, while I fucked my accountant'
    109. Re: Possible Explanation... by Reverend+Green · · Score: 1

      DoesHound watch your commits? It will complain vigorously if you mix spaces and tabs in Python.

    110. Re:Possible Explanation... by PoopJuggler · · Score: 1

      No, I think you demonstrated it, but in the wrong direction. Good source code formatting improves readability and maintenance, which improves quality and productivity, which leads to a better product, which leads to better salaries.

    111. Re:Possible Explanation... by swillden · · Score: 1

      TL;DR: In contexts other than editors, you may want a different indent depth anyway.

      I don't.

      Plus, I make more money than you :P

      --
      Note to ACs: I usually delete AC replies without reading them. If you want to talk to me, log in.
    112. Re:Possible Explanation... by BronsCon · · Score: 1

      I don't.

      I meant he collective "you". Someone might; in fact, someone does. Drop the ego and stop imposing your preferences on others.

      Plus, I make more money than you :P

      Is that before or after I cut payroll checks? Put another way, I highly doubt that.

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    113. Re:Possible Explanation... by Marxist+Hacker+42 · · Score: 1

      90s? Try 70s. Which is why it is so insane that python wants to be thought of as a modern programming language.

      --
      SJW: a person who perceives an injustice, and while correcting it, commits a greater injustice.
    114. Re:Possible Explanation... by lsatenstein · · Score: 1

      I just use a formatter that converts tabs to spaces. Make python programmers happy

      And it can also go the other way too.

       

      --
      Leslie Satenstein Montreal Quebec Canada
    115. Re:Possible Explanation... by Gr8Apes · · Score: 1

      But the population of folks working with the codebase back then, and the processes around it were such that there weren't really holy wars of people converting code style formats wholesale back and forth across large teams. At least not in my experience. It really came to a head in the 90s when higher level languages became accessible to enough novice "programmers" with no training entered the professional workforce with all their odd and esoteric manner of formatting code. Some were better, many were not. (I still recall the 3 space indent guy, what an annoying jerk:)

      --
      The cesspool just got a check and balance.
    116. Re:Possible Explanation... by Gr8Apes · · Score: 1

      Git is great. It still has shortcomings, and certainly isn't really intelligent about source code. (Here come the flames, I'll duck and don my hi-temp suit)

      And my point implicitly stated is that white space is irrelevant except as a demarcation. I stated this explicitly elsewhere in this thread. What makes code pretty to view is unnecessary to the codebase. Therefore, much like test specific code, such "view formatting code" shouldn't be in your codebase either. IDEs should just display the code the way you have it set up, the final compiled code doesn't care if you used 1, 2, or 3 spaces or tabs, so why have extras? JS minification is a practical case in point regarding whitespace.

      --
      The cesspool just got a check and balance.
    117. Re:Possible Explanation... by Gr8Apes · · Score: 1

      shucks... ;)

      --
      The cesspool just got a check and balance.
    118. Re:Possible Explanation... by Gr8Apes · · Score: 1

      Otherwise we would never have had the initial spaces vs tabs discussion

      I still don't know why that discussion ever started in the first place. We use the TAB key to indent, why should that ever insert SPACES?! That's what the SPACE bar is for; TAB should insert tabs. End of story, amirite?

      It's because way way way back, "editors" weren't able to vary the tab into anything other than 8 space representations. Thus, a group of people stuck on 80 column monitors would indent twice and holy crap, 16 characters per line were gone. Add that to that idiotic Hungarian notation that added up to 10 prefix characters to your variables, and wow, you would take over 305 lines to write

      for(int i = 0; i < z.length; i++) { z[i] = z[i] < y ? x+y : y;};

      --
      The cesspool just got a check and balance.
    119. Re:Possible Explanation... by BronsCon · · Score: 1

      I do recall starting on a system that was... huh, was it 50 or 60 columns? Now I don't remember.

      I did use spaces back then; one per indent. Thankfully, we no longer live in that world; why do some people insist on remaining stuck there?

      --
      APK quotes people (including myself) without context and should not be trusted. Just thought you should know.
    120. Re:Possible Explanation... by Gr8Apes · · Score: 1

      It's to ensure the old adage, badly paraphrased as "Progress is made by the old dying off and being replaced by the new" remains true.

      --
      The cesspool just got a check and balance.
    121. Re:Possible Explanation... by shutdown+-p+now · · Score: 1

      Visual Studio, and Eclipse (at least) all use tabs by default.

      For Visual Studio, at least, this doesn't make sense, because it doesn't have a single global default - it varies per language. It does use tabs by default for C and C++, but it uses spaces by default for C#, VB, Python, and most everything else.

    122. Re:Possible Explanation... by michael_wojcik · · Score: 1

      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.

      Reasonable. What's their position on premarital pair programming?

  46. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    No idea what I'm doing wrong, if it isn't the spaces!

    If you grew up on typewriters, two spaces between sentences was the norm. A habit I had to break when I transitioned from typewriters to word processors years ago. The only time I see two spaces between sentences these days is in comments for Python code.

  47. It's a state of mind by Anonymous Coward · · Score: 0

    A space is a null character, a tab is a special character. Only a heathen would behave in such a way.

  48. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 1

    If you're using two spaces, you probably work at Google. Do they dock your pay for using extra spaces?

    Yeah, you work at Google. Or you use any of the common languages / frameworks (Javascript, Rails, for example) who generally use 2 spaces. Or you just care about information density, since IDEs make code block folding completely fucking trivial, so there's very little need to create a strong visual offset with 4 spaces and waste screen space & file size by putting in unnecessary white space.

    They don't dock our pay for using extra spaces, they dock our pay for doing stupid shit - something I'm sure you're quite familiar with, creimer.

  49. Logical conclusion by Anonymous Coward · · Score: 0

    Don't use any whitespace at all if you're unemployed.

  50. Re:I use spaces but indent by 2 spaces rather than by omnichad · · Score: 1

    Word at least used to automatically convert end of sentence to two spaces anyway - maybe they've changed. I still use two spaces at the end of a sentence because it's easier to parse.

  51. Re:I use spaces but indent by 2 spaces rather than by mspohr · · Score: 1

    The perfect number of spaces is 3.
    Two is not enough to clearly see indents.
    Four is just a waste of space.

    --
    I don't read your sig. Why are you reading mine?
  52. Spaces in the Streets, Tabs in the Sheets by Anonymous Coward · · Score: 0

    I personally use spaces at work because the the tool my company uses to compile or include scripts reads tabs extremely terrible and there's not chance of that changing. By using spaces I can ensure that the script translates easily between Notepad++ and said tool. Makes it easier for both me, and more importantly, support.

    At home, I use tabs :)

  53. Emacs untabify by hedley · · Score: 1

    Done. Where's my money?

  54. Soooo... I should switch to spaces... by QuietLagoon · · Score: 1

    ... and ask for the 20% salary increase?

  55. Re: I use spaces but indent by 2 spaces rather tha by Anonymous Coward · · Score: 0

    I worked with a person who used three spaces. He's "not with us" anymore. :)

  56. Makes sense, they're spending more hours typing by Anonymous Coward · · Score: 0

    Tab'ers are more time efficient (and generally better human beings), so if the wages include hourly employees then of course they'll get paid less because they're not wasting time like those worthless space'rs.

  57. Re:I use spaces but indent by 2 spaces rather than by Rockoon · · Score: 1

    Google learned it by watching professions.

    --
    "His name was James Damore."
  58. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    Word at least used to automatically convert end of sentence to two spaces anyway - maybe they've changed.

    Unless you're using a monospaced font, all fonts provide a little extra space between sentences without adding an extra space character.

  59. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  60. Some developers are paid by p4nther2004 · · Score: 1

    by the keystroke, apparently.

  61. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    Yeah, you work at Google.

    I heard about the two space indentation from a YouTube video that Google developers gave on Python. Or maybe Guido van Rossum joked about it in one of his videos on YouTube.

  62. Re: I use spaces but indent by 2 spaces rather tha by Anonymous Coward · · Score: 0

    i assume that means you buried him behind the building?

  63. How Many Other "Bogus Statistics" Stories... by Anonymous Coward · · Score: 0

    ...can we flood /. with? This is clearly the most inane and irrelevant piece I've ever seen. This Developer Study couldn't find any better measure to correlate with salary? How about "longevity of code after release," or "number of bugs found per annum," or "length of variable names?"

  64. There are a few easy explainations for this ... by Qbertino · · Score: 1

    1.) Space-indent is almost universially used by old-school C coders and other compiled languages, because they use ancient CLI editors that don't tab by default and care squat about sourcefile size and bandwidth usage (as webdevs do), because they always compile. Those types are more rare but get more money for their work. Specialists.

    2.) Space has come to dominate the indent-wars, which means a passionate tabber is more likely to be percieved as a stubborn non-team player and hence get lesser pay or be at low paying jobs where he/she is the sole programmer in a smaller shop that pays less.

    3.) Because space dominates the official indent rule space, there are more automated tools enforcing space-indent which in turn means tabbers only are able to tab in smaller non-CI environments, which in turn means they are again more common in mixed shops.

    4.) Tabbers are most commonly found in the web development community, where tab-indent means way less data travelling through the intertubes. Web coders earn less.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:There are a few easy explainations for this ... by phantomfive · · Score: 1

      where tab-indent means way less data travelling through the intertubes

      Once it gets through compression the difference is negligible. Once it gets through a minimizer, the difference is non-existent.

      --
      "First they came for the slanderers and i said nothing."
  65. Hmm by Ryanrule · · Score: 1

    This seem an age thing, right?

  66. They neglected to control for editors by Trevin · · Score: 1

    The type of text editor you use — Eclipse, Emacs, Nano, Notepad, vi, or some other IDE or stand-alone editor — can have a large influence on whether your code is intended with tabs or spaces, as most code editors have their own defaults for indentation. I would speculate that the type of IDE or editor a programmer uses has a higher correlation to salary than just tabs vs. spaces.

  67. Re:Only LUDDITES use tabs or spaces! by tepples · · Score: 1

    What's this supposed to mean? That the editor inside an app for making apps ought to store an app's logic as a syntax tree rather than as textual source code, with indentation calculated at runtime based on nesting in the tree?

  68. I'm not surprised by nospam007 · · Score: 1

    "Developers Who Use Spaces Make More Money Than Those Who Use Tabs"

    Small wonder. Just like in Microsoft Word, managers and executives have no clue on how to use tabs and uses spaces instead.

  69. Article is garbage. by GungaDan · · Score: 1

    It doesn't even say whether female developers use tabs or spaces more often. This important contributing factor to the gender pay gap must be investigated and corrected!

    --
    Eloi are stupid, throw morlocks at them!
  70. Re:I use spaces but indent by 2 spaces rather than by omnichad · · Score: 2

    I'm pretty sure that the actual space (ASCII character 32) is rendered the same width regardless of its placement, even on proportional fonts. Individual characters stand alone in size and rendering, except when ligatures are involved. Some programs will insert a different kind of white space character - like an em or en space, or a second space after a period - but a font does not have anything different to offer when rendering a space between sentences. All you have to do is look at your own original comment to see that the space is the same size.

    In Slashdot comments, my double-spacing is rendered in HTML as a single space because HTML only renders one space in a consecutive string of white space. However, I developed that habit out of visual preference - I started typing well after the typewriter era.

  71. On Tabs and Spaces by Qbertino · · Score: 2

    It's tabs. Here's why:

    1.) Tabs are characters specifically meant for indentation - that is the only reason this character exists.

    2.) They use up way less bandwidth. I once cut down an HTML document from my space fanatic buddy from 80kb to 36kb just by converting from spaces to tabs. When 50+% of your bandwidth is used up by whitespace, you're a shit coder. True thing. ... Use spaces on my product and I'll woop your ass.

    3.) With tabs everyone can decide on his own how far the indent is. That's how it's meant to be. That's the whole point of the indent character called "tab".

    That said, I've given up on trying to explain the above to space junkies - they really don't seem to get it.
    Today I usually avoid this discussion and settle for whatever the official standard is for a given programming language and use buildtools that clean up the code form excess whitespace before deployment on the web. For JavaScript that's space-indent with two spaces - really shitty, but I guess they're trying to suck it up to the C-snob crowd, so who am I to think I could stop them. The advantage in going with whatever is the standard for a given PL is that you can use the standard linters and commit hooks as they come and easyly set up your CI and build environment in such a way that it enforces uniformity. If that means only commiting two-space indents, I'll bite the bullet. Especially if I'm the lead and/or responsible for the dev-pipeline.

    --
    We suffer more in our imagination than in reality. - Seneca
    1. Re:On Tabs and Spaces by trg83 · · Score: 1

      Very little whitespace, including line breaks, needs to exist in web code meant to be consumed by another machine on the other end. If you are sending the original code typed by a developer over the web, you are doing it wrong. At a minimum, you would want to make sure your web server correctly supports compression, but generally you would want to pre-optimize your web content during your build process. The bandwidth argument is nonsensical and irrelevant to the tabs vs spaces argument.

      This is not in any way meant to pick on you or your preference: I see many benefits of a properly-orchestrated tab coding convention. I just don't think anyone should make the decision based on flawed reasoning.

    2. Re:On Tabs and Spaces by chefmonkey · · Score: 2

      2.) They use up way less bandwidth. I once cut down an HTML document from my space fanatic buddy from 80kb to 36kb just by converting from spaces to tabs. When 50+% of your bandwidth is used up by whitespace, you're a shit coder.

      The '90's just called and they want their webservers back.

      With a data point of one, it appears that people who use tabs might not understand the technology they're using. This may have explanatory power.

    3. Re:On Tabs and Spaces by Tony+Isaac · · Score: 1

      My biggest problem with tabs is that GitHub and other source code repositories do a terrible job of formatting tabs. If you use spaces, the formatting comes out consistently every time.

    4. Re:On Tabs and Spaces by Anonymous Coward · · Score: 0

      Personally, I consistently use two spaces for indentation, and set the tab character to insert a double space automatically. The reason is that (1) my job requires me to program a lot in Fortran, which doesn't support the tab character at all; and (2) deep loops become very hard to read with four-space indentation, while two-space indentation is really sufficient for readability. As for your bandwidth argument: as a non-web developer, the size of my code files doesn't matter at all. My code files are tiny compared to the rest of the project, such as e.g. data files that I process.

    5. Re:On Tabs and Spaces by naris · · Score: 1

      Wrong! The only sane choice are spaces! Tabs are a hugely bad idea! Only a true moron would advocate using tabs over spaces. A space is ALWAYS 1 character that uses 1 column. Tabs are sometimes 8 columns (which is the default value inherited form typewrites that toy see in notepad and other dumb editors), sometimes 4, sometimes 2, sometimes 3 depending on how each individual sets their editor (providing they use an editor that has settings. Anything using tabs that is worked on by more than 1 person, especially if vendors, outsourcing and.or offshoring happens, will repidly devole into a randomly indented mess that is impossible to determine where code blocks even are and are impossible to format correctly! As for concerns about bandwidth and space, that is complete rubbish! The 1970's want their 300 baud modem and floppy disks back!

    6. Re:On Tabs and Spaces by Anonymous Coward · · Score: 0

      > I once cut down an HTML document from my space fanatic buddy from 80kb to 36kb just by converting from spaces to tabs.

      If you are serious about minimizing the size of the HTML, convert both to a single space. HTML ignores extra spaces and tabs. Automate this so you can see the indenting while editing.

  72. Sure, for software bloatware you can charge more! by Anonymous Coward · · Score: 0

    Let's use 4 bytes for each line instead of one byte. Makes perfect sense!

  73. interesting, but why? by Anonymous Coward · · Score: 0

    Interesting cross correlation for two things that should not have cause and effect.

    Two theories:

    Perhaps there is something about what the higher paid folks are working on the tends to force spaces.
      Perhaps culture, language or IDE.

    Tabs save keystrokes but add other problems.
    Maybe the folks that feel that this is a bad tradeoff are making better decisions because they have more experience and have been burned by tabs.

  74. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    All you have to do is look at your own original comment to see that the space is the same size.

    Slashdot isn't a word processor that uses proportional fonts. Of course, the space is the same.

  75. Re: Only LUDDITES use tabs or spaces! by Anonymous Coward · · Score: 0

    My goodness tepples, you never told us you speak App. Now at last we have a way to reveal the meaning behind his gibberish.

  76. Great! by in10se · · Score: 1

    Another non-scientific poll/survey on the internet that means nothing, but is posted to cause a comment flame war. SPACES! TABS! GREAT TASTE! LESS FILLING!

    --
    Popisms.com - Connecting pop culture
  77. What about developers who mix tabs and spaces? by Monkier · · Score: 1

    Their salary should be zero.

  78. Definitely must mean that if you use spaces... by x_t0ken_407 · · Score: 1

    ...you'll make more money, right? That's how these things work right?

  79. Re:I use spaces but indent by 2 spaces rather than by omnichad · · Score: 1

    My comment is displaying in Arial - a proportional font. The font operates the same whether it's a word processor or not. If a word processor is displaying it differently, it's also not just a space character being displayed and the file won't contain just a space character either.

  80. Is it just me? by CustomSolvers2 · · Score: 1

    Or GitHub is too picky with the tab/spaces differences? I tend to use tabs (not something I really care about, but... I wish the worst to the Hooli-loving space heretics! LOL), but also in languages not caring about spaces/tabs (every language other than Python?) and IDEs which theoretically should take care of these issues automatically.

    For example, when writing C# in Visual Studio, I don't even need to use tab/spaces (write a line of code, with 1-space separations between words, press enter and VS automatically sets the left indentation of the next line). If I want to change the default indentation, I use tabs. Same thing with other IDEs I use like NetBeans, Eclipse or Code::Blocks; I also use Notepad++ quite a lot and it seems to perform quite well on this front (it might not even provoke the problem which I am referring right now). But here comes the tricky part: when I upload a code created with one of these IDEs to GitHub, I usually get some files with random lines being wrongly indented, even though they look fine in the IDE. I think that this is provoked by the times when I paste in the given IDE code which I have written with a different program.

    This isn't precisely a big deal, but kind of curious. Why is GitHub not getting what IDEs/editors get and even what the naked eye gets (if you edit one of these files in GitHub directly, let it looking fine and save it, the wrong-indentation might still be there; you have to remove all the lines not fully synchronised with the expected tabs/spaces)? Or even more important: why caring so much about spaces/tabs in programming languages pretty much ignoring that aspect and compiling fine regardless of this issue?

    --
    Custom Solvers 2.0 = Alvaro Carballo Garcia = varocarbas.
  81. Developers who kiss more ass make more money by zifn4b · · Score: 1

    Or I'm sure there are studies to show the correlation between ass kissing and promotions are ubiquitous across all fields. A corollary from this would be: It's not how well you do your job that matters, it's how well you kiss ass. Ego-stroking will get you everywhere. And that we also see in Silicon Valley as well.

    --
    We'll make great pets
  82. Re: I use spaces but indent by 2 spaces rather th by Anonymous Coward · · Score: 2, Funny

    Three spaces? That's ... odd.

  83. The true master uses 3 spaces rather than 2 or 4. by presidenteloco · · Score: 1

    2 can be hard for some people to eye the alignment accurately, and with 4 you run out of line length too often, unless you extend your program line arbitrarily like a moron.

    Also it is harder for the tab mafia to convert your 3-spaced code into tab graffiti.

    3 spaces - the choice of champions.

    --

    Where are we going and why are we in a handbasket?
  84. HyperTalk by tepples · · Score: 1

    I first learned 2s space because it was the standard for HyperTalk, the scripting language of Apple's HyperCard, and enforced by HyperCard's script editor. HyperTalk predated the World Wide Web, let along Google.

  85. Less than half reported their salary by Perl-Pusher · · Score: 1

    And many get paid less than plumbers. Really that is a pretty low salary, you would think they were H1B visa holders.

  86. Re:I use spaces but indent by 2 spaces rather than by mpercy · · Score: 1

    More explanation than one may want...

    https://en.wikipedia.org/wiki/...

    A related topic is kerning, which means that characters are *not* rendered the same in all cases. "kerning is the process of adjusting the spacing between characters in a proportional font, usually to achieve a visually pleasing result. Kerning adjusts the space between individual letter forms, while tracking (letter-spacing) adjusts spacing uniformly over a range of characters.[1] In a well-kerned font, the two-dimensional blank spaces between each pair of characters all have a visually similar area."

    "The CSS property text-rendering: optimizeLegibility; enables kerning in Firefox, Chrome, Safari,[11] Opera, and the Android Browser.[12] There is also a proposed CSS3 property font-kerning,[13] but it is only supported in Firefox (prefixed with -moz-), Chrome and Opera (prefixed with -webkit- in both) and in Internet Explorer starting at version 10.[14] The CSS3 draft suggests that kerning should always be enabled for OpenType fonts."

  87. Makes perfect sense. by Anonymous Coward · · Score: 1

    Nice guys always get paid less than rude assholes.

    Forcing your indenting preferences on others (by using spaces) is a hallmark of a rude asshole.

    1. Re:Makes perfect sense. by Anonymous Coward · · Score: 0

      Or perhaps you just have issues with feeling overly entitled to force code someone else wrote to fit your own personal worldview.

  88. I press the tab key. by Anonymous Coward · · Score: 0

    If it translates to X spaces or an actual /t, that's really not my problem because any whitespace-as-syntax language is fucking retarded and so are the people that use it.

    Fuck Python.

    And F#.

  89. editor question by cellocgw · · Score: 1

    I understand that lots of editors automagically convert the TAB key into four spaces. That's cute and all, but do any editors have the ability to "remember" that you hit TAB there so if you go back to delete the space, it'll delete all 4 space chars?

    I know from experience that none of the standard cheapo editors do, nor does, say, MATLAB's editor.

    There, then, is one excellent reason to use actual real TAB characters: the ability to delete them when you want to.

    --
    https://app.box.com/WitthoftResume Code: https://github.com/cellocgw
  90. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 0

    I heard about the two space indentation from a YouTube video that Google developers gave on Python.

    And if a Google developer mentions it, then that automatically means that ONLY Googlers do it, and it was invented at Google?

  91. Re: I use spaces but indent by 2 spaces rather tha by Anonymous Coward · · Score: 0

    Significant risk you will become a kernel hacker. Beware.

  92. LOL, I use em dashes! by WillAffleckUW · · Score: 1

    That's why I get the big money!

    --
    -- Tigger warning: This post may contain tiggers! --
  93. Re:I use spaces but indent by 2 spaces rather than by __aaclcg7560 · · Score: 1

    And if a Google developer mentions it, then that automatically means that ONLY Googlers do it, and it was invented at Google?

    That only works with Apple.

  94. Re:I use spaces but indent by 2 spaces rather than by amicusNYCL · · Score: 1

    This is fake news. If you can't see indents with 2 spaces, another space isn't the solution to your problem. 3 is right out.

    --
    "Our two-party system is like a bowl of shit looking at itself in a mirror." - Lewis Black
  95. Makefile by tepples · · Score: 1

    Makefiles use both. The Make standard requires that commands in recipes be indented with one tab. Everything indented that's not a command in a recipe, such as long lists of prerequisites for a target using a backslash for line continuation, uses spaces to keep them visually distinct from the recipe.

  96. What about IF brackets on the next line? by Anonymous Coward · · Score: 0

    I want to know if there is a salary difference between people who keep the bracket on the same line of the IF like so:

    if () {
    }

    Or put it on the next line, like this:

    if ()
    {
    }

    Word verification: butyrate

    1. Re:What about IF brackets on the next line? by mike2006 · · Score: 1

      I second that. I put it on the next line but always feel I am an outlier doing so. I do it because for me it is much easier to read the code that way and it is cleaner.

  97. Comment removed by account_deleted · · Score: 1

    Comment removed based on user account deletion

  98. Space matters little in minified script by tepples · · Score: 1

    Tabbers are most commonly found in the web development community, where tab-indent means way less data travelling through the intertubes.

    Why? A JavaScript interpreter uses braces rather than leading spaces to identify blocks. Line-initial space and most other whitespace gets removed anyway when the build process minifies JavaScript source into the form sent over the wire.

  99. What's worse than Spaces vs Tabs by Anonymous Coward · · Score: 0

    Idiots that program on huge virtual screens and don't think that anyone in this day anyone wouldn't be
    writing lines of code that make a perl one line look simple.

    In inherited project I have code files that have single lines of code that are OVER 500 characters.

    There is NO reason in hell to write a single line of code like that.

  100. Re:Only LUDDITES use tabs or spaces! by CaptainDork · · Score: 1

    LUDDITES don't use any equipment that has tabs or spaces ... or APPS.

    --
    It little behooves the best of us to comment on the rest of us.
  101. Simple explanation... by Anonymous Coward · · Score: 0

    More experienced engineers make more money, and also have more knowledge of the tools they use and have their editor convert tabs to spaces.

  102. Backspace for me by Anonymous Coward · · Score: 0

    I'm using backspaces, but earn nothing...

  103. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 0

    That only works with Apple.

    So then what was the point of your whole comment? Were you just commenting to spam your blog link around?

  104. Correlation by PortHaven · · Score: 1

    Correlation != Causation
    Correlation Causation
    Correlation NE Causation
    Correlation NOT EQUAL Causation

    Perhaps, the language and/or common IDE tools for a given language makes a determination as to whether tabs or spaces are used. In particular, something as simple as the default font used could make a difference in visual appeal. As such, what this likely determined is that a higher paying programming language's common IDE is likely more favorable visually toward spaces.

  105. Re:I use spaces but indent by 2 spaces rather than by omnichad · · Score: 1

    All of that says that most digital editors currently don't add a second space between sentences.

    I know all about kerning - but that's between letters within the word. Nothing to do with spacing sentences.

  106. Or, you now.... by rochrist · · Score: 1

    Developers who make more money prefer to use spaces over tabs.

  107. Re:The true master uses 3 spaces rather than 2 or by religionofpeas · · Score: 1

    with 4 you run out of line length too often, unless you extend your program line arbitrarily like a moron.

    Or you need to refactor your code better. Linux has no problems with 8-space tabs.

  108. Consistency... by pogopop77 · · Score: 1

    Spaces are always one character, tabs can be interpreted differently on different platforms/editors, etc. I use spaces, so I know exactly what the code will look like in any monospaced font. M-x untabify and C-M-\ fix non-compliant code nicely in emacs. Interesting correlation with salary, but I don't think there's any specific causation.

  109. Re: Only LUDDITES use tabs or spaces! by Anonymous Coward · · Score: 0

    App = advertising laden crapware
    Application = software used to accomplish a task.

  110. I'd also want more money for spaces by johannesg · · Score: 1

    I'd also ask for more money if my boss insisted on spaces. Like I have nothing better to do all day long than correcting code that starts in columns that are not multiples of 4...

  111. I use an auto indenter by choupette · · Score: 1

    that happens to use spaces.

    --
    -- moo
  112. Re: I use spaces but indent by 2 spaces rather tha by lgw · · Score: 1

    I worked with a person who used three spaces. He's "not with us" anymore. :)

    I use 3 spaces for personal stuff. 2 is just not enough visual cue for me. But I don't inflict that on others.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  113. Re:I use spaces but indent by 2 spaces rather than by lgw · · Score: 1

    I know for a fact the two very big ones use WebKit's style guide as a basis for most of their work, and that it asks you to use spaces.

    "Two" big ones? The large employers are the "Big 5": Amazon, Apple, Facebook, Google, Microsoft.

    What's a "WebKit"?

    --
    Socialism: a lie told by totalitarians and believed by fools.
  114. Re:I use spaces but indent by 2 spaces rather than by lgw · · Score: 1

    Five!

    Three, sir.

    I also can't work with 2 spaces - just not enough visual cue.

    --
    Socialism: a lie told by totalitarians and believed by fools.
  115. Click Bait by Anonymous Coward · · Score: 0

    Stop trolling us with irreverent and irrelevant click bait, Slashdot. The innuendo of Slashdot editors is that Python programmers are either amateurs at their craft or further down on the food chain than programmers who use languages that accept spaces.

    On the other hand, the innuendo could be that programmers who code with an IDE are lower down on the food chain than those programmers who code with a space based editor.

    Irreverent and irrelevant.

    Run some important surveys, Slashdot. No more "fake" surveys, please.

  116. Median very low by Anonymous Coward · · Score: 0

    With averages that low, you programmers who completed salary survey should spend more time coding or marketing your skills.

  117. Never mind developers, what about managers? by AxeTheMax · · Score: 1

    Top managers who use spaces because they never understood tabs (because tab's are something that only typists use), they make more money than anyone else despite being quite unable to format a simple document.

  118. Re:I use spaces but indent by 2 spaces rather than by sexconker · · Score: 1

    Why would anyone use 4 spaces?
    If you're using spaces, you use 2. If you want more whitespace than 2 spaces, you're a tabs man, not a spaces man.

  119. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 0

    ...now you're getting creimer. He thinks he'll retire a millionaire on the basis of a few atrociously horrible ebooks he's flogging through his activities here.
    It wouldn't be so bad except for his repulsive personality and repugnant writing.

  120. Re: I use spaces but indent by 2 spaces rather tha by mspohr · · Score: 1

    Probably left to get a better job where they appreciate the vast superiority of 3 spaces.

    --
    I don't read your sig. Why are you reading mine?
  121. Re:I use spaces but indent by 2 spaces rather than by mspohr · · Score: 1

    Try using more spaces.

    --
    I don't read your sig. Why are you reading mine?
  122. In other news, p-hacking can prove anything by Anonymous Coward · · Score: 0

    Turns out that you come to a conclusion first, then examine data looking for any statistical anomalies that might support your conclusion, then present those anomalies as proof that your conclusion is correct.

  123. Stack overflow is not... by Martin+S. · · Score: 1

    Stack overflow is not really a bastion of elite developers

    It's demographic is a reflection of its purpose.

  124. Correlation vs. causation? by arobatino · · Score: 1

    More talented coders might write elaborate routines with more levels of indentation. With tabs, the inner level lines would wrap around more and make it harder to read.

  125. Price of Eggs in Liverpool by Anonymous Coward · · Score: 0

    What does this survey have to do with the price of eggs in Liverpool? David Silver is not going to be any bit smarter if he makes £200 thousand than he is if he makes £500 thousand. He's still David Silver, one of the best. The point is that earning power isn't a sign of genius.

  126. Re:I use spaces but indent by 2 spaces rather than by sheph · · Score: 0

    Well thank you for settling that.

    --
    I don't believe in karma, I just call it like I see it.
  127. Mixed! by Anonymous Coward · · Score: 0

    Ugh, where I work the standard is hard tabs set to 8. I hate indenting so deeply, it's hard to read... but it is apparently the linux kernel standard, so that's what we do. I challenged it, but was told if you have to indent more than a couple of levels your function is too complex. That may be a reasonable answer for C and kernel code, but not always reasonable for user code or other languages.

    I set my editor for 4 spaces, but there is always a line here or there that has spaces instead of tabs and so it throws everything out of whack. It could be a cut/paste artifact, or a "smart" editor glitch, or who knows.But since everyone is using a "smart" editor nobody is paying attention, and the invisible mistake goes unnoticed until I open the file. But since I am using nonstandard indent, nobody really cares.

    They also use tabs to align inline comments, which are thrown off if you change the spacing. My standard is tabs to indent, spaces to align, and after some effort found a vim mod that does this. But it was took effort to find and install, and few other editors support this concept, which means nobody else does it.

    I finally resorted to a special rule in vim to set ts=8 in directories that I don't own, but default to ts=4 everywhere else. And I double check that my code looks good with ts=8 before I check in, otherwise if there is a visible indent issue someone will notice and re-tab my file.

  128. Slap him so hard ... by BenBoy · · Score: 1

    I slapped him so hard, his tabs expanded ...

  129. I suspect reverse causation by Dixie_Flatline · · Score: 1

    The correlation here is backwards.

    Programmers that make more money tend to use spaces.

    Why? Because programmers that make more money probably work for bigger companies. Bigger companies have coding standards. I've yet to meet someone that works for an organisation of any size that has a coding standard that enforces tabs over spaces.

    Now, why do companies use spaces over tabs? I'm not sure about that.

    1. Re:I suspect reverse causation by locofungus · · Score: 1

      Now, why do companies use spaces over tabs? I'm not sure about that.

      Because it's almost impossible to enforce consistent tab indenting. Apart from anything else you'll get passive-aggressive coders who will have a single tab at the start of every line and then use spaces.

      So even if space's weren't the right choice, it wins politically as you can enforce a "no tabs" policy. (Makefiles excepted)

      --
      God said, "div D = rho, div B = 0, curl E = -@B/@t, curl H = J + @D/@t," and there was light.
  130. I dont know much about space users by Anonymous Coward · · Score: 0

    but I know I stand for everything they DONT stand for. Also, they called us idiots.

  131. Theory: space is mandated by corporate styles by Anonymous Coward · · Score: 0

    My theory is that space is mandated by corporate style guides. When I'm banging stuff out for myself, I use tabs but I make no money on it. If enough money is on the line, I'm not going to argue about it. I'll just tap, tap, tap, tap the keyboard instead of tap the keyboard, or hopefully find a keyboard shortcut or hack that lets me delete 4 spaces when back-spacing at the beginning of a line. I'd be happy to switch to spaces and get along with everything in the repository if the editor were advanced enough to make the conversion fully transparent, ie, a non-issue. Perhaps the higher paid developers are also able to afford better tools.

  132. Eh, yes, both. by Ecuador · · Score: 1

    Tabs are for indentation. Everyone can choose how to display them, either as 2, 4, 8 (?!) spaces wide, by setting up their editor appropriately, and yet they all commit the same thing, one tab for each level, so there is no whitespace modification ever. Also, even people who use spaces in practice press the tab button. And the tab button produces spaces. Not OCD friendly.
    At the same time, ALIGNING things requires spaces. You align things (e.g. operators) that are at the same indent level (denoted with tabs) and everyone sees them the same, just at a different distance from the start of the line depending on their tab setting.
    At my previous job I had written the style manual, so we went with that. In my current work, it is all spaces and I don't really mind, as at least we use the same width that I'd use to render tabs, so everything looks nice. HOWEVER, it is not very rare for people to re-install, update etc their editor, continue hitting tab without realizing they had lost the spaces configuration, and their first commit changes all the whitespace...

    --
    Violence is the last refuge of the incompetent. Polar Scope Align for iOS
  133. Support for raise by VikingNation · · Score: 1

    Will my employeer give me a raise for switching from tabs to spaces.

  134. Re: I use spaces but indent by 2 spaces rather t by KGIII · · Score: 1

    True, but it is also rational.

    --
    "So long and thanks for all the fish."
  135. Tabs? by jlgreer1 · · Score: 0

    Maybe they put the difference on their tab. ;)

  136. Spaces always work, tabs sometimes work. by sl149q · · Score: 1

    If you use spaces to indent your source code will look the same for everyone and will look the way you intended. Spaces always work and always work in the same way. If you don't like counting, use an editor that uses the tab key to insert the proper number of spaces for the indentation. But counting always works if you can't figure that out.

    If you use tabs to indent you have to rely on people correctly setting the tab width to match what you are using. And if they don't know how to do that and it is set up wrong, their impression of your code is that you are a twit and don't know how to consistently format your code. This is especially a problem with PHB that may be have little technical knowledge and decide to have a look at something. First impression is that your code looks unorganized.

    People shouldn't be reformatting your code to match their expectation of indentation unless they are taking over the project. Use the same indentation (and tabs set to the correct tabwidth if that is what the original author used.)

  137. Another bullshit "article" on failing slashdot. by Anonymous Coward · · Score: 0

    Stack Overflow's "research" failed to account for the fact that only SOME of the respondents indicated what their income was, and it's self-reported, which means the info was garbage in the first place. You've heard of "Garbage-IN, Garbage-OUT," right?!?

    At most, if, and I do mean IF, the reporting IS accurate, all you can really take away from it is that people who use spaces in their code instead of tabs are more likely to disclose their income.

    By the way, I make over $75,000 a DAY from home writing code using neither spaces NOR tabs. Whitespace is for PUSSIES.

    See how easy it is to lie? I don't make that much money even in a YEAR, and I don't generally CODE since the only programming language I learned even close to the level where I could do anything in it was BASIC!!! (I also learned a little 8086 Assembler and C, but not enough to do anything useful with either.)

    The point of taking my valuable time to write this is because this kind of article on a day that isn't April First, begs a question: WHO THE FUCK IS EDITING AND DECIDING WHAT "STORIES" GET POSTED TO FUCKING SLASHDOT?!? Monkeys? Retards? Or just people getting paid to post BULLSHIT?

  138. Re:I use spaces but indent by 2 spaces rather than by beelsebob · · Score: 1

    The two big ones of those fave though, are Apple and Google these days.

    A WebKit... well... if you don't know what that is, you may need to learn a bit more about the tech industry.

  139. Perfectly normal by Anonymous Coward · · Score: 0

    Yes. Tabs are aligned on 8 space boundaries. Hence the scenario you describe is perfectly normal. I have used this exact system for more than 30 years. You are the anomaly if you have not used this or somehow think it is unusual.

  140. Re: I use spaces but indent by 2 spaces rather tha by Anonymous Coward · · Score: 0

    Kerning involves adjusting the space between a pair of characters individually for each pair. I fail to see how it couldn't be applied to widen the gap for a period+space pair ..?

    That being said, if it is used in the commonly used fonts, I've never noticed.

  141. Doesn't work by Anonymous Coward · · Score: 0

    Tabs are 8 spaces. Using anything else messes up all the alignment. You can't just change tabs to 4 spaces (say) and expect us to tolerate that.

  142. Yep by Anonymous Coward · · Score: 0

    I take up a lot of space and make ridiculous sums of money. If was down the TAB I may make a lot of money, but mostly be in debt all my life.

  143. Re:The true master uses 3 spaces rather than 2 or by Anonymous Coward · · Score: 0

    Moron like a fox...300 characters to the right is the perfect place to hide a logic bomb. Get that sucked buried deep in the rev history, under someone else's name.

  144. 1999 called... by Anonymous Coward · · Score: 0

    If you're not using a server filter to minify http responses (which removes nonsemantic whitespace) you are a shit coder. Knuth is right about premature optimisation: the only concern should be readability of source code because machines are better at optimisation than we are.

      And if you write HTML by hand you are a shit coder. And being so concerned with micro optimations is for shit coders. Seriously, is the a post from 1999?

    1. Re:1999 called... by naris · · Score: 1

      Micro optimizations were recognized as bad ideas in 1999 other than perhaps, for real time that ran often in limited environments such as micro-controllers and should of been coded in assembly or high performance applications such as games that were stretching the envelope of technology of the time. So really, it's the 1960s that called....

  145. Re: I use spaces but indent by 2 spaces rather tha by Anonymous Coward · · Score: 0

    Does everyone at Google rape goats, or just you?

  146. When Silicon valley (tv) lost its credibility by Smid · · Score: 1

    There's that moment in TV Shows where they get the tech wrong and all the believability just disappears.

    24 used to walk the fine line with this, but seemed to use basic gobbledegook interspersed with tech words so there wasn't a meaning...

    Mr Robot shot it completely when its executive walked up to the main star and complimented him on the use of Gnome as a desktop. Gnome??? Versus what? KDE? If it was cinnamon, mate or Xfce, yeah, but "oh look you use one of the most popular desktops on linux"!

    Silicon Valleys tech has always been a bit wobbly, though can be forgiven for making it funny. The tabs versus spaces thing just shot it to bits.

    You use an editor which converts your tabs to spaces, auto indents and allows mass selection and auto formatting according to languages. Whoever fed the writers that needs to enter the 90s. It's not even a putty vs mobaxterm (which is no battle at all, mobaxterm).

  147. Idiots will now switch to spaces by Theovon · · Score: 1

    What we have here is a bunch of average coders who have nothing better to do than take surveys, and we find that among them there is a correlation between the use of spaces and a *slight* boost in salary.

    What about the rock stars? What do they do? And what about the people who don’t consider themselves “programmers” who can code rings around those survey-takers? I know electrical engineers whose code looks like shit to me but beats the hell out of most of the stuff I see on github. Some use tabs, some use spaces. Who cares! These people make a minimum of $150K/year, putting them outside of the range of this sample.

    In my history of doing software engineering and digital circuit design, I have used tabs, spaces, and combos. After a while, I gravitated to using spaces in order to ensure that the code formatting would not change for different people. But what I actually use varies with the language.

    In C and C++, I use four spaces to indent. In Ruby, my two editors (vim and TextMate) do not have the same settings, so some code is indented 2, some 4. For Python, I use Jupyter, which I *think* defaults to 4 spaces, but I’m not totally sure, but I don’t care because I hate Python and only use it for sympy. For Java, I mostly use Netbeans, which I *think* uses 4 spaces. My Verilog code looks like a C programmer wrote it, because I can’t stand to put “begin" on separate lines, so I end up with things like “end else begin”, and I use four spaces to indent instead of the usual 2; I’m a maveric. I can read VHDL just fine, but I avoid writing it as much as I can. Assembly generally isn’t structured, so its indenting is really unimportant. I haven’t programmed Fortran since the days when you had to start in column 7. My Javascript code is indented like my C code; same with PHP. I can code in other languages too most of them require very little reading to get competent with the basic syntax, but the libraries can take a while to really master, so instead of investing time into “learning” them, I just google what I need as I go along.

    My favorite code-oriented job, however, is “expert witness.” There, I get to pick apart other people’s code and show how it does and does not match patent claims. I don’t have to write a single line of code, and I make $250/hour or more. The free trips to Washington, DC are nice too. Of course, this is no cake walk either. It takes a lot of concentration and energy to interpret patents and make sense of mazes of horribly structured code, which is why it pays that well. I keep getting called because I’m an expert in both graphics and digital circuit design, so the lawfirms always get a bargain.

  148. Retard alert..... by Anonymous Coward · · Score: 0

    All this post proves is that the posts author doesn't understand statistics.

  149. I wouldn't know how to answer by Anonymous Coward · · Score: 0

    I have vim setup w/ expandtab, so I press the Tab key, but it inserts spaces.

  150. Re:I use spaces but indent by 2 spaces rather than by lgw · · Score: 1

    Not sure why you'd think they're the biggest - they're all quite large (well, Facebook is the smallest). It's hard to get a count of total engineers in these companies, but Microsoft, may still be the biggest employer of devs - over 100K for sure. Amazon will be there soon if they aren't already - at the rate they're growing they'll be the largest employer of devs by far in about 2 years (they're current building 1 skyscraper a year in Seattle).

    Apple is the odd man out for not being "the cloud" as the other 4 are. The other 4 have fairly heavy interchange of devs between them now that the illegal recruiting agreements are gone.

    Judging by UIDs I've been doing this a bit longer then you kids on my lawn. But I write real code, not some silly "web" fad stuff that will be replaced by APPS (or so Slashdot informs me).

    --
    Socialism: a lie told by totalitarians and believed by fools.
  151. And? by Anonymous Coward · · Score: 0

    OK, people who use space make more money than those who use tabs.

    What about we talk about a significant reason to choose one over the other?

  152. Re:I use spaces but indent by 2 spaces rather than by Anonymous Coward · · Score: 0

    I've been using 2 spaces for indentation (and 1 space for continuations) since about 1985. This preserves structure while fitting more information on a line. For the same reason I put the '{' at the end of the line with the procedure definition or 'if' statement etc - more lines per page. That way you can keep to the rule of 'no procedure larger than a screenful' while actually getting some work done :-)

  153. Developers who use spaces instead of tabs... by Anonymous Coward · · Score: 0

    Developers who use spaces instead of tabs are more likely to accidentally add zeroes to survey questions about finances.

  154. Tabs vs spaces by Anonymous Coward · · Score: 0

    I use my Will to indent, saving me 7.4 minutes of lifetime from not having to hit keys.

  155. Of Course! by Anonymous Coward · · Score: 0

    Of course space-using devs earn more money. Because Space, and as we all know, Space is Cool!

    You know, Code In Spaaaaaaaccccccceeee! Cool.

  156. Tab Transform to Space by Anonymous Coward · · Score: 0

    Why not use both @ the same time?

  157. I press [Tab] to insert two spaces and... by Slashdot+Junky · · Score: 1

    I press [Tab] to indent for convenience. I configure editors to insert two spaces for each press of the [Tab] key and convert all existing TABs to spaces upon saving. I prefer spaces and like the indention increment set to two.

    --
    .
    Landfill Mining Co.
    Managing the (Un)natural Resources of Tomorrow
  158. Cause or Effect by herbierobinson · · Score: 1

    Most professional coders will use whatever conventions are already in use in the code they are working on. Programmers who re-indent and/or re-tab source code in a professional environment tend to get reprimanded for wasting time and messing up the merges.

    So, this is really more of a correlation with what types of projects pay better than whether spaces or tabs are used.

    --
    An engineer who ran for Congress. http://herbrobinson.us
  159. GoLang by snadrus · · Score: 1

    I use neither. When I hit save, it auto-reformats. I'm not sure really which it becomes.
    Checking...
    Tabs. Oh well, it's not me writing them.

    --
    Science & open-source build trust from peer review. Learn systems you can trust.
  160. SO WHAT!!! by martinfb · · Score: 1

    Wish I did not waste my time reading this silliness!
    I seriously doubt any correlation between salary and whether one uses spaces or tabs to indent!

    For what it is worth, I have my editor pad with spaces when I hit tab.
    That way, I can indent with spaces, yet use the tab key.

    Can I now get a raise in salary?!

    --


    Self-importance and self-indulgence is the root of ALL evil.