Live data from Hacker News

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

stackoverflow.blog

151–160 of 690 posts

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

#152
post #30

As a spaces user, I have to acknowledge that I get irritated when I open a document with tabs and the formatting is messed up thanks to tab setting mismatches. Is it possible that tab-aversive people making hiring decisions act on their aversions (consciously or unconsciously), while tab-friendly hiring managers do not?

Can you explain that? I can't see how different tab settings would mess up formatting. Unless you use tabs to match the position of things over two different lines (which is abusing tabs), or mix spaces and tabs, tabs should work fine.

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

#153

Maybe it's an age thing : older devs tend to prefer spaces and are usually more paid than young devs.

Interesting how multiple people presumed that older devs prefer spaces, which seems like the opposite to me. Tabs are a thing of the past, people used to use them a lot, and now they are relatively rarely used.

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

#155

Earlier quoted context omitted.

In fact, tabs are better for compatibility: other people might like other indentation sizes. If you keep your stuff consistently with tabs, and use spaces for alignment instead of having your IDE auto-replace tabs there as well, your code will look great with whatever tab size someone chooses. And extra pro: in dumb editors, you automatically get the right thing.

I have never seen this work correctly in practice, where a code base with tabs looks "OK" when opened on an editor with a different tab width. E.g. some coding styles will have subsequent lines line up (like multiline method params), and everything looks horrible with a different tab width. If anyone can post a sizable production code base that uses tabs that DOESN'T look like shit with a different tab width, I'm cer…

> sizeable production code base

Here and there's the problem. Too many people with editors that go round replacing N spaces with tabs everywhere to have sane alignment in a code base with >1 developer...

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

#157
post #97
post #51

I've been using prettier.js in my JS projects for a few months and honestly I can't imagine going back to formatting my own code. It would be like making all of my own clothes or something. Who has time for that? The Go community was on to something with gofmt (even if they did decide on tabs).

I tend to agree, but aren't most of the new hot languages whitespace sensitive? Are there formatters for those kinds of languages?

No, whitespace-sensitive languages are still generally the exception (except newlines). In fact I can't think of a new language that is vaguely popular and whitespace sensitive since Python. I guess there is YAML but that isn't a programming language and is also a bit mental.

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

#158

What's going on with the salary disparity between US ($100k) and UK ($50k)?

I know nobody wants to hear this, but developers in the U.S. are overpaid compared to their peers in the rest of the world. We should count our blessings.

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

#160
post #90

Earlier quoted context omitted.

> My personal guess would be that using spaces is a practical decision and might be more popular towards older, more experienced devs (who are therefore better paid). They explicitly rejected this explanation after controlling for years of experience.

Oh, you're right. My mistake. That being said I'd be curious to see "years of experience working in a team ", because that's really when using tabs starts becoming tricky. If you're well disciplined and are the only person messing with your codebase the issues I mentioned in my previous post don't really apply.

I suspect that correlates pretty well with years of experience.
Post reply on HN