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

Programmer Humor

27631 readers
914 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
[–] ChickenLadyLovesLife@lemmy.world 33 points 21 hours ago (10 children)

Ironically, one of the universal things I've noticed in programmers (myself included) is that newbie coders always go through a phase of thinking "why am I writing SQL? I'll write a set of classes to write the SQL for me!" resulting in a massively overcomplicated mess that is a hundred times harder to use (and maintain) than a simple SQL statement would be. The most hilarious example of this I ever saw was when I took over a young colleague's code base and found two classes named "OR.cs" and "AND.cs". All they did was take a String as a parameter, append " OR " or " AND " to it, and return it as the output. Very forward-thinking, in case the meanings of "OR" and "AND" were ever to change in future versions of SQL.

[–] jacksilver@lemmy.world 17 points 20 hours ago (7 children)

Object Relational Mapping can be helpful when dealing with larger codebases/complex databases for simply creating a more programmatic way of interacting with your data.

I can't say it is always worth it, nor does it always make things simpler, but it can help.

[–] trxxruraxvr@lemmy.world 10 points 19 hours ago (2 children)

I don't have a lot of experience with projects that use ORMs, but from what I've seen it's usually not worth it. They tend to make developers lazy and create things where every query fetches half the database when they only need one or two columns from a single row.

load more comments (5 replies)
load more comments (7 replies)