Live data from Hacker News

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

stackoverflow.blog

131–140 of 690 posts

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

#131
post #83

Earlier quoted context omitted.

They might be configured differently, and you usually can't align stuff properly using just tabs, you have to use a space or three somewhere. Also, you never know if it's spaces, tabs or a combination of them in existing code - which you may have not written yourself. So in the long run, the indentation WILL get fucked up and you WILL miss something when fixing a bug in code that you or someone else wrote 6 months ag…

>you usually can't align stuff properly using just tabs Huh? Things indented to 1 tab will align with everything else on 1 tab. Things aligned to 2 will align with everything else at 2 tabs. >you have to use a space or three somewhere Why? Tabs will indent with other tabs. >you never know if it's spaces, tabs or a combination of them in existing code Well they should never be combined for indentation. Unless you mean…

Oh god. I also prefer tabs, but if a file has a choice of tabs or spaces, never change the whole thing to what you prefer. Always keep it as is.

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

#133
post #32
post #22

Earlier quoted context omitted.

Personally, I have bad experience with tabs. Experience and salary are correlated. Also some languages are "tab friendly" and there are correlations between language and salary; see previous HN posts on the topic.

I'm thinking this has more to do with it.

See OP where blog author specifically disproves the language hypothesis.

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

#134

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.

It's not really prejudice if those 'tabbies' are just inferior, is it?

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

#135
post #61

Pretty simple: you use spaces because you're aware that there is more than one IDE/editor in this world and who knows what your code will get opened with tomorrow. This means you consider consequences beyond "but it works on my machine" so you're a better programmer. Ergo, higher salary.

That's the reason I use tabs for indentation? 4 spaces will render as 4 spaces, 2 as 2. 1 tab will render to whatever the next programmer prefers, it's only courteous.

It's courteous except to those that don't like tabs, so you really can't win.

Many languages have a coding style preference. Go is super opinionated, Python in the middle, with C being as conflicted as it gets. Whatever you use, follow the style the language or team is a proponent of.

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

#136
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…

The first place I would look is size of dataset and correlation effects from multiple self-reporters working for the same company.

Big companies tend to pay more in the software industry. Big companies also tend to have standardized on tabs or spaces internally to simplify the problem of merging code across developer teams. So if you find out that, hypothetically, Amazon, Microsoft, Google, and Facebook have all standardized internally on spaces, that alone could account for the data.

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

#138
post #18

Of course professionals get paid more, but I'm surprised there are so many tab users out there! Time to add a new interview question.

I believe the correct answer to that interview question would be "Follow the code style as established by the company, or keep it consistent within existing projects."

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

#139

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…

I don't see how that code is unreadable, but for me it isn't representative of how I would align that block anyway.
Post reply on HN