|
|
|
|
|
by digging
775 days ago
|
|
> Code is not art, it's instructions. I'll slightly disagree here because code needs to be read by a computer and by your human teammates. There are times when I'm frustrated because prettier is making a necessary but unintuitive choice and causing my code to become harder to read. But those are rare, and I would never trade them for the guarantee of readable code the other >99% of the time. |
|
Again, maybe I came off as more extreme than I actually am, because I think that consistent formatting is a very good thing most of the time, but that last 5-10% that programmers in positions of power fetishize is where things can get frustrating and time can get wasted.
The worst is when linter rules are used for things that should be evaluated by a human being in code review. At a previous workplace, someone thought it was a marvelous idea to try and enforce things like functions having no more than 6 lines or some other poppycock. My current workplace is OK, but even then there are some stupid rules like not being allowed to assign `this` to a constant, even though the function in-scope is being re-bound by some stupid middleware making it impossible to use fat arrows or `.bind` (in JavaScript). Sorry, but I'll assign whatever the f*** I want to a constant that isn't escaping the current scope in any way. What's also funny is that I've never worked anywhere that didn't have `eslint-disable` sprinkled everywhere. In many cases, these rules should be warning instead of errors, but because programmers love errors for some reason, virtually every rule violation needs to be an error.