Live data from Hacker News

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

stackoverflow.blog

521–530 of 690 posts

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

#522
As long as we are sharing crazy theories...

Boring corporations like boring spaces, and have to pay big, boring salaries to get any talent at all.

On the other hand, cool code slingers may or may not prefer tabs out of personal idiosyncracies, but as long as all of them get shortchanged by the VCs and/or startup founders...

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

#523

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.

So you're saying that if I spent 30 minutes learning fmt then I can expect a raise? Sold!

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

#524

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.

You probably mean companies that are loaded or well-funded or stupidly rich. This isn't the same as fuck-you money, which refers to the amount of savings a person would need in order to retire early and thereby bid their employer goodbye. See for example: http://time.com/money/4187538/f-u-money-defined-how-much-cal...

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

#526

Earlier quoted context omitted.

I'm pretty sure there's a circle of hell specifically for those who mix spaces and tabs. That being said, this problem and problems like it can be solved simply by not aligning things visually: print( 'some long thing', further, arguments ) Strictly adhering to indentation and never alignment can make the code a bit less readable, but conforming to a canonical indentation like this also makes it easier to reindent, m…

> can make the code a bit less readable Yes, and I'd say that that's a big problem. I'm not a religious opponent of tabs, but making code less readable just so you can keep using them wouldn't fly if I were Malevolent Whitespace Dictator For Life.

IMO, that reads just as well. Each object is still indented, it's close enough.

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

#527
post #224

Earlier quoted context omitted.

Don Knuth seems to agree with you a bit; TeX automatically inserts some extra spacing between the end of a sentence and the beginning of the next one. You don't have to type it yourself though!

That's why most people stopped inserting the extra spaces themselves, instead allowing the layout engine/word processor etc to do it for them.

Then your editor / layout engine has to be smart enough to distinguish between Dr. Smith and the end of a sentence.

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

#528
post #504
post #488

Earlier quoted context omitted.

While this is true they will look correct on everyone's machine, they'll be annoyingly wide in tools that display tabs as 8 spaces (such as less, most online diff displays, etc). But spaces will look the same regardless of tool, editor, anything.

I don't know what online diff do you use, but less let you configure the tab stop with the -x option, which is the point of using tabs: being able to chose what's more readable for you.

The only reason 2, 4 or 8 is less "readable" to anyone is because they have a mental breakdown when they see a style they don't prefer and can't get past it. Tab is a variable width character, it has no place in text laid out with fixed-width fonts.

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

#529

Earlier quoted context omitted.

There's actually a solid argument for "tabs for indentation, spaces for alignment", which solves both for preference and vertically aligning stuff: [tab]void someNiceMethod( [tab][space*20]int arg1 [tab]) But it basically requires having some visual indicator of what is a tab, which most people don't like. (edited for line breaks)

If a system requires thought and care to be used properly then people will inevitably use it improperly. Even skilled, thoughtful people make mistakes or get fatigued and take shortcuts. It seems to me that using tabs for indentation and spaces for alignment is a fragile technique. It's easy to make a mistake and not even notice. If you don't fix that mistake fast, people start to assume that maybe it's OK to ignore…

What I didn't say in my original comment is that I don't actually do this for exactly the reason you describe, and that I think spaces-only is the most robust solution.

That said, all you would need is editors to enforce "any line with spaces before a non-whitespace character must have exactly the same number of tabs as the previous line." Which would not be all that difficult, but currently (afaik) does not exist.

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

#530
Well, in a team with a bunch of programmers each with their own preferences is kind of tedious to talk and enforce a single formatting standard... So, I just make sure a small script runs #astyle -A2SKnjfUHpk1cn -R .h .cpp before their commits .. and it made my diff look much nicer.. I don't really discuss tabs or spaces anymore..

I never thought that such styling would really matter much ... I wonder how much a developer using a beautifier earns in average..

Anyhow, statistics sometimes brings up some weird conclusions.

Post reply on HN