Earlier quoted context omitted.
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.
Is having a style preference bad? One can freely configure color scheme and font, so why should indentation be restricted?
Developers who use spaces make more money than those who use tabs
591–600 of 690 posts
Re: Developers who use spaces make more money than those who use tabs
#592Could it be that a few large, well-compensating employers are shifting the result? (E.g., https://google.github.io/styleguide/cppguide.html#Spaces_vs.... )
Could well be. I know that Google for sure requires spaces, and some cursory Googling leads me to the believe that Facebook does as well. Does anyone have information on Amazon, Microsoft, Apple, etc.? Of course, if all of the top companies are requiring spaces, then there's probably a reason for that, and its impact on salary data is thus meaningful, not just a spurious correlation.
Re: Developers who use spaces make more money than those who use tabs
#593Re: Developers who use spaces make more money than those who use tabs
#594Re: Developers who use spaces make more money than those who use tabs
#595= 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…
Who aligns like that? It seems to defeat the purpose of putting it on a separate line. void someNiceMethod( int myParam... ); Hey Presto! You, Joe and Jane all get your preferred size size of tab. As a bonus, this indentation style works equally well if Jim uses a non-fixedwidth typeface.
Re: Developers who use spaces make more money than those who use tabs
#596Re: Developers who use spaces make more money than those who use tabs
#597The 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.…
> The reason I use tabs is pretty simple. It's faster to move around only using the keyboard. Well, yes, if you use the arrow keys (unmodded) and nothing else. But who does that? Even Notepad lets you jump from word to word with CTRL-left/CTRL-right. Sublime Text must have something similar, surely?
Re: Developers who use spaces make more money than those who use tabs
#598Earlier quoted context omitted.
> 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…
My answer would be that any modern software development shop should be using a linter like Rubocop, eslint or gofmt that runs automatically on every commit. It doesn't actually matter what standard a group chooses, but there is real cognitive overhead to trying to understand inconsistently formatted code. And, people shouldn't be the ones criticizing incorrectly formatted code; a GitHub robot should be.
Re: Developers who use spaces make more money than those who use tabs
#599Use 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!
Re: Developers who use spaces make more money than those who use tabs
#600Earlier 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…
I see a lot of people work on large displays and with multi-monitor setups. Those who do not have their screens split into an 80-character or similar terminal and text editor width columns spend a lot of time switching between screens or applications. Couple this with the fact that you have to move your eyes around a lot on larger displays (and even head, in the case of multi-monitor set ups) and their setups actually make them navigate slower than they would on a smaller display.