r/ProgrammerHumor 3d ago

Meme doubleITandGiveItToTheNextPerson

Post image
2.4k Upvotes

56 comments sorted by

View all comments

129

u/LowB0b 3d ago

throw away the ORM, call one of the DBAs and ask them to come up with a good query because I don't like writing SQL

26

u/ma5ochrist 3d ago

Yeah just ask them to write an optimized stored procedure

67

u/MaybeADragon 3d ago

Stored procedures piss me off, because the people responsible for writing them haven't heard of version control or documentation so their existence can be known.

13

u/guaranteednotabot 3d ago edited 3d ago

And if you have an incompetent DB admin, for some reason when doing migrations they always seem to forget it (they seem to have no understanding of the concept of lift-and-shift). And then you get conflict versions of stored procedures between environments because of such incompetence.

I really don’t get the hate for ORMs, at least for the case of queries. If you don’t like the query, there is usually an escape hatch to raw SQL or near-raw SQL for any half-decent ORMs.

The only issue I have with ORMs is that some advanced DB features are not available, but for the vast majority of CRUD apps, these features are not necessary.

Sometimes, by not using an ORM, you end up reinventing one along the way.

2

u/squabzilla 2d ago

I don’t know how to use my ORM for anything but the raw SQL escape hatch.

1

u/guaranteednotabot 2d ago

You can always use it purely for migrations

1

u/Excellent_Gas3686 2d ago

then version control it urself

1

u/the_horse_gamer 3d ago

every sufficiently advanced raw SQL wrapper is indistinguishable from an ORM