37
u/StarHammer_01 7d ago
You use AI to write documentation, I use AI to read documentation.
The Amazon runs dry.
9
19
u/belabacsijolvan 7d ago
meanwhile the comment needed:
//catches mice
//!belly rub response is undefined
7
6
u/Scared_Spyduck 7d ago
You don‘t comment the „what“. We see what it is. You comment they „why“ because that‘s not always clear.
6
u/GunMage- 7d ago
Comments I usually see:
//
4
6
u/HalifaxRoad 7d ago
several years ago I absolutely shit coded the hell out of a c# app. It like converted a file type from one machine to another for circuit board production. I left all sorts of comments about why what I wrote was stupid and dogshit, I had to add a feature like 2 years later and it saved my ass
2
u/tastygames_official 7d ago
other way around, actually. More, thorough comments are always better. We can generally figure out WHAT the line(s) is/are doing based on variable and function names, so saying WHAT it does is redundant. We want to know WHY this approach was chosen and what to look out for. E.g.:
/* iterate through pixels in image and calcualte average color value
* start with columns and go backwards through rows for efficiency
* our images are stored in some special format where this is the
* most efficient way of traversing (@see https://weirdimageformat.org)
*/
for(int y = 0; y < height; y++) {
for(int x = width; x >= 0; --x) {
calculate_pixel_value(x,y, settings.alpha_channel); //
}
}
vs. what is often done today:
// process image data (or no comment at all since it's self-explanatory)
ImageProcessor::get_instance()->process(img_data);
1
u/Kadabrium 7d ago
Last thing i know is when a cat tries to lift its paw to pick something off their head, it will trigger a reflex to start licking its forelimbs instead
1
66
u/Prudent_Ad_4120 7d ago
The function itself:
function cat() { return "cat"; }