Live data from Hacker News

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

stackoverflow.blog

581–590 of 690 posts

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

#581
post #568
post #312

Earlier quoted context omitted.

> The fact that Python's rule used to be 8 spaces, then got changed to 4 thereby invalidating old code really showed me how shortsighted it is to use a set number of spaces in a whitespace sensitive language. Not sure what you're talking about here. In Python, as long as the indentation is consistent you could (e.g.) use 2-space indentation to make a code block. It's considered bad practice, and most linters will com…

The right solution here would be to treat a tab as exactly pi spaces. This, while not forbidding the use of tabs, would guarantee that any inconsistent mixture of tabs and spaces would be considered misaligned.

I think pi*pi is even better. Twice the pi!

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

#582
post #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.…

> 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. This is exactly why I use tabs and the reason which appears to never get cited in the holy wars. People who use spaces want to line up their '=' signs, that's fine, but I don't believe it's my position to enforce the amount of whitespace another…

"I don't believe it's my position to enforce the amount of whitespace another developer has to use in their editor."

I suspect this might not be my most popular comment, but I honestly think that this is why tab users might actually make less than space users on average. On average, it's more productive to enforce things than leave everything configurable, thus different everywhere, thus harder to make sense of and debug. I knew brilliant people who don't want to "enforce" and decide and dim people who happily enforced and decided and it's always amazing how badly the former do career-wise relatively to their talent and effort, and how well the latter do relatively to theirs.

(Of course there might be another explanation for the data and I don't claim that my just so story is in any way scientific; though I think it should pass as a scientific theory in the social sciences.)

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

#585
It looks like they didn't correct for multiple comparisons. Given the number of questions on the survey, there was bound to be at least one surprising correlation that looks significant without correction.

(Am I wrong? I would hope a Data Scientist would know a basic thing like this, but I don't know R so I can't tell for sure from their code.)

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

#586
post #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.…

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

The paragraph above this one seems to use single spaces after periods. Is this a Hacker News formatting thing, or are you conning me?

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

#587

wow, clojure is really well-paying language

It is interesting to see that it is a well-paying language, according to that chart, regardless of whether one uses tabs or spaces. I suspect this has more to do with the sorts of programmers who work with Clojure, though.

I suspect it's geographic. That happened to Ruby in the past, these languages get traction first in Silicon Valley (highest paid area for software) and then spread out.

It's also not very mainstream. Stuff like Java or C# has millions of developers in lower-paying countries that bring their averages down (I'm one of them :) ).

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

#588
post #343
post #207

Earlier quoted context omitted.

> when another developer looks at the code, their IDE will render the tabs as whatever its set up for, 2 spaces, 4 spaces, etc. This is an argument I hear often from tab proponents. What it misses out is the downside: my IDE has a certain arrangement on my screen, and I'll either have to invoke horizontal scrolling or I'll have a bunch of wasted space if you are using different size tabs from me. This is far from fle…

> Further, the only sensible screen width is 80 characters, since that also works everywhere. I'm curious. Where does 80 characters not work now? How many people / industries are still using green-screen terminals with a fixed-width of 80 characters? I'm generally in favour of enforcing line-wrapping requirements, because I've worked with people that would have a tendency to write code that trails off the end of the…

Further, given that you're dealing with a language that uses significant indentation, you end up having to use stupid tricks that make your code less readable to stay under the bar.

Indented two levels (an 'if' block in a function in a class) and a couple of interpolated variables in an error message isn't unreasonable to have on a single line.

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

#589
On IBM mainframe terminals (327X) tabs were used for moving between entry fields. So it is/was basically impossible to use tabs in text for formatting. I'm not even sure if EBCDIC has tabs?

I don't really care that much, Go says tabs so whatever. But spaces have the benefit (or drawback to some) of rendering exactly the same way for everyone (assuming fixed width fonts, does anyone code with proportional fonts?). Also I've always got two thumbs on the space bar. And it's much bigger than the tab key.

So settled then?

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

#590

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…

Is "depends on whether I'm writing the batch file in notepad or wordpad" a valid answer?
Post reply on HN