5 ms·
> Why not save even more bytes and re-format the output to single tab indentation? For your answer search "programmers who use spaces make more money"
by CodeWriter23 4y ago
> Why not save even more bytes and re-format the output to single tab indentation?
For your answer search "programmers who use spaces make more money"
- z3c0 4y agoTLDR "Programmers who use spaces are more likely to respond to StackOverflow surveys soliciting information about their income."
- shynrou 4y agoThat's not how statistics work, unless you assume there is a correlation between tab users salary and their willingness to respond to surveys. Which would also be an interesting find
- z3c0 4y agoI'm curious if you've actually worked with surveys before, because this is how statistics work. All self-reported data has a bias based on a user's willingness to reply, and considering that predisposition as a variable is required. This is the exact reason that crime statistics are so crummy, even from anonymous surveys. Very few are compelled to admit to a crime that they haven't been convicted of (and some won't even to admit to that). Or why post-sale NPS scores have a negative bent - you're more likely to respond if you have a complaint.
- jdrek1 4y agoCorrelation != causation Spaces are simply inferior to tabs since the latter conveys the meaning of "one level of indentation" while the former does not. It's also better for accessibility and file size. There is not one single logical reason to ever use spaces for indentation, not one. For some very fucking stupid historical reason someone in the 80s made the idiotic decision of spaces being the default in editors and people just went with it. The people earning more are doing so because those are the seniors who have given up on common sense and just go with the flow of the masses who are unable to grasp "tabs for indentation, spaces for alignment" yet insist on keeping alignment so the (terrible) compromise is just using spaces. And I strongly question whether "alignment" is worth anything, in almost all cases it's just useless and in the rest you're drawing ASCII diagrams in the comments which doesn't affect your code at all. Also see the top answer at https://www.reddit.com/r/programming/comments/8tyg4l/why_do_developers_who_use_spaces_make_more_money/ https://www.reddit.com/r/programming/comments/8tyg4l/why_do_...
- jsyolo 4y agoWhat's the difference between indentation and alignment?
- usrusr 4y agoAlingment is leading whitespace that is expected to match the width of some non-whitespace text above, indentation is leading whitespace that is just expected to match all other indentations (* level). When indentation is scaled through editor reconfiguration, alignment should stay the same. What I think gp is underestimating is just how much alignment there was in the old days, and how little (compared to now) indentation. From today's perspective, indentation is the norm and alignment is the rare exception. Your question is a good illustration: sounds like you never met alignment, or at least never noticed it. But back then, alignment was a very regular occurrence and the extra diligence required for getting all the tabs and blanks right to look nice on different tab widths, or the ugliness from failing to get the mix right would have been a considerable cost. Avoiding unpredictably wide tabs was a reasonable call.
- jcparkyn 4y ago> Tabs are simply inferior to spaces... I think you wrote this the wrong way around?
- jdrek1 4y agoUps, yes. I had it switched originally but then for some reason switched it again. Apparently commenting late at night is not a good idea.
- ddoolin 4y agoTabs are denoted by arrows and I don't like being told what to do! :)
- CoastalCoder 4y agoThe arrows are not instructions. They're the LHS attacking the RHS. Code is war.
- throwup 4y agoI wish they had broken down that survey question further to find out _how many_ spaces the highest paid developers use. Then I could finally have a data-driven answer to put in my prettier config!
- tryfinally 4y agoSurely, on average, it's 3 spaces of indentation. Feels great to finally be able to derive objective answers to these ages-old conundrums!
- mypalmike 4y agoAverage is actually 3.27 spaces, which is what I now set for my tab spacing so as to conform with best practices.