this post was submitted on 19 Nov 2024
348 points (97.5% liked)

Programmer Humor

19594 readers
732 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
 
top 20 comments
sorted by: hot top controversial new old
[–] [email protected] 18 points 6 hours ago

if you didn't intend for it to work and it's working then it's not working as intended

[–] [email protected] 45 points 9 hours ago

It's always scary when it compiles without errors the first time. Then you just know there's a logic bug or corner case in there somewhere.

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

My favourite is always;

Lemme quickly write this test, it passes great, if I make this little change it'll fail. It's still passing, damn.

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

The worst is when you expect an existing test to fail, but it passes, and it turns out the test wasn't actually properly testing the code. Fixing the test finds a bunch of broken edge cases.

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

Then you ask questions about what the past person could possibly have been thinking. You wonder what logic path brought them to create the code this way. You check git blame. It was you.

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

Debugging. It's a whodunnit where the victim, murderer, and investigator are all you.^(apologies to Filipe Fortes)

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

Congratulations your code will now be in production for the next hundred years.

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

Nothing is temporary. Every script, patch, application, and duct tape MacGyver/Scotty inspired fix I’ve ever written will run for eternity….

[–] [email protected] 15 points 8 hours ago* (last edited 8 hours ago)

The first "temporary hack" I ever wrote for my current job (~January 2014) is still in the codebase.

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

This stops being shocking as you gain more experience.

[–] [email protected] 19 points 10 hours ago (2 children)

Corollary, what moron wrote this...oh, i did.

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

Of course I know him: he’s me!

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

One time I stayed up late trying to fix a really complicated problem that I couldn't figure out. I was drinking. I got really drunk and fixed the problem. In the morning I couldn't figure out my own code. I had no idea what I wrote, or how it worked, but it did work. I just left it since it was apparently above my ability to fix.

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

MFW I hook up a Factorio spaghetti section to inputs and it works the first time.

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

Better ship it. It works after all.

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

Remember, every temporary solution is a permanent one! It's always spooky when it works the first time.

[–] [email protected] 5 points 9 hours ago

It works as intended because you haven't integrated yet

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

Something's broken, Something's failing, rotting!

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

lol - isn’t that the truth

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

Break it, confirm it's broken, fix it back. Makes me feel better every time.