this post was submitted on 19 Nov 2025
328 points (92.9% liked)

Programmer Humor

27386 readers
1617 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
(page 2) 33 comments
sorted by: hot top controversial new old
[โ€“] saltesc@lemmy.world 19 points 17 hours ago* (last edited 17 hours ago) (5 children)

SQL enjoyer?

Every time I use it I feels like I'm going back to the 90s. No variables, no functions; Oh but you can do a CTE or subquery.......๐Ÿ‘

UNION ALL, UNION ALL, UNION ALL... "There's got to be a better way, surely..."

looks up better way

"Oh, what the fuck?!.... Nope, this will just be quicker..." UNION ALL, UNION ALL, UNION ALL...

Join in a table sharing column names... Everything breaks. You gotta put the new prefixes in front of all the headers you called in now. In every select, in every where, etc... Which is weird because that kinda works like a variable and it's fine...

"When you see this little piece of text, it means all this, got it?"

"Okay. Yep. Easy."

"So why can't you do that with expressions?"

SQL SCREAMS MANICALLY

"Okay, okay, okay!... Jesus..."

And then you try put a MAX in a where and it won't let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter...

I hate it. It has speed, when you can finally run the script, but everything up to that is so...ugh.

[โ€“] expr@programming.dev 6 points 14 hours ago

No variables, no functions

Every major SQL implementation includes both of those things. Of course, it's rarely needed or desirable if you know how to properly write SQL.

"So why can't you do that with expressions?"

You can alias expressions.

And then you try put a MAX in a where and it won't let you because you gotta pull all the maxes out in their own query, make a table, join them in, and use them like a filter...

Wtf are you talking about? For one, filtering by the output of an aggregate is what the HAVING clause is for. But even if that didn't exist, you could just use a subquery instead. You don't need to make table...

Tbh it just sounds like you don't know SQL very well. Which is fine, but doesn't make for a very compelling criticism. SQL does have warts (even though it's great overall), but none of what you described are real problems.

[โ€“] DarkAngelofMusic@lemmy.sdf.org 10 points 17 hours ago (2 children)

While I agree that "SQL Enjoyer" seems like a weird category, I personally love SQL. I've been using it professionally for over 20 years, and I've yet to encounter a more elegant, efficient, and practical language for handling data in a relational database. Every attempt I've seen to replace it with something simpler has fallen far short.

Which database systems were you dealing with, that didn't allow variables? My personal favorite is PostgreSQL, which does allow them on scripting languages, such as PLPGSQL.

[โ€“] Jesus_666@lemmy.world 11 points 16 hours ago (1 children)

See, I don't have to worry about such details. I work in corporate software dev, which means that everything is an MSSQL database where most of the tables contain only an ID of a table-specific format and a JSON blob. Why use an ORM when you can badly reimplement NoSQL in a relational database instead?

[โ€“] Quill7513@slrpnk.net 7 points 16 hours ago

hey hey, there there. don't worry. most of the major NoSQL DBs implement just as horrible of travesties

[โ€“] sp3ctr4l@lemmy.dbzer0.com 6 points 16 hours ago

Yep.

PostgreSQL is where its at, everybody else just hasn't figured that out yet.

[โ€“] Valmond@lemmy.world 2 points 17 hours ago (1 children)

LEFT JOIN

Includes empty entries, doubles others.

...

It sure is long due for an overhaul.

[โ€“] expr@programming.dev 5 points 14 hours ago (1 children)

That's the whole point of a left join? Anything else wouldn't be a left join anymore.

[โ€“] Valmond@lemmy.world 1 points 14 hours ago* (last edited 14 hours ago) (1 children)

Well I didn't expect doubles. I'm sure not an expert.

[โ€“] expr@programming.dev 5 points 14 hours ago (1 children)

It doesn't arbitrarily double rows or something. For each row in the relation on the left of the join, it will produce 1 or more rows depending on how many rows in the relation on the right of the join match the join condition. The output relation of the join may have duplicate rows depending on the contents of each joined relation as well as what columns you are projecting from each.

If you want to remove duplicates, that's what DISTINCT is for.

[โ€“] Valmond@lemmy.world 1 points 13 hours ago* (last edited 13 hours ago) (1 children)

Thanks, I will kot forget that the next time I have to do SQL!

Still wild there are no simpler language that have grown in popilarity for databases though.

[โ€“] expr@programming.dev 4 points 13 hours ago (1 children)

To be honest, it's remarkably simple for what it's doing. There's a ton of details that are abstracted away. Databases are massively complex things, yet we can write simple queries to interact with them, with semantics that are well-understood and documented. I think, like anything else, it requires a bit of effort to learn (not a lot, though). Once you do, it's pretty easy to use. I've seen many non-technical people learn enough to write one-off queries for their own purposes, which I think is a testament to its simplicity.

[โ€“] Valmond@lemmy.world 1 points 10 hours ago (2 children)

Oneliners are simple I give that to you, but then you have those incomplete tables and whatnot. Like take all entries from A and join B on A.id and B.id, set the result to some default if B doesn't exist.

You are surely going to whip up a perfect string of SQL but I'd struggle.

load more comments (2 replies)
load more comments (2 replies)
[โ€“] TheLeadenSea@sh.itjust.works 24 points 18 hours ago
[โ€“] sunoc@sh.itjust.works 12 points 17 hours ago
[โ€“] SoftestSapphic@lemmy.world 4 points 13 hours ago

I hate C++ so much

[โ€“] sexy_peach@feddit.org 14 points 18 hours ago
[โ€“] falseWhite@lemmy.world 7 points 17 hours ago (1 children)

Everyone using the web are JavaScript users, but what about JavaScript developers?

[โ€“] Uri 2 points 16 hours ago

Hopefully I keep js disabled

[โ€“] umbraroze@slrpnk.net 6 points 18 hours ago (2 children)

Yeah I wouldn't date an RStudio user. Real men do their R coding in Jupyter.

[โ€“] sp3ctr4l@lemmy.dbzer0.com 4 points 16 hours ago

... and thus they also have no time left to date.

I was gonna comment on why Jupyter isn't on here, and then I realized that any one who uses 'raw' R and/or Jupyter... they have 0 free time, they are generally overworked as fuck, thus they correctly are not even on a dating social graph.

Search your heart, or your datasets, you know it to be true.

[โ€“] adry@piefed.social 1 points 16 hours ago

The only truth in your statement is that I don't need any dates. RStudio is my loyal waifu.

[โ€“] cepelinas@sopuli.xyz 3 points 17 hours ago

So that's why they teach c++ in schools.

load more comments
view more: โ€น prev next โ€บ