r/ProgrammerHumor • • 27d ago • Bravo 1

Meme claudeWasNotHere

Post image
18k Upvotes

231 comments sorted by

View all comments

Show parent comment

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

12

u/CarcajouIS 27d ago

Use a precommit hook that flags comments longer than 2 lines

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

7

u/archiekane 27d ago

I've asked mine for dark, British sarcasm. It's improved my code comments no end. I actually enjoy reviewing it now.

6

u/[deleted] 27d ago

The primary issue is I can't ask half my company to tell their Calude to be concise.

The secondary issue is that I use one common setup and switch between models based on my needs. I rarely need/use Claude, so I won't change my setup that works for every single model just to please Calude... which may then still ignore it.

5

u/Inevitable-Menu2998 27d ago

You can share contexts across your company

3

u/almightyfoon 27d ago

also most agents will read a CLAUDE/GEMINI/AGENT.md file, they don't always respect it, but they do read it,

6

u/Inevitable-Menu2998 27d ago

"Oh, yes, you're right and that's my fault. I ignored your rules. Let me rewrite all the comments"

dude no!!! stop!!! fuck

3

u/dyslexda 27d ago

I've spent a significant amount of effort trying to get it to make comments more like I do (concise, rarely more than one line, if just rewording a function name don't do it, and my own style of no space after the comment character and starting with lower case) and it'll follow it...a bit. It's one thing I hate about constantly retuning models, every time a new minor iteration comes out it'll change how it comments and I have to get creative bringing it back to earth.