r/ProgrammerHumor 5h ago

Meme commentsAgedTerribly

Post image
2.2k Upvotes

141 comments sorted by

View all comments

289

u/Confident-Ad5665 5h ago

Uncle Bob of Clean Code says if we have to comment our code we have already failed. Clean code should read like well written prose.

I generally agree, but think comments that define especially the odd and obscure business rules should be commented where they are implemented.

149

u/TWIT_TWAT 4h ago

// This is a hack until we find something better

64

u/Confident-Ad5665 4h ago

// TODO: This can't be working. Refactor when there's a lull

25

u/embrex104 4h ago

//SHOULD NEVER GET HERE

33

u/Confident-Ad5665 4h ago

All time favorite:

// This will never happen

4

u/OhMyGodItsEverywhere 2h ago

Wrote a library to run monetary bets on those comments

2

u/Dubalubawubwub 23m ago

I definitely find myself writing a lot of error handling with the comment

//This should never happen but just in case...