4 ms·
> People who stress over code style, linting rules, or other minutia are insane weirdos I'm less concerned about which coding style, but it is important that e
by tasty_freeze 6y ago
> People who stress over code style, linting rules, or other minutia are insane weirdos
I'm less concerned about which coding style, but it is important that everyone (mostly) follows the same coding style.
Not all coding style rules are minutia. I've worked on code bases which have a mix of hard and soft tabs, with tabs sometimes mixed in the middle of the line, not just at the start of line, and where different authors use tabstop=2 or 3 or 4 or 8, all in the same file. And comment lines that are more than 400 characters wide.
- beagle3 6y agoThis is completely and trivially solvable via a checkin filter that refuses tabs (or expands them to a given number of spaces). Why fuss about it?
- tasty_freeze 6y agoWhy a fuss? Because some people think their choice to use hard tabs and a given tabstop setting are right and refuse to allow autoformatting tools or even just a hard tab replacement. Or they might argue: sure, the formatting is a mess, but if we reformat the code it will make tracing version control blame logs more difficult. 35 years ago, a friend told me the he and the other guy working on a piece of code would play tug of war with their shared files. My friend would replace tabs with spaces whenever he had to edit a given file, then the other guy would replace leading spaces with tabs whenever he edited a file.
- beagle3 6y agoYou can easily set a server-side commit/pre-receive hook that would enforce any specific agreed upon standard. Anyone who isn’t a team player, doesn’t get to commit (open source) or paid (commercial / closed source). It is one of those occasions that a 5-like configuration can save months of bickering.
- spamizbad 6y agoI think this gets solved easily by using autoformatting tools and use them as pre-commit hooks or an informal agreement among the devs to have their dev tools run it on save or whatever.