this post was submitted on 03 Dec 2025
608 points (99.0% liked)
Programmer Humor
27631 readers
1552 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
- Keep content in english
- No advertisements
- Posts must be related to programming or programmer topics
founded 2 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
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.
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.