this post was submitted on 03 Dec 2025
758 points (99.0% liked)

Programmer Humor

27635 readers
1736 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] bort@sopuli.xyz 7 points 13 hours ago* (last edited 13 hours ago) (1 children)

the problem with ORM is that some people go all in on it and ignore pure SQL completely.

In reality ORM only works well for somewhat simple queries and structures, but at some times you will have to write your own queries in SQL. But then you have some bonus complexity, that comes from 2 different things filling the same niche. It's still worth it, but there is no free cake.

[โ€“] elkien@lemmy.today 5 points 10 hours ago

I've always seen as that as a scapehatch for one of the most typical issues with ORMs, like the the N+1 problem, but I never fully bought it as a real solution.

Mainly because in large projects this gets abused (turns out none or little of the SQL has a companion test) and one of the most oversold benefits of ORMs (the possibility of "easily" refactor the model) goes away.

Since SQL is code and should be tested like any other code, I rather ditch the whole ORM thing and go SQL from the beginning. It may be annoying for simple queries but induces better habits.