this post was submitted on 16 Jun 2023
64 points (98.5% liked)

Programmer Humor

32710 readers
388 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
top 9 comments
sorted by: hot top controversial new old
[–] [email protected] 8 points 2 years ago

I was once told that I'm very thorough with commenting, and I didn't have the heart to tell them that if I didn't comment so well I'd have no idea what my code is doing.

[–] [email protected] 7 points 2 years ago (1 children)

That’s wonderful until you have a client asking why their pre-alpha demo that you forgot they had access to just called them a fuckwit.

Don’t ask me how I know that one :D

[–] [email protected] 5 points 2 years ago

You too? First job, first production push (circa 1997)... a few days pass and support comes into my office with their hair on fire. "Customer is asking why the program is calling them a fucking idiot."

In a piece of code that it should have been impossible to hit, I'd put a dialog "Developer is a fucking idiot".

When I say impossible to hit, it was on the order of if (a == null && a != null ){}. Or so I thought... turns out I'd miscounted the curly braces.

[–] [email protected] 3 points 2 years ago

I do todo!() For rust and in other languages I just throw an exception. And searching for TODO comments using ripgrep.

[–] Lorgres 3 points 2 years ago (1 children)

#warning "TODO" Is my goto reminder when a comment doesn't cut it.

[–] huw 1 points 2 years ago

Works unless you already have 1000 other warnings in your project 👀

[–] [email protected] 2 points 2 years ago

chaotic good

[–] [email protected] 2 points 2 years ago* (last edited 2 years ago)

Smart way of doing it. Did something similar but in php, a while ago.

[–] [email protected] 2 points 2 years ago

Ah, I always just write out the sentences directly so the program won't even compile. Always works for me lol.

load more comments
view more: next ›