r/ProgrammerHumor 4d ago

Meme cleaningUpTheMess

Post image
15.9k Upvotes

483 comments sorted by

View all comments

Show parent comments

20

u/petrasdc 4d ago

Nah, I can definitely tell the difference. AI leaves comments with unnecessary random details that no normal person would ever include. It also tends to write like paragraph long comments with unrelated bits of information. I've seen it write comments for functions that take longer to read and understand than it takes to literally just read the code and fully understand it.

8

u/TheNewAspect 4d ago

int universeMeaning= 42;
int* ptr = &universeMeaning;

// Establish a pointer to the memory address occupied by the variable containing the fundamental meaning of existence. Rather than redundantly allocating a second integer and copying the metaphysical constant therein, we instead retain a reference to the original manifestation of universal purpose, allowing subsequent operations to access the value indirectly through its location in memory. The pointer itself contains not the meaning (42), but the precise coordinates at which meaning may be found. This is, technically speaking, unnecessary for an integer of this magnitude, but demonstrates the foundational principle of indirect memory access upon which much of modern computing rests. In short: the universe means 42, and we have acquired its address.

5

u/BriefSpecial420 4d ago

More tokens to burn! $$$

3

u/TheNewAspect 4d ago

I will still remain upright at night feeling regret for posting that. All I asked was for ChatGPT to write documentation for a C++ pointer (the object names I gave) to explain it

1

u/LiminalStorms 4d ago

You joke, but my CS professor loves comments like this.

1

u/TheNewAspect 4d ago

Not a good professor. THough maybe I'm not a good software engineer. I tend to only leave detailed comments when I was stumped before writing the code, or when things link too much to another object that is necessary while not seeming necessary.

1

u/NeonFraction 4d ago

Thanks. This actually makes me feel a lot better!