4 ms·
"Spaces instead of tabs in a codebase won’t bring any value to a company." This is wrong. If your company is still using tabs, it is already at a competitive d
by gridlockd 6y ago
"Spaces instead of tabs in a codebase won’t bring any value to a company."
This is wrong. If your company is still using tabs, it is already at a competitive disadvantage. If you force me to use tabs, I will be unhappy about that, because it greatly affects the mechanical part of my work. I will perform worse at my job and probably create debates about this very issue, all the time. I insist on spaces. I am the majority of programmers, because the ergonomic benefits of spaces are obvious.
If, for some odd reason, you have team members that insist on tabs - a position that I have never encountered in the wild - then make them change, not me.
- raxxorrax 6y agoThere can be no sweet catharsis without conflict about stuff that matters.
- onion2k 6y agoIf you're unable to configure your editor and code formatter to work around this issue so that code is converted to your preferred format when you open a file and back to the company style when you commit it then the chance of you writing any useful code is exactly zero.
- mantap 6y agoConverting from tabs to spaces is easy. But if you try to convert from spaces to tabs you may get a mixture because there is no requirement with spaces that the indentation is a multiple of anything. Code written using tabs is usually aligned differently.
- pitkali 6y agoBut isn't that just a matter of using a formatter to ensure correct style in addition to tabs? If you are using tabs for indentation, your style guide probably does not, or at least should not, depend on how wide they are on the user's screen.
- enriquto 6y agoI agree 100% with you, but transposing the words "spaces" and "tabs" in your text.
- phkahler 6y agoThe most important thing about spaces vs tabs is to have consistency. If some people use tabs and some use spaces the code becomes unreadable. However, should you find yourself dropped into a codebase that uses tabs you might be wise to adopt that standard rather than argue about it. Tabs still lead to issues, but not as bad as mixed use.
- gridlockd 6y ago> However, should you find yourself dropped into a codebase that uses tabs you might be wise to adopt that standard rather than argue about it. The wise thing would be to find another job, because this codebase and the company that maintains it is a sinking ship.
- pjc50 6y agoJokes and Poe-level parody don't work on HN. (POSIX 'make' insists on tabs, I wonder what you'd make of that)
- gridlockd 6y agoIf you insist on "POSIX" anything, I ain't on your team, so we're good.
- pjc50 6y agoThe rare Windows-only developer?
- gridlockd 6y agoYou generally don't have to care about maintaining "POSIX compatibility" even on non-Windows platforms, but if you are in the position where you have to, I don't want your job. Similarly, if your codebase is using tabs, I don't want your job.
- quickthrower2 6y agoI rarely know what stupid format I’m using. Just let the editor do it’s magic! Granted I avoid indentation oriented languages that don’t start with H