Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
Sqlfmt: an opinionated online SQL formatter
21–30 of 94 posts
Re: Sqlfmt: an opinionated online SQL formatter
#22Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
It's become popular because people became sick of tools with bad defaults and a million options that could maybe make it better, but nobody uses.
Re: Sqlfmt: an opinionated online SQL formatter
#23It would be great if the parser supported question marks as placeholders. The pg_stat_statements table in Postgres saves denormalized queries, replacing the literal values with '?' placeholders (e.g., `SELECT * FROM table_name WHERE id = ?`).
Re: Sqlfmt: an opinionated online SQL formatter
#24Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
Having a sensible set of defaults can be helpful as well.
That said, sometimes "opinionated" can also just mean "I haven't had the have time to make things configurable yet".
The best of both worlds is "opinionated defaults but configurable". I use an excellent free SQL formatter called ApexSQL Refactor for SQL Server (Windows), and it came with decent defaults, but is also extremely tweakable.
Re: Sqlfmt: an opinionated online SQL formatter
#25I like https://www.sqlinform.com/ - keep a copy of notepad around just so I can use it. Wish there was a VSCode extension. The free version was good enough for my needs, but it's so handy I upgraded to the pro version just to show appreciation. The best part is the ability to really customize the layout and save the settings. It's always step #1 when someone sends me a massive blob of badly formatted SQL.
Re: Sqlfmt: an opinionated online SQL formatter
#26Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?
Re: Sqlfmt: an opinionated online SQL formatter
#27Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
Specific (or opinionated) design, interfaces, or formatting feels like an early declaration that the people in charge want to deliberately restrict an aspect of the software, in order to keep things consistent and reduce cognitive load during use or development. Constraints are freedom, and all of that.
Re: Sqlfmt: an opinionated online SQL formatter
#28Brief question, only tangentially related: Is it me or is "opinionated" software popping up all over the place? It looks to me like the author considers it a selling point, too. Can someone explain to me why I would want an "opinionated" software over any regular old software? Especially over a configurable software? I'm not a native speaker, but I never encountered "opinionated" being used with positive connotation.…
Perhaps it resonates more positively now to people who have had to work with "flexible" software such as Spring in the old days.
There were 100 ways to skin a cat with old Spring, and each way was a tortuous devil's brew of XML. Googling for any solution was a nightmare, exacerbated by hundreds of wannabe experts polluting the interwebs with their own strange takes.
Spring Boot was introduced in response as an opinionated approach. You can still skin the cat in 100 different ways, but at least you start with sensible defaults that someone far more knowledgeable than yourself had deemed to be good.
Re: Sqlfmt: an opinionated online SQL formatter
#29Tangentially related. I'm of the opinion that SQL shouldn't be uppercased. I don't want to hit shift or caps lock and I find lowercase easier to read. Are there others out there like me? I assume I'm in the minority, but I don't understand why. People stopped uppercasing HTML tags, why can't we do the same with SQL?
Re: Sqlfmt: an opinionated online SQL formatter
#30Earlier quoted context omitted.
That actually seems like a relatively minor complaint on the order of submitting a pull request to an existing fairly good project (as is pgFormatter) rather than coming up with standard 15 for SQL formatting in a new tool. An option where, if the column text doesn't overrun a column limit, is single line and then split once it does overrun doesn't sound like a bad feature, but it does sound like a small one. (additi…
It sounds like this formatter is sufficiently different in its approach (based on the prettier paper) that a PR would basically rewrite the existing one?
Sure, once you've gone and created a brand new tool you've gone past the point of a PR unless you were starting with a fork. My original question was, why jump to a new tool out of the gate when the differences seem fairly minor. Yes, I'm sure that pgFormatter probably didn't start with the prettier paper... but so what? If you aren't coming up with something really different, I'm not sure that matters.
Actually, thinking about it. What I need more than an SQL formatter is something closer to a linter quite frankly. In complex queries it's easy to miss something... I know, I know... I'm probably talking about something more like an IDE since many of the errors are likely to be logical rather than syntactic, but still... that would be a better problem to solve than a formatter right now.