top | item 41639138

(no title)

allochthon | 1 year ago

Overall I like the list. Some of the bullet points were stated a little more strongly than I was comfortable with.

> People who stress over code style, linting rules, or other minutia are insane weirdos

I feel like programmatically enforced linting is like keeping a shared house clean. Suppose you live in a house with roommates. You wipe off the counters, you clean up after yourself, you put dishes in the dishwasher, so that the house is tidy and pleasant. If there's a lint or style rule that requires judgment and is hard to enforce programmatically, perhaps better left as an occasional PR comment.

Programatically enforced linting also has the benefit of removing degrees of freedom that aren't very important and don't merit getting bogged down about.

discuss

order

arp242|1 year ago

The problem is that many linters are excessively pedantic, require workarounds that are just silly, and if we ask "does it actually improve things?" then ... often not really, not in a substantial way. Once you agree on the "big basics" like brace style or whatever makes sense for your language, you quickly get diminishing (often miniscule) returns.

This also ties in to what I call the "linter fallacy"; which goes something like:

"This code passes 56 linters"

"Therefore, it's good code"

And the related:

"Our code is a mess"

"I spent a week adding 56 linters and rewriting it all to pass"

"Therefore, now our code is good"

What really matters is "can I read this code naturally?" And if the answer to that is "yes" then it may be good code. Obsessing over whether it should be written with some small differences that don't really matter is just not useful for anyone.

randomdata|1 year ago

To be fair, those who become uncomfortable from words are equally insane weirdos.