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

Programmer Humor

20352 readers
813 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_[email protected] Let's just add one more feature

top 25 comments
sorted by: hot top controversial new old
[–] [email protected] 3 points 4 hours ago (2 children)

Isn't the most effective solution for traffic something in the middle? Both of these suck for different reasons.

[–] [email protected] 1 points 3 hours ago

@Matriks404 it dpends on the traffic. Where I grew up any more than the first would be dumb.

[–] [email protected] 4 points 4 hours ago

It's mainly public transit. Trains, busses, etc

[–] [email protected] 13 points 12 hours ago

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

[–] [email protected] 13 points 17 hours ago

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

[–] [email protected] 28 points 19 hours ago* (last edited 19 hours ago) (2 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.

[–] [email protected] 2 points 6 hours ago

I just need to add 20 if-branches in 15 methods across 10 different files from 5 modules.

[–] [email protected] 9 points 14 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.

[–] [email protected] 36 points 23 hours ago (3 children)

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

[–] [email protected] 3 points 7 hours ago

@JackbyDev BTW, I love the Netscape profile pic.

[–] [email protected] 8 points 19 hours ago

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

[–] [email protected] 8 points 1 day ago (3 children)

Single responsibility principal and dependency injection are your friends.

[–] [email protected] 2 points 8 hours ago

The problem is that so is the junior dev they hired to do the two seniors' jobs who left for less inhuman pay.

Code problems are usually people problems.

[–] [email protected] 1 points 13 hours ago* (last edited 13 hours ago)

Edit: Oops replying to wrong person sorry.

[–] [email protected] 2 points 14 hours ago* (last edited 14 hours ago) (1 children)

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

[–] [email protected] 4 points 13 hours ago* (last edited 13 hours ago) (1 children)

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.

[–] [email protected] 1 points 4 hours ago

I'm not familiar with Elm, but I wish you good luck praying that codebase stays functional

[–] [email protected] 50 points 1 day ago (1 children)
[–] [email protected] 40 points 1 day ago (2 children)

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

[–] [email protected] 4 points 23 hours ago

I exhaled vigorously through my nose.

[–] [email protected] 29 points 23 hours ago (1 children)

Oh, you must be looking for dragonsfuckingcars.

[–] [email protected] 3 points 3 hours ago (1 children)

Is that here in lemmy yet?

Asking for a friend.

[–] [email protected] 3 points 3 hours ago (1 children)

It sadly doesn't appear to be.

[–] [email protected] 1 points 6 minutes ago

Be the change you want to see in the world