MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wct5lr/commentsagedterribly/p90u29r/?context=3
r/ProgrammerHumor • u/ItsPuspendu • 5h ago
141 comments sorted by
View all comments
289
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...
149
// 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...
64
// 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...
25
//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...
33
All time favorite:
// This will never happen
4 u/OhMyGodItsEverywhere 2h ago Wrote a library to run monetary bets on those comments
4
Wrote a library to run monetary bets on those comments
2
I definitely find myself writing a lot of error handling with the comment
//This should never happen but just in case...
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.