Live data from Hacker News

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

stackoverflow.blog

601–610 of 690 posts

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

#601

Earlier quoted context omitted.

Yeah, it can start some interesting conversations too - I don't care personally and tend to go with whatever autoformat in the editor uses. My view is that formatting code shouldn't be a human's job, adding linebreaks on long lines, spacing things out to exactly line up, etc is just a waste of my time. That's the computer's job - it should do it based on human readability rules though, clang-format is probably the be…

completely agree with you. and i religiously autoformat my code before i read the code and just before i save the file. However it still amazes me how the majority of developers i work with either have no opinion on the topic or worse think this is a bad idea. some the reasons I've heard was it makes alot of changes to a file causing alot of diffs with previous version making it harder to figure was was actually chan…

Doesn't that mean you make tools like git blame a whole lot less useful? I'm all for formatting my own code correctly, but I'm not going to nuke git history for a few spaces.

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

#602
What I learned from the last chart is that Clojure devs earn the most money regardless of whether they use spaces or tabs. Being an Elixir programmer also pays off nicely but for heaven's sake don't use tabs unless you want to earn only half as much as you could if you used spaces.

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

#603
post #599

Software developer must come to a flexible mindset in order to succeed. Use whatever's right for you! And, if you come to a workplace where there are "rules" about that, try to obey them. Never take part in any of those wars of Tabs vs Spaces, VIM vs Emacs vs Sublime vs whatever. Spend time on writing more tests instead!

If you have rules about formatting that should be part of automated formatting for the code which should be part of the standard (hopefully automated) check-in process.

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

#604
post #599

Software developer must come to a flexible mindset in order to succeed. Use whatever's right for you! And, if you come to a workplace where there are "rules" about that, try to obey them. Never take part in any of those wars of Tabs vs Spaces, VIM vs Emacs vs Sublime vs whatever. Spend time on writing more tests instead!

If you have rules about formatting that should be part of automated formatting for the code which should be part of the standard (hopefully automated) check-in process.

right on!

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

#605

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 this before or after you ask them how many ping pong balls would fit inside a Boeing 747?

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

#606
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.…

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

Why don't you just use a tab character?

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

#607
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.…

> It's faster to move around only using the keyboard.

There are faster ways, at least with JetBrains products, to navigate code that doesn't involve arrowing through spaces/tabs

The only reason I use spaces is the formatting is the same everywhere without messing with settings.

> Brace yourself: I use two spaces after the end of sentences too.

Me too! I was brought up this way. If you want to get into really sick and demented old habbits, my wife indents the first sentence of each paragrah... in emails lol

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

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

> but other than "it's everywhere" is there a more solid reason?

IMO you'd need a pretty good reason not to use the de facto standard, even if it's arbitrary. IIRC it has something to do with the width of teletypes

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

#609
post #218

Earlier quoted context omitted.

I have never seen this work correctly in practice, where a code base with tabs looks "OK" when opened on an editor with a different tab width. E.g. some coding styles will have subsequent lines line up (like multiline method params), and everything looks horrible with a different tab width. If anyone can post a sizable production code base that uses tabs that DOESN'T look like shit with a different tab width, I'm cer…

FreeBSD, Linux ... every UNIX kernel codebase ?

Linux looks like shit with any tab width besides 8. Simple example: https://github.com/torvalds/linux/blob/master/kernel/livepat...

Notice there are a couple examples in that code where multiline method calls are meant to line up, and if tabs are not set to 8 they don't line up.

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

#610

= Why Grown-Ups Don't Use Tabs = * Joe likes 4-space tabs, I like 2-space tabs, and Jane is old-school with 8-space tabs. * All goes well until someone aligns something visually, like so: void someNiceMethod( [tab][tab][tab][tab][space][space]int myParam...); * Now it aligns perfectly on my machine, looks mostly ok on Joe's machine, and is ON MARS on Jane's machine. Thus one-or-more of three futures happens: * Someon…

You mean something like this don't you? [tab]void some nice method(int param a, [tab] int param b So long as you only use tabs for indentation, not alignment, tabs look correct on _everyone's_ machine. The real problem with tabs is that (some) people are lazy and do stuff like this: [tab]void some nice method(int param a, [tab][tab][tab][space][space]int param b Personally, I think if you work like that you need to l…

The Linux codebase uses tabs, and presumably they have this rule about using spaces for alignment. I've seen tons of committed code that doesn't follow this rule, though, and hence Linux source looks like shit on anything besides 8 tab-width.
Post reply on HN