Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I think the biggest and most obvious control is missing here -- the company they work for.

Much more likely is that companies that pay more, for whatever reason, insist on spaces rather than tabs as a required coding style.

A quick Google search reveals spaces are used rather than tabs by Google, Twitter, Mozilla, Facebook, Microsoft, Apple... so that already seems fairly suggestive as the cause to me.



I suspect part of the reason is that using spaces makes it easier to collaborate with many other developers on a single codebase. There's no worrying "How will this look to others who override the default tab width?", "How to make this line up most consistently for everyone?", "Will it cause issues for me if I override the default tab width on this codebase?", etc.


Or the language they're working in. Python devs use spaces, go devs use tabs.

But I don't think the average Python dev makes more than the average go dev.


If you scroll down a little bit, they control for language and spaces are still higher across the board.


> Python devs use spaces

Speak for yourself- I use tabs with every language


Yep, that's pretty much. It has nothing to do with which is better. Nothing whatsoever. It's just that a handful of companies that hire a ton of programmers and pay them a ton of money happen to share the same bias, and even that's probably because of copying each other. Even if you controlled for current company, alumni of those few have probably carried the gospel even further, again no matter if it's right or wrong. It's like observing that people who dress like Wall Street brokers make more money than people who don't, without considering what else it might mean that someone works (or had worked) on Wall Street.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: