Earlier quoted context omitted.
Tabs fail when my IDE is set to convert tabs to spaces and yours isn't.
Additionnaly diff/merge tool tend to be inconsistent. So it looks good on your editor, but when I am doing your code review, alignement is totally broken. In theory, it should be easy enough to ask people to have consistent settings across all tools, but it is a bit like herding cats. Sadly most people do not even realize it could look differently without their settings. (I could ignore whitespaces when doing reviews…
Developers who use spaces make more money than those who use tabs
211–220 of 690 posts
Re: Developers who use spaces make more money than those who use tabs
#212Use and respect .editorconfig files in your projects.
Re: Developers who use spaces make more money than those who use tabs
#213This 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…
It looks good that I'm such a hard worker. So I get paid more.
Re: Developers who use spaces make more money than those who use tabs
#214Earlier quoted context omitted.
It's pretty much an unwritten rule that a sarcastic joke on the internet with sufficient exposure will get a response by someone who didn't get it. Using /s really kills the fun (and whole point) of using sarcasm so it's a trade off to accept these comments will happen. I'm impartial to downvoting as to reply literally doesn't usually add to the conversation, which is generally the point of downvoting. Losing karma s…
Do you mean partial to? As in, you favor downvoting over commenting to point out their mistake? Don't mean to be nitpicky, just genuinely confused if that was a mistake or I'm misunderstanding.
Re: Developers who use spaces make more money than those who use tabs
#215Earlier quoted context omitted.
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…
> Tabs for indentation; spaces for alignment; If you try this, it fails for people who use a different tab size than you, which is the whole supposed point of using tabs. But yes, the correct answer is don't align. Utter waste of time.
If it fails, then you have not understood and you are not using your tools correctly. If your alignment depends on tab width, then you are not using tabs for indentation and spaces for alignment, you are using tabs for indentation and alignment and spaces for alignment, which of course breaks when you change your tab width.
Re: Developers who use spaces make more money than those who use tabs
#216Earlier quoted context omitted.
Tabs are only better for compatibility if you know that no one who touches the code will ever use spaces.
What kind of a dick opens up a tabbed project and starts inserting spaces? Even if you have a preference the other way you play nice with others and stick with the project conventions. The other thing you need to do is stop people from checking in code that doesn't follow project conventions.
https://github.com/ioquatix/rack-freeze/issues/2 https://github.com/ioquatix/latinum/pull/1
Re: Developers who use spaces make more money than those who use tabs
#217I see a few arguments here which suggest people think tab-users might care less about their code and/or their fellow coder. As someone who slightly prefers tabs and abhors mixing of tabs/spaces, I find this frustrating. I generally prefer tabs because I feel that they're more egalitarian: I like 4-space indentation, but don't want to force that on everyone encountering my code. Similarly, I find 2-space indentation v…
wat
Re: Developers who use spaces make more money than those who use tabs
#218Earlier quoted context omitted.
In fact, tabs are better for compatibility: other people might like other indentation sizes. If you keep your stuff consistently with tabs, and use spaces for alignment instead of having your IDE auto-replace tabs there as well, your code will look great with whatever tab size someone chooses. And extra pro: in dumb editors, you automatically get the right thing.
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…
Re: Developers who use spaces make more money than those who use tabs
#219Earlier quoted context omitted.
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
#220Earlier quoted context omitted.
> Tabs for indentation; spaces for alignment; If you try this, it fails for people who use a different tab size than you, which is the whole supposed point of using tabs. But yes, the correct answer is don't align. Utter waste of time.
> If you try this, it fails If it fails, then you have not understood and you are not using your tools correctly. If your alignment depends on tab width, then you are not using tabs for indentation and spaces for alignment, you are using tabs for indentation and alignment and spaces for alignment, which of course breaks when you change your tab width.