this post was submitted on 24 Oct 2023
669 points (97.4% liked)

Programmer Humor

25484 readers
1750 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
 
all 31 comments
sorted by: hot top controversial new old
[–] ryan@the.coolest.zone 128 points 2 years ago (3 children)

Let him play in the legacy code. You can just hose him off later before letting him back into the office so he doesn't track it everywhere.

[–] ISometimesAdmin@the.coolest.zone 60 points 2 years ago (2 children)

Unfortunately if you let Junior play in legacy code once, it'll learn some nasty habits and make more of it from scratch, usually when you're trying to sleep.

[–] MonkderZweite@feddit.ch 5 points 2 years ago* (last edited 2 years ago)

That's what the line represents. So they can pull you if you do something nasty.

[–] mbp@lemmy.sdf.org 4 points 2 years ago

God, I would love that so much

[–] bappity@lemmy.world 49 points 2 years ago* (last edited 2 years ago) (2 children)

me when first starting out at a job commenting everything I can
VS
me a couple years in completely lost because I never updated the comments and now none of them make any sense whatsoever

[–] Landless2029@lemmy.world 4 points 2 years ago

Yeah well now we have git copilot where your comments include AI suggestions.

Now I have TONS more comments

[–] xmunk@sh.itjust.works 1 points 2 years ago

Commenting well is a highly advanced skill. I generally prefer no comments on code since it's less likely to confuse people and I'll merrily purge auto-doc comments and anything like

// getId() returns an id

That comment has negative value.

[–] magic_lobster_party@kbin.social 28 points 2 years ago (3 children)

There’s also that long time senior dev who’s overly confident in their abilities and force pushes production breaking code directly to master.

[–] Anticorp@lemmy.ml 11 points 2 years ago (1 children)
[–] magic_lobster_party@kbin.social 9 points 2 years ago

Nah, they’re the one who’s contributing most to the project. Mostly because their code is so garbage no one else can work with it. But that’s not a thing the managers take into account.

[–] jelloeater85@lemmy.world 10 points 2 years ago (2 children)

Yeet that shit into main. Who needs unit tests, it works on my computer?

[–] magic_lobster_party@kbin.social 9 points 2 years ago (1 children)

If it works in my mind it’s ready for production

[–] jelloeater85@lemmy.world 2 points 2 years ago
[–] wizardbeard@lemmy.dbzer0.com 5 points 2 years ago

YOLOdev is the best way to dev

[–] Strawberry@lemmy.blahaj.zone 1 points 2 years ago

This shit happened the other week for me. Senior dev pushed the shittiest JS code without testing the day of a production install and it caused us to have to roll back the install after it very predictably caused a bunch of crashes for pages on our public site. Worst part is, the entirety of what he wrote could've been implemented as a CSS media query

[–] pennomi@lemmy.world 27 points 2 years ago (1 children)

The leash is good unit testing.

[–] gjoel@lemmy.ml 6 points 2 years ago (1 children)

Oh, he'll just change the unit test if it fails.

[–] Killing_Spark@feddit.de 3 points 2 years ago

Unit tests are there to get an @ignore annotation!

[–] ericbomb@lemmy.world 16 points 2 years ago (1 children)

Look, it's me.

Just let me rewrite ONE report from scratch so it doesn't check a specific unindexed table that it doesn't actually need to check and causes the report to be killed by MSQL because it takes too long to run.

Please just one rewrite. Please.

Just one little crystal report.

[–] XTornado@lemmy.ml 9 points 2 years ago* (last edited 2 years ago) (1 children)

Just one little crystal report.

Ugh 🤮

[–] ericbomb@lemmy.world 3 points 2 years ago

I mean I agree with the vibe of that image but holy niche.

[–] XTornado@lemmy.ml 14 points 2 years ago (1 children)

Make him unit test it all and then they can do changes that don't break.

[–] justJanne@startrek.website 8 points 2 years ago (1 children)

Often enough, the old code is so badly intertwined that it's impossible to actually test. Those are the moments where all you can do is nuke it from orbit.

[–] XTornado@lemmy.ml 2 points 2 years ago* (last edited 2 years ago)

Well I was going for that... They will surrender before they do any changes.