this post was submitted on 06 Jul 2024
1550 points (99.4% liked)

Programmer Humor

19648 readers
2678 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
you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 130 points 4 months ago (5 children)

Best comment ever was "It used to work like this but person at client demanded it work like that on this date" when the client complained it shouldn't work like that.

[–] [email protected] 137 points 4 months ago (2 children)

That's basically what comments are most useful for. When you're doing something that's not obvious, and want to make sure the "why" doesn't get lost to time.

[–] [email protected] 96 points 4 months ago (2 children)

// I'm not really that dumb, there is a reason.

[–] [email protected] 42 points 4 months ago

// narrator: the reason was management

[–] [email protected] 36 points 4 months ago* (last edited 4 months ago) (1 children)
// I told them I'd do this but only if they gave me time next sprint to fix it  - 12-03-1997
[–] [email protected] 16 points 4 months ago

[flashbacks to the backlog being wiped out because “the client already signed off on the release”]

[–] [email protected] 13 points 4 months ago (1 children)

I spent a year making my company's iOS apps accessible (meaning usable for the blind and people with vision disabilities). I had to do a lot of weird shit either because of bugs in Apple's VoiceOver technology or because of the strange way in which our code base was broken up into modules (some of which I did not have access to) and I would always put in comments explaining why I was doing what I was doing. The guy doing code review and merges would always just remove my comments (without any other changes) because he felt that not only were comments unnecessary but also they were a "code smell" indicating professional incompetence. I feel sorry for whoever had to deal with that stuff at a later point.

[–] sukhmel 2 points 4 months ago (1 children)

Well, this is shitty

I hope the reviewer did not also squash commits, and the next programmer would be able to at least dig what was there.

Doing changes after some rockstar dev implemented some really complex service, but left no clues as to what does what is so frustrating, and I can never be sure that I don't break anything in a different place completely

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

I meant to say commits and not merges, and yes he removed the comments before committing. It made no difference in long run because every new release broke all the accessibility stuff anyway. It's amazing how little developers can be made to care about blind people - almost as little as managers. The only reason my company cared at all was they were facing million-dollar-a-month fines from the FCC.

[–] [email protected] 68 points 4 months ago

The best comments are "why" comments, the runner up is "how" comments if high-level enough, and maybe just don't write "what" comments at all because everyone reading your code knows how to read code.

[–] recursive_recursion 17 points 4 months ago

this seems like a great idea as it provides proof in writing just in case the stakeholder complains later on about the thing you implemented at their request

[–] [email protected] 13 points 4 months ago (1 children)

That’s actually the perfect comment, because if anyone ever comes back to fuck with you about it, it’s explained right there. Then you turn it right back around on management and watch them run around like chickens with their heads cut off.

[–] sukhmel 1 points 4 months ago

Out management used to tell us, that even if head of department had committed to doing something some way, there's no way or need to hold them accountable. It's just that situation has changed, and nobody should bat an eye.

To be fair, they also did not pressure us much for the missed deadlines or missing features, because it was indeed the result of the situation described in the first paragraph

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

I was porting our old code from PHP to Go at a previous company. I laughed as I copied my then-six-year-old comment "I'm promised by xxxxx that this is a temporary measure ".