3 ms·
To make long story short, somebody discovered that developers who take care of their code -- how it looks and how it is being processed in a code repository --
by lmilcin 9y ago
To make long story short, somebody discovered that developers who take care of their code -- how it looks and how it is being processed in a code repository -- get higher salaries.
I earn my living from converting each company I work for to use a proper development process, and that more often than not includes migrating to Git. Why would anyone want to use Subversion in the presence of clearly superior tool, is beyond me.
Why this matters is, contrary to popular belief, not because Git is distributed or is more sound technically. It is because it allows you to create better and more readable commits by not requiring you to immediately commit to a shared pool of code that you then aren't allowed to change.
This means that you can commit locally to your repository as soon as you do any development. You can then work for however long you want to make your changes structured correctly in a readable way which is akin to refactoring code, only for changes. Only then you commit to the big ole repository maintained by your company.
Good developers will recognize that the readability of your code and of your changes is of paramount importance. They will prefer tools that make it easier to create good and good looking code because they take pride in what they do.
- IshKebab 9y agoYes except that any code that looks good with spaces can look equally good with tabs (or tabs-for-indentation, spaces-for-alignment). I can't see any reason why git would work better with spaces than tabs so that seems like a weak argument too.
- lmilcin 9y agoCode with spaces looks always good. Code with tabs looks good if the other developer has the same tab length, but will not look correctly if it is wildly different, because of the right margin not lining up correctly.
- IshKebab 9y ago> Code with spaces looks always good. Only if you don't care about the indent size, which many people do (otherwise we wouldn't be having this discussion). I mean you may as well say everyone should use Times New Roman because then it always looks good.
- mjevans 9y agoYou only say that because you're MIXING indent styles. Tabs first, ALWAYS, one tab is one level of indent. go fmt uses the UNIX lineage of defaulting to 8 spaces converting to a tab (worded in reverse). Your editor should easily display tab stops at a value that is ideal for you; you could set this to 2, 3, 4, or any other value if it makes things more readable to you.
- concede_pluto 9y agoAs long as I can tell at a glance which lines are more or less indented than other lines, I don't care how big indentations are. Making the right margin line up is a waste of time; I'm not going to spend my entire life staring at a fixed-pitch font to indulge someone else's retro ASCII art hobby.
- marcus_holmes 9y agowait, you right-align your code? How does that work?
- mikewhy 9y agoNot right-aligned, rather that using tabs means that 80 characters in one editor may not be at the same position in another editor with a different tab width.
- marcus_holmes 9y agoI'm not sure how that matters? Unless your team has a very strict "80 chars max" limit on line width I guess.
- deleted 9y ago[deleted]