Live data from Hacker News

Developers who use spaces make more money than those who use tabs

stackoverflow.blog

431–440 of 690 posts

Re: Developers who use spaces make more money than those who use tabs

#431
post #374

Earlier quoted context omitted.

There's actually a solid argument for "tabs for indentation, spaces for alignment", which solves both for preference and vertically aligning stuff: [tab]void someNiceMethod( [tab][space*20]int arg1 [tab]) But it basically requires having some visual indicator of what is a tab, which most people don't like. (edited for line breaks)

I like how it is in Sublime (2) - it shows whitespace characters on highlight.

That's pretty nice. VSCode has a pretty good option too that shows whitespace except single spaces between non-whitespace characters.

Re: Developers who use spaces make more money than those who use tabs

#432
post #276

Well, of course. Only companies with fuck-you money can afford the extra bytes spaces take up versus tabs, so it follows logically that they'd pay their developers more.

While your comment is obviously meant as a joke, it somehow rings true from my anecdotal experience. I'd also like to see an analysis of space-vs-tabs as it relates to operating systems. Again, from anecdotal experience, it seems spaces are more common for folks with *nix background who tend to work in product-oriented companies (i.e. where code is an asset) and tabs are more common with windows folks, who tend to wo…

> product-oriented companies (i.e. where code is an asset > IT (i.e. where code is liability

You got it backwards. In companies that sell code, code is an asset. In companies that sell services code is a necessary evil.

Re: Developers who use spaces make more money than those who use tabs

#433
In the past ten years I have had 7 different development positions (and a few IT positions), I have never been at a place that used tabs. Ruby, C, C++, php, C#, SQL were the languages used and there positions were scattered across medical, Retail/Wholesale, Government/DoD.

That someone with this many different types of experience can have accidentally avoided encountering whole class of people and their code, really puts into perspective how small the experience of any 1 person is.

Re: Developers who use spaces make more money than those who use tabs

#434
post #415

Earlier quoted context omitted.

Your issue is why you see people say "tabs for indentation, spaces for alignment." If you're trying to vertically align text, use tabs to keep it at the same indentation as the thing you're aligning to, and use spaces to adjust to vertical alignment. This will keep the vertical alignment regardless of the preferred width of the tab.

So for long lines to move an argument over to align with its predecessor on the previous line, like int f() { int someVariableName = myFunctionCall(expr(5), // ...you're saying line A is indented with tabs, and line B with spaces? Because that will misalign if your tab setting isn't the same. Or are you saying that both A and B are indented with spaces? Then what about line C, which will misalign with A and B if your…

You indent line A with tabs. You use tabs to line the start of line B up with the start of line A (indentation) and then use spaces to move it the rest of the way to where you want it (alignment).

Re: Developers who use spaces make more money than those who use tabs

#435
post #276

Well, of course. Only companies with fuck-you money can afford the extra bytes spaces take up versus tabs, so it follows logically that they'd pay their developers more.

While your comment is obviously meant as a joke, it somehow rings true from my anecdotal experience. I'd also like to see an analysis of space-vs-tabs as it relates to operating systems. Again, from anecdotal experience, it seems spaces are more common for folks with *nix background who tend to work in product-oriented companies (i.e. where code is an asset) and tabs are more common with windows folks, who tend to wo…

I use spaces because python.

Re: Developers who use spaces make more money than those who use tabs

#436
The difference between the salaries of tab-users vs. space-users in David's report are too close to call, so I added bootstrapped 95% confidence intervals for the aggregate median salaries (which was easy to do since the code was open source): https://twitter.com/minimaxir/status/875386185350168577

If the 95% confidence intervals for tabs and the 95% confidence intervals for spaces intersect at a point, there is a possibility for failing to reject the hypothesis that the difference between the two is nonzero at the alpha = 0.05 level. Since there is little overlap in most cases, the original hypothesis holds.

Re: Developers who use spaces make more money than those who use tabs

#437

Almost certainly a result of the spaces cabal and the (often unspoken of) prejudice against tab users. Don't think you make hiring decisions based on tabs vs spaces? Well you're part of the problem, then. I'm building an app to help you easily email your congressperson and ask them to create legislation requiring space/tab equality. This has to stop. Please consider donating to my Patreon.

> Don't think you make hiring decisions based on tabs vs spaces? I actually ask candidates "spaces or tabs?" in every single interview. I don't really care what the response is in regard to the holy war, and it doesn't mean anything on its own, but having SOME thought out response can be a GREAT indicator of how well versed someone is in general. e.g. I'm going to think way more highly of someone that says "tabs, bec…

> "whatever my editor sets it to".

Whats wrong with this? I just accept the defaults. Whether that is what the current project demands or what the editor defaults to. Why waste my time over these things?

Re: Developers who use spaces make more money than those who use tabs

#438
post #396
post #314

Earlier quoted context omitted.

Using tabs has the opposite of your intended effect: If there is any text which is vertically aligned beyond the first indent, then this alignment will break for anyone who doesn't have your tab width preference. They're then forced to change their editor settings to view your file in a non-broken way. I get way more pissed about someone else "forcing their preferences on me" when this happens than when I run into a…

vertical align serves no purpose. why would anyone ever considers it important? silly js devs and their var block...

Indentation is literally a form of vertical alignment. And unless white space is significant in your chosen PL, all forms indentation/spacing serves no purpose. What does you code look like?

Re: Developers who use spaces make more money than those who use tabs

#440
post #335

I see a few arguments here which suggest people think tab-users might care less about their code and/or their fellow coder. As someone who slightly prefers tabs and abhors mixing of tabs/spaces, I find this frustrating. I generally prefer tabs because I feel that they're more egalitarian: I like 4-space indentation, but don't want to force that on everyone encountering my code. Similarly, I find 2-space indentation v…

I think tab users are naive, misguided idealists rather than people who made a deliberate choice to screw over their fellow devs, sure. Tabs do indeed seem like they ought to be "more egalitarian" as you describe. It just doesn't work out that way in practice; it ends up more exclusionary because you wind up with a codebase that you can only work on if you have particular tabstops set up, rather than one that you can…

This is another style thing, I think. When writing Objective-C I always use spaces because lining things up is idiomatic to the language. Same with Python which has well-codified rules for many multi-line argument lists and the like. However, beyond that, I don't tend to line up assignments or anything else that has me doing "special indenting", so (at least with my code) this doesn't end up being an issue.

If I was working on a project where there was a strong preference for indenting assignments, or any other case like this, I would use spaces throughout.

Post reply on HN