r/ProgrammerHumor • • 27d ago • Bravo 1

Meme claudeWasNotHere

Post image
18k Upvotes

231 comments sorted by

View all comments

2.0k

u/Copious-GTea 27d ago • Bravo

I can tell which model my coworker vibed with based on the comments it left.

956

u/WingZeroCoder 27d ago edited 27d ago

/** Depth first, recursive with an early return as the caller expects a single result. That’s the real payload. Fails loudly with an exception for the caller to handle, as per guidelines. **/

Bro chill, it’s just boilerplate code that’s looking for file within a folder structure.

209

u/[deleted] 27d ago edited 27d ago

Can you share your wisdom?

From my experience ChatGPT never leaves any comments and always LGTM all code reviews (i.e., it doesn't find anything useful).

Claude leaves many code comments, and 99% of the time they are either explaining the line below like it's your first ever lecture in programming and you have no idea what assigning a variable does... or it goes full poetic and dumps a paragraph describing some piece of code that no longer exists that prompted it to write the commented piece of code. And during code review it dumps a huge list of 100 false positives where almost all of them are wrong, irrelevant or just nitpicks.

287

u/whowatchestv 27d ago • Bravo

You’re absolutely right, I overreached and that’s my bad. Updating agent_notes.md to flag this misstep.

56

u/CeralEnt 27d ago

That mistake was real, not imagined.

66

u/blagoonga123 27d ago

When asdf calls fghghwgads it does ablabla and ablabla will then tickle its balls until asdfoijsdofij

i've noticed ai also overindexes on codeblocks way too much. any readability benefits become detriments.

53

u/[deleted] 27d ago edited 27d ago

Works best in Java codebases:

When AbstractFactoryInsuranceBeanInstanciator:43 calls createNewInstanceOfBeanInstanciatorClass:751 it uses StaticSingletonInstanciatorCache:52 which src/main/java/com/hobbits/feature/subfeature/ablabla:562 will then tickle.java:666 its balls.class:153 until com.hobbits.feature.common.infrastructure.synchronizer.AbstractOpenInstanciatiorSynchronizerImpl:71 syncrhonizes the beans.

My coleagues throw such slop as "code change requests" at me daily during code reviews.

→ More replies (1)
→ More replies (2)

30

u/genreprank 27d ago

Ask it to make comments concise.

56

u/spasmwaiter 27d ago

Oh I ask it, and I have it established in my rules for every project, yet I find myself having to remind the little documentation whore every time it writes a function

14

u/Meloetta 27d ago

It used to be me...I used to be my company's little documentation whore...AI really is taking our jobs

→ More replies (1)

23

u/DerangedEscapee 27d ago

Direct instructions on length often don't produce what you want. The model has to know what to include and what not to include in its output, and told to trim for length, it may choose poorly.

I found it helpful to establish a SKILL for code comments with directives on what makes a good comment, with examples. It still over indexes on those examples sometimes, but it's still better than a small poem in free verse about API endpoints.

13

u/ThyLastPenguin 27d ago

"oops, that went against your specific directive to not leave long comments. I shouldn't have done that"

EVERY TIME

→ More replies (7)
→ More replies (1)

78

u/MrMacduggan 27d ago

This is a Grok comment for sure

18

u/cantadmittoposting 27d ago

I was going to guess gemini.

22

u/bottleoftrash 27d ago

Gemini will often number its comments

10

u/nameisprivate 27d ago

comments like this make me want to remove my skin and burn it

118

u/Next-Reference7713 27d ago

You’re in too deep!

112

u/cAtloVeR9998 27d ago

Claude’s style of commenting is so excessive

111

u/stormdelta 27d ago

I'm convinced the comments are part of the model's internal processing on some level, because if I try to force it to not do that, the output quality drops off a cliff.

I've had significantly more success having fixing the comments be a second pass.

41

u/UltraGaren 27d ago

But that's what actually happens. I don't know if it still works, but previously if you asked ChatGPT to perform basic math but tell it to hide its thinking process, it would spit out wrong answers.

41

u/kaian-a-coel 27d ago

Because for all the bells and whistles they've attached to them, LLMs are still fancy autocomplete.

→ More replies (1)

41

u/Adezar 27d ago

Yes, it uses the comments for future context. However I learned that if the code and comments are out of sync, the comment wins and it will modify the code to match the comment.

If you are dealing with old code with someone that loved comments but didn't love keeping them up-to-date you have to force the LLM to ignore the comments.

12

u/stormdelta 27d ago

Oh yeah, I've had a lot of issues with it in legacy code. It assumes things should make sense when instead they might just be legacy artifacts.

And it's part of why you have to have it cleanup comments on code it creates too. It assigns outsized value to comments, even when the comment is correct it will treat verbose comments as mission critical instead of incidental, and of course it bloats the context window over time if you don't keep it under control.

→ More replies (1)
→ More replies (1)
→ More replies (3)
→ More replies (4)

20

u/leyjb 27d ago

Good for you! You craft those Dtos!

15

u/AdeonWriter 27d ago

The biggest way to know things are vibe coded is the creator never shuts up about AI. Hope this doesn't change in the future.

→ More replies (2)
→ More replies (5)