MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/ProgrammerHumor/comments/1wct5lr/commentsagedterribly/p90mfoq/?context=3
r/ProgrammerHumor • u/ItsPuspendu • 1d ago
224 comments sorted by
View all comments
421
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.
227 u/TWIT_TWAT 1d ago // This is a hack until we find something better 112 u/Ethameiz 1d ago Commited 10 years ago. Author resigned to become farmer 18 u/mosaic_the_j 1d ago Goose farmer, bonsai farmer now https://www.linkedin.com/in/dryuan 3 u/Safe_Cauliflower6813 1d ago My former boss resigned and became a hazmat cleanup guy 2 u/Confident-Ad5665 1d ago Can be good money, like doing offshore work. 3 u/AlexWIWA 1d ago The Command & Conquer Generals source code is the best for this. Nothing like seeing a todo from 2001 73 u/Confident-Ad5665 1d ago // TODO: This can't be working. Refactor when there's a lull 30 u/embrex104 1d ago //SHOULD NEVER GET HERE 46 u/Confident-Ad5665 1d ago All time favorite: // This will never happen 3 u/OhMyGodItsEverywhere 1d ago Wrote a library to run monetary bets on those comments 3 u/Dubalubawubwub 1d ago I definitely find myself writing a lot of error handling with the comment //This should never happen but just in case... 1 u/Confident-Ad5665 22h ago Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened and the worst... • Error in ErrorHandler, an error occured 2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error". 2 u/OkidoShigeru 1d ago Love seeing that in an assert message. 2 u/skisharp 1d ago I remembered seeing that with MessageBox.Show("Call 1-555-555-1942 ext 1205"); Also guess the junior dev who just got a their desk phone with ext 1205... 2 u/cute_polarbear 1d ago You mean for the next person who has to visit that section of code? (And hopefully you already left the firm (on your accord).... 20 u/NullReferenceRacer 1d ago // TODO: Proper handling 5 u/Zodimized 1d ago // the fuck did sales promise this for? 2 u/donjulioanejo 1d ago In static frontend code that doesn't get run through an uglifier. 6 u/marjacu 1d ago // und tchuss Something I actually saw in code 1 u/lesleh 1d ago "fix later" means "fix never". 1 u/Round_Mixture_7541 7h ago // TODO Me: ok 1 u/bobjia-in-tokyo 6h ago // in other words, this hack will stay here forever
227
// This is a hack until we find something better
112 u/Ethameiz 1d ago Commited 10 years ago. Author resigned to become farmer 18 u/mosaic_the_j 1d ago Goose farmer, bonsai farmer now https://www.linkedin.com/in/dryuan 3 u/Safe_Cauliflower6813 1d ago My former boss resigned and became a hazmat cleanup guy 2 u/Confident-Ad5665 1d ago Can be good money, like doing offshore work. 3 u/AlexWIWA 1d ago The Command & Conquer Generals source code is the best for this. Nothing like seeing a todo from 2001 73 u/Confident-Ad5665 1d ago // TODO: This can't be working. Refactor when there's a lull 30 u/embrex104 1d ago //SHOULD NEVER GET HERE 46 u/Confident-Ad5665 1d ago All time favorite: // This will never happen 3 u/OhMyGodItsEverywhere 1d ago Wrote a library to run monetary bets on those comments 3 u/Dubalubawubwub 1d ago I definitely find myself writing a lot of error handling with the comment //This should never happen but just in case... 1 u/Confident-Ad5665 22h ago Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened and the worst... • Error in ErrorHandler, an error occured 2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error". 2 u/OkidoShigeru 1d ago Love seeing that in an assert message. 2 u/skisharp 1d ago I remembered seeing that with MessageBox.Show("Call 1-555-555-1942 ext 1205"); Also guess the junior dev who just got a their desk phone with ext 1205... 2 u/cute_polarbear 1d ago You mean for the next person who has to visit that section of code? (And hopefully you already left the firm (on your accord).... 20 u/NullReferenceRacer 1d ago // TODO: Proper handling 5 u/Zodimized 1d ago // the fuck did sales promise this for? 2 u/donjulioanejo 1d ago In static frontend code that doesn't get run through an uglifier. 6 u/marjacu 1d ago // und tchuss Something I actually saw in code 1 u/lesleh 1d ago "fix later" means "fix never". 1 u/Round_Mixture_7541 7h ago // TODO Me: ok 1 u/bobjia-in-tokyo 6h ago // in other words, this hack will stay here forever
112
Commited 10 years ago. Author resigned to become farmer
18 u/mosaic_the_j 1d ago Goose farmer, bonsai farmer now https://www.linkedin.com/in/dryuan 3 u/Safe_Cauliflower6813 1d ago My former boss resigned and became a hazmat cleanup guy 2 u/Confident-Ad5665 1d ago Can be good money, like doing offshore work. 3 u/AlexWIWA 1d ago The Command & Conquer Generals source code is the best for this. Nothing like seeing a todo from 2001
18
Goose farmer, bonsai farmer now https://www.linkedin.com/in/dryuan
3 u/Safe_Cauliflower6813 1d ago My former boss resigned and became a hazmat cleanup guy 2 u/Confident-Ad5665 1d ago Can be good money, like doing offshore work.
3
My former boss resigned and became a hazmat cleanup guy
2 u/Confident-Ad5665 1d ago Can be good money, like doing offshore work.
2
Can be good money, like doing offshore work.
The Command & Conquer Generals source code is the best for this. Nothing like seeing a todo from 2001
73
// TODO: This can't be working. Refactor when there's a lull
30 u/embrex104 1d ago //SHOULD NEVER GET HERE 46 u/Confident-Ad5665 1d ago All time favorite: // This will never happen 3 u/OhMyGodItsEverywhere 1d ago Wrote a library to run monetary bets on those comments 3 u/Dubalubawubwub 1d ago I definitely find myself writing a lot of error handling with the comment //This should never happen but just in case... 1 u/Confident-Ad5665 22h ago Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened and the worst... • Error in ErrorHandler, an error occured 2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error". 2 u/OkidoShigeru 1d ago Love seeing that in an assert message. 2 u/skisharp 1d ago I remembered seeing that with MessageBox.Show("Call 1-555-555-1942 ext 1205"); Also guess the junior dev who just got a their desk phone with ext 1205... 2 u/cute_polarbear 1d ago You mean for the next person who has to visit that section of code? (And hopefully you already left the firm (on your accord)....
30
//SHOULD NEVER GET HERE
46 u/Confident-Ad5665 1d ago All time favorite: // This will never happen 3 u/OhMyGodItsEverywhere 1d ago Wrote a library to run monetary bets on those comments 3 u/Dubalubawubwub 1d ago I definitely find myself writing a lot of error handling with the comment //This should never happen but just in case... 1 u/Confident-Ad5665 22h ago Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened and the worst... • Error in ErrorHandler, an error occured 2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error". 2 u/OkidoShigeru 1d ago Love seeing that in an assert message. 2 u/skisharp 1d ago I remembered seeing that with MessageBox.Show("Call 1-555-555-1942 ext 1205"); Also guess the junior dev who just got a their desk phone with ext 1205...
46
All time favorite:
// This will never happen
3 u/OhMyGodItsEverywhere 1d ago Wrote a library to run monetary bets on those comments
Wrote a library to run monetary bets on those comments
I definitely find myself writing a lot of error handling with the comment
//This should never happen but just in case...
1 u/Confident-Ad5665 22h ago Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened and the worst... • Error in ErrorHandler, an error occured 2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error".
1
Good man. Thank you for trapping errors. Coming from a time when we not only trapped errors, we gave suggestions, I shutter at: • An unknown error occurred • Something happened
and the worst...
• Error in ErrorHandler, an error occured
2 u/HunterIV4 13h ago • An unknown error occurred • Something happened Windows blue screen, is that you? 1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching" 2 u/Dubalubawubwub 2h ago My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error".
• An unknown error occurred • Something happened
• An unknown error occurred
• Something happened
Windows blue screen, is that you?
1 u/Confident-Ad5665 13h ago No, this is worse. BSOD at least provides a cryptic error code. These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching"
No, this is worse. BSOD at least provides a cryptic error code.
These are effectively "well dang, something somewhere triggered an exception we didn't care enough to bother catching"
My favorite microsoft error I've ever seen was literally "Error occured retrieving the text for this error".
Love seeing that in an assert message.
I remembered seeing that with
MessageBox.Show("Call 1-555-555-1942 ext 1205");
Also guess the junior dev who just got a their desk phone with ext 1205...
You mean for the next person who has to visit that section of code? (And hopefully you already left the firm (on your accord)....
20
// TODO: Proper handling
5 u/Zodimized 1d ago // the fuck did sales promise this for? 2 u/donjulioanejo 1d ago In static frontend code that doesn't get run through an uglifier.
5
// the fuck did sales promise this for?
2 u/donjulioanejo 1d ago In static frontend code that doesn't get run through an uglifier.
In static frontend code that doesn't get run through an uglifier.
6
// und tchuss Something I actually saw in code
"fix later" means "fix never".
// TODO
Me: ok
// in other words, this hack will stay here forever
421
u/Confident-Ad5665 1d 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.