3 ms·
> Software development being so opinion based is really irksome > One of my favorite tools in the JS world is Prettier, I have no idea how these two statement
by seph-reed 6y ago
> Software development being so opinion based is really irksome
> One of my favorite tools in the JS world is Prettier,
I have no idea how these two statements can exist in the same comment. They're basically polar opposites to me. Prettier is one of the most obnoxiously, over-bearingly, self-indulgent opinionated pieces of code I've ever tried to work with. And they even say it themselves, with pride: opinionated.
- city41 6y agoBecause the opinion boils down to "use Prettier" or "don't use Prettier". If you have a team that can agree to that, then all the arguing over formatting completely disappears. You're trading trying to find some arduous compromise across the entire team with "whatever Prettier does". In my experience people are at first disappointed they don't get exactly the formatting they want, but once everyone gets used to it and formatting discussions completely stop, it's a nice relief.
- edjrage 6y agoPlease tell me how that isn't equivalent to "adhering to <famous developer on Twitter>'s gospel" vs. "not adhering to <famous developer on Twitter>'s gospel."
- city41 6y agoBecause the point isn't "Prettier's formatting is the best", it's "let's nip the argument about formatting in the bud so we can focus on much more important things". I couldn't care less who made Prettier, many tools in this space would likely accomplish this goal.
- edjrage 6y ago> many tools in this space would likely accomplish this goal Exactly, so what made your team choose Prettier versus the other tools if not the fact Prettier is the trendier choice? If some of these other tools becomes the tool du jour, what's the guarantee that people won't start arguing that you should all move over to it? You only see it as nipping the argument in the bud while a single solution holds the majority mindshare on what to do with the argument.
- city41 6y agoYou seem to think I am stating Prettier removes all arguments and opinions. I said it "reduces the opinion surface". If some other formatter becomes popular, debating between it and Prettier is still way preferable over arguing over single versus double quote? Space around params? Opening brace at end of line or new line? Should if statements always have brackets? Should else statements start on a new line? Template strings or concatenation? Single or multi var? Let or const? Line up variable values on the same column? How many blank lines between functions? How long should a line be? How to format ternaries? I could go on and on and on. And on some teams I've been on, people have. I just roll my eyes at all of this. None of it matters. At all! Prettier takes 10 seconds to set up and our prettierrc file typically has one or two settings at most, often we don't stray from the defaults at all. It's totally painless. It'd take a very compelling tool to compete with that. If one comes along, sure, whatever. The goal is to minimize bikeshedding. Truly eliminating it is a tall order.