Live data from Hacker News

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

stackoverflow.blog

121–130 of 690 posts

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

#122
post #42

This does not mean that changing from tabs to spaces will increase ones income. I would expect there simply is a confounding factor that the author did not look at. Maybe the info is not in the data. I can imagine that the space/tab choice is related to the "upbringing" of the developer. Maybe which language or editor they used first in their life. Or maybe it's related to culture. For example when using IRC, tabs ar…

Kidding aside I rather doubt anything really believes there is a causal relationship between one thing and the other.

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

#123
The reason I use tabs is pretty simple. It's faster to move around only using the keyboard. It's also faster if I'm changing code that requires reformatting. Finally, when another developer looks at the code, their IDE will render the tabs as whatever its set up for, 2 spaces, 4 spaces, etc. In other words, it adds flexibility.

Brace yourself: I use two spaces after the end of sentences too. [1] I am quite the rebel.

Modern IDE's (Sublime Text) let you easily convert spaces to tabs (or vice versa) and intention length of existing code. [2]

[1] http://www.slate.com/articles/technology/technology/2011/01/...

[2] https://css-tricks.com/changing-spaces-tabs-sublime-text/

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

#124
Ugh, could it be because those who use tabs are from a younger/less experienced/less paid generation that have learned to program with tabs, as opposed to programming veterans who were used to spaces?

I don't think the fact that you use spaces automatically makes you a richer programmer.

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

#125
post #27

Earlier quoted context omitted.

Where does using vim to insert four Spaces everytime I press tab leave me?

Yea, I'm honestly surprised this is a thing still. I've not thought about the tab vs spaces "war" in years; because of Vim. I just hit Tab and whatever the pre-defined standard is, be it tabs or spaces and space count, is used. Visually I can have it display in my editor of choice (Kakoune at the moment) however I want. I guess I'm just saying, I would have thought the most common answer to this question would be: Wh…

Employer and language has a lot to do with how much you make.

Imagine that half of those interviewed worked at Google.

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

#126

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.

The eight spaces companies are clearly flying high and the place to be if you're looking for mad bank.

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

#129

Earlier quoted context omitted.

unless you have anything aligned in columns then all bets are off (something which many code formatters can do automatically for you e.g. lists of bindings)

Tabs for indentation; spaces for alignment; I don't know why you'd want to insert tabs in the middle of a line. Also, most people who do have several years of experience under their belt will tell you: don't align. Mid-line alignment is a waste of a maintainer's time to have to update alignment blocks every time you add/remove variables... and statement-alignment is unreadable[1]. [1] https://github.com/pennersr/djan…

> Tabs for indentation; spaces for alignment

On a large code base with multiple committers, I've never seen this rule followed consistently. In fact, I think this shows a poor engineering decision: "Let's make a rule where everything looks OK 95% of the time, except when you change tab widths (which is, presumably, why we made the rule in the first place.)"

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

#130

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.

Tabs are only better for compatibility if you know that no one who touches the code will ever use spaces.

But the same is true for spaces...
Post reply on HN