this post was submitted on 05 Feb 2025
473 points (99.8% liked)

Programmer Humor

20305 readers
1365 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
 

@programmer_humor@programming.dev Let's just add one more feature

top 15 comments
sorted by: hot top controversial new old
[–] Kng@feddit.rocks 1 points 16 minutes ago

Don't worry its going to get refactored any day now

[–] livingcoder@programming.dev 5 points 5 hours ago

When your management judges teams by lines-of-code written.

[–] LovableSidekick@lemmy.world 13 points 7 hours ago* (last edited 7 hours ago) (1 children)

I've reworked SO many systems that started clean and were obviously updated by a series of different people over a span of years. New features nailed on with apparently little understanding of the overall app. It's like, "Oh dude it was already doing 90% of what you wanted, you didn't have to add all this... ." Especially true when offshore contract agencies had been involved - to churn through jobs as fast as possible (with no other concern) they tend to copypaste sections of the app that do something similar to what's desired, and make minimal changes to them, with zero code cleanup. This leaves all sorts of misleading unnecessary code, as well as inefficiencies like grabbing a large dataset to get a single item, etc. I found things that made me literally LOL.

[–] chunkystyles@sopuli.xyz 1 points 2 hours ago

Our off shore contractors produce some of the worst code. But it's impossible to get work done and also be vigilant enough to reject their bad pull requests. So basically you'll end up looking a code one day that is godawful and think, "this is off shore". And yep, git blame tells you you're right.

[–] JackbyDev@programming.dev 24 points 11 hours ago (2 children)

I feel line this would be funnier as "code updated to do 999 things"

[–] LovableSidekick@lemmy.world 3 points 7 hours ago

Excellent point. Sometimes removing functionality is much more kludgy than adding it.

[–] dumnezero@piefed.social 40 points 14 hours ago (1 children)
[–] QuazarOmega@lemy.lol 27 points 13 hours ago (2 children)

I'm disappointed that I misunderstood the topic of that community

[–] xmunk@sh.itjust.works 18 points 11 hours ago

Oh, you must be looking for dragonsfuckingcars.

[–] ByteJunk@lemmy.world 3 points 11 hours ago

I exhaled vigorously through my nose.

[–] fsxylo@sh.itjust.works 5 points 14 hours ago (2 children)

Single responsibility principal and dependency injection are your friends.

[–] davidagain@lemmy.world 1 points 51 minutes ago* (last edited 50 minutes ago)

Edit: Oops replying to wrong person sorry.

[–] Boomkop3@reddthat.com 1 points 1 hour ago* (last edited 1 hour ago) (1 children)

Also makes it easier to put spaghetti back onto the right track

[–] davidagain@lemmy.world 3 points 50 minutes ago* (last edited 40 minutes ago)

You reminded me of a guy who’s always banging on about how Elm combs the spaghetti in your source code for you and the meatballs and sauce are only mixed in at compile time. He says object oriented programming is like threading the pasta through the meatballs which is OK before anything’s cooked but after that it gets too soft and entangled and the spaghetti won’t thread through so you start again rather than refactor. It was a compelling image and got me curious.

I used it for the second rewrite of a side project WebApp a couple of years ago, and I it felt like I had to do everything from scratch by hand all the time at first, but I have to admit that maintenance has been an absolute dream compared with the old codebase. New features, changed functionality, it’s always good and you don’t need to reunderstand everything because it’s all so separated and I told him he was right. It writes the css for you and I kid you not, I did not miss that flakey nonsense one bit.

Our boss is shit scared of anything even a little bit different, though, so he noped out hard when he saw the syntax and got all shouty about all the whitespace and arrows on the big branching statements before launching into a sermon about how you can’t have a corporate look and feel unless you use css. I lost quite a lot of respect for him that day.

Our code at work is so like the bottom picture. You have absolutely no idea whether you just filled someone's underpass when you build another bridge over the top and sometimes you just have to kill the whole branch you've been working on because adding a f*ing overhead sign collapsed seven other things and no matter what you try, you can't undo whatever it was that collapsed. I swear, one day we're going to find that someone accidentally nuked twelve routes six months ago and there's nothing anyone can do about it any more.