this post was submitted on 01 Apr 2025
2 points (100.0% liked)

programming

258 readers
3 users here now

  1. Post about programming, interesting repos, learning to program, etc. Let's try to keep free software posts in the c/libre comm unless the post is about the programming/is to the repo.

  2. Do not doxx yourself by posting a repo that is yours and in any way leads to your personally identifying information. Use reports if necessary to alert mods to a potential doxxing.

  3. Be kind, keep struggle sessions focused on the topic of programming.

founded 2 years ago
MODERATORS
 

seriously, trying to use this crap is making me APEX-pilled

top 7 comments
sorted by: hot top controversial new old
[–] invalidusernamelol@hexbear.net 2 points 18 hours ago (1 children)

Why does everyone have to try and reinvent SQL? I can kinda get LINQ, and I've used similar patterns in Python using comprehension filters, but if your gonna be directly interacting with a database, why not just use SQL?

[–] kleeon@hexbear.net 2 points 9 hours ago (1 children)

Amen! SQL is by far the most powerful and easiest to use query language and I will fight anyone who tells me different. Raw SQL is easier to work with, easier to optimize and easier to analyze - why would anyone want to give this up?

Thankfully I've been seeing some positive movement in the industry away from ORMs, query builders and other such crap

[–] invalidusernamelol@hexbear.net 2 points 8 hours ago (1 children)

I still like a good query builder in the right context, like in the software I have to use a ton (ArcPro) you can quickly slap a SELECT * FROM <table> WHERE table.shape INTERSECTS input.shape using some drop downs and immediately discard the query once the selection is made.

For anything else where the selection is used repeatedly, it should be written in SQL so it can be profiles and debugged.

[–] kleeon@hexbear.net 2 points 6 hours ago (1 children)

I still like a good query builder in the right context, like in the software I have to use a ton (ArcPro)

yeah that's fair enough. I was just thinking about backend developement since that's what I mostly do. Query builders are still somewhat popular in that space unfortunately. Even this website uses a query builder, which has caused the devs a lot of problems because queries become impossible to optimise

[–] invalidusernamelol@hexbear.net 2 points 6 hours ago* (last edited 6 hours ago) (1 children)

Even this website uses a query builder

Wait what... Why? Is it at least plaintext? Or like an orm? Query builders should be a way to generate a SQL starting point...

I've used Metabase to do BI on databases before, and that has a pretty decent query builder, but it also lets you see the exact SQL it generates and convert the query to raw SQL at any point. Why would you ever lock a builder into your workflow...

[–] kleeon@hexbear.net 2 points 5 hours ago (1 children)

Wait what... Why? Is it at least plaintext? Or like an orm? Query builders should be a way to generate a SQL starting point...

It's a framework called "Diesel" and I have absolutely no clue why anyone would use something like this. I guess it has some nice stuff like migrations built in, but I don't know why they need any of the other stuff

[–] invalidusernamelol@hexbear.net 1 points 4 hours ago

Oh shit, is that the "ilovejesus" crate?