this post was submitted on 15 Jul 2023
1226 points (98.9% liked)

Programmer Humor

19551 readers
955 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 1 year ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[โ€“] Aceticon@lemmy.world 2 points 1 year ago (1 children)

It's sad that it took getting so far down the thread before somebody pointed out the obvious program design flaw.

If you're digging many levels down into your datamodel from high up for lots of datapieces, it's probably the case that both the data is unnecessarily framented and the code design itself doesn't have proper OO isolation of responsabilities.

If you're designing for performance (a well know raeson to screw OO design), then the datamodel itself would be a lot flatter (because you get more performance on the DB by trading it for space), whilst if you're not then you break the thing into parts as you have functions were you fetch intermediate objects into memory and handle the data in them (a Visitor Pattern would probably make this a lot cleaner).

I bet whomever designed the datamodel isn't the same as those doing the coding.

[โ€“] bleistift2@feddit.de 1 points 1 year ago

To be fair, probably hardly anyone actually looked at the code. And now that I did, I think this is compiled, not source code.