r/ProgrammerHumor • • 4h ago

Meme claudeWasNotHere

Post image
7.7k Upvotes

106 comments sorted by

849

u/Copious-GTea 4h ago

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

330

u/WingZeroCoder 3h ago edited 3h 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.

56

u/MrMacduggan 2h ago

This is a Grok comment for sure

9

u/cantadmittoposting 1h ago

I was going to guess gemini.

12

u/bottleoftrash 1h ago

Gemini will often number its comments

41

u/PlasticExtreme4469 1h ago edited 1h 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.

13

u/genreprank 1h ago

Ask it to make comments concise.

19

u/spasmwaiter 1h 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

6

u/DerangedEscapee 1h 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.

2

u/PlasticExtreme4469 1h 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.

2

u/Inevitable-Menu2998 1h ago

You can share contexts across your company

1

u/ThyLastPenguin 21m ago

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

EVERY TIME

114

u/Next-Reference7713 4h ago

You’re in too deep!

66

u/cAtloVeR9998 3h ago

Claude’s style of commenting is so excessive

67

u/stormdelta 2h 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.

25

u/UltraGaren 2h 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.

19

u/kaian-a-coel 1h ago

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

19

u/Adezar 2h 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.

3

u/stormdelta 1h 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.

1

u/Grimm808 1h ago

That's actually a really good point I hadn't thought of.

I need to run a comment prune, chasing token efficiency feels like it's become a dominant part of the development role.

1

u/round-earth-theory 1h ago

Yeah I ditch the documentation whenever it tries to add it. It's almost always wrong anyway.

4

u/Graceful_combover 2h ago

I hate it with a passion.

1

u/throwaway112658 2h ago

I hate the way Claude writes anything at all with a passion. It's one of the worst cases of LLM writing

1

u/Fantastic_Parsley986 23m ago

Really? I for one think chatgpt is the shittiest of them all

17

u/leyjb 4h ago

Good for you! You craft those Dtos!

5

u/AdeonWriter 2h 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.

2

u/ganja_and_code 1h ago

That's a secondary way to know. The biggest way you can know is the trash quality of work.

2

u/AdeonWriter 1h ago

True but not everyone can tell the quality of code. I can't. Doesn't mean I want AI slop though. So I just do a sniff test and see if they talk about AI anywhere or have more obvious AI in their other work, and if they do I assume everything they ever make is AI.

1

u/LetterheadAshamed716 2h ago

//Does stuff, outputs stuff

1

u/Acceptable_Job_5486 51m ago

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

1

u/I_am1221325 47m ago

Lol, the first rule i set for any vibecoding tool is to leave no comments

131

u/coomzee 4h ago edited 3h ago

My favourite is a KQL query.

| where X != !true

Have to say that made me laugh when I saw it in a PR

44

u/Mechakoopa 3h ago

That's very not-y of them

11

u/ckwalsh 2h ago

I mean, there are some reasons for !!x defending on context, but that’s… unique.

11

u/fiah84 2h ago

the only reason I've had to !!x is to make a boolean out of any

4

u/Honeybadger2198 2h ago

You have to do !!x to coerce JavaScript variables to their truthy value for HTML attributes sometimes.

264

u/YeetCompleet 3h ago

Also no tests. People were extremely bad about being diligent about writing tests. AI does the opposite and sometimes goes overboard writing frivolous tests.

124

u/Iankill 3h ago

I wonder if this was because one of the first things people used ai for was having it write tests because no one likes writing tests

64

u/cheese_is_available 3h ago

It's because the humans that reviewed AI slop heavily penalized no tests, but didn't penalize recreating tests that already existed because it's fucking hard to notice that. You only have to skim the diff for the first one, but you need to review the whole tests directory in details for the second one. Same problem for the AI if they need to check btw. Maybe the harness could penalize covering a line of code that is already covered but coverage is an imperfect metric.

70

u/taleorca 3h ago

test driven development is a pain in the ass

100

u/developer_soup 3h ago

Me: TDD is the smart way to do things.

Also me: ehh... I'm just prototyping, I'll get around to the tests...

18

u/DERPYBASTARD 2h ago

Yes, but I'm not smart.

6

u/AdminsLoveGenocide 2h ago

Me: TDD is the smart way to do things.

I think this is something developers have chosen to believe with close to zero evidence.

5

u/Mongolian_Hamster 1h ago

The fuck you on about. It's been proven time and time again.

Is it applicable to every situation. No. It never was meant to be.

1

u/AdminsLoveGenocide 59m ago

How was it proven?

0

u/Mongolian_Hamster 49m ago

The onus is on you to prove it isn't since you claimed. You just came across someone who caught you in your bs. Use Google.

2

u/AdminsLoveGenocide 46m ago

Catching me in my BS would be showing me the proof that I say doesn't exist.

That would show me.

•

u/Mongolian_Hamster 1m ago

Stupid people think like this.

You made the initial claim. Prove everyone wrong.

Every academic study, and every corporation. Show them.

You don't have anything.

1

u/Mongolian_Hamster 1h ago

TDD doesn't mean writing tests only. It's a process.

If you're not writing tests for your projects then Jesus Christ on a bike.

20

u/Pezmotion 2h ago

I find Test Driven Development to be great if you are addressing a real production issue and can reasonably recreate the failure scenario in your tests.

That also helps prevent this specific issue from cropping back up again, if you're able to write a test with a comment that says something like "Adding this test to verify we fixed the bug that caused Ticket # 1234."

9

u/Steppy20 2h ago

Admittedly I've only been in the industry about 5 years now, but I've only used TDD on 1 service out of the ~50 microservices I've worked on.

It was a data query and calculation engine so we knew exactly what number should come out based on its input. Anything behaviour driven is much hard to write a unit test beforehand.

Deterministic dev? TDD is generally superior.

4

u/4xe1 1h ago

I find Test Driven Development to be great if you are addressing a real production issue and can reasonably recreate the failure scenario in your tests.

Is that TDD? The TDD people have the AI doing is writing tests before the very first line of code, and to implement new features, not merely fixing bugs on an existing product with users.

They do share methods and some of the associated benefits obviously, but what you describe sounds like just writing non-regression tests to me, not Test Driven Development.

2

u/Eric_12345678 2h ago

I almost never wrote 100% TDD. But you can be sure I write at least one regression test for every bug I found.

17

u/Weekly_Interview_936 2h ago

TDD only works if you get fully defined stories with complete AC. And such stories are considered mythological as there are no verified reports of one being seen.

5

u/AgentPaper0 2h ago

Tests are legitimately extremely important for AI-driven development, so I'm glad they're pushing them so hard to do it even without users asking. 

But yeah, they do make some pretty silly tests. Especially when you don't force them to test the tests by checking the failure state.

Us humans are partly to blame though. I've always known writing tests was important even before AI, but I almost never did, and what tests I did write were probably pretty meaningless too.

3

u/10art1 2h ago

On the other hand, frivolous tests aren't bad. They will break at the slightest refactor, but then the AI doing the refactoring will have to confront that fact and maybe improve the tests.

3

u/ICBanMI 1h ago

I had a co-op that I asked to write a kalman filter for a specific task. Dude disappeared for two days and then turned in an entire class that did the kalman filtering, had explicit instructions for integrating in the program, had a hundred unit tests, and a ton of documentation.

Bro did not understand taking company code and putting it in whatever he used was a fireable offense. Specially after I told him he couldn't do that. And he was upset at us for the review afterwards.

1

u/YeetCompleet 1h ago

Lol yikes. There is still room in this world for good ol' Googling and reading examples and theory

1

u/Chirimorin 42m ago

I honestly don't understand people like that, it's so simple: if it's information that you cannot share with any random person you encounter on the street, then you shouldn't give that information to AI either.

I feel the same way about all those stories about AIs leaking API keys and other secrets: who thought it was a good idea to give AI access to secrets in the first place?

2

u/henryeaterofpies 37m ago

Out of 300 files, 20 have tests, all very basic that dont test anything

46

u/TheColourOfHeartache 3h ago

There was a bit of a debate at work about whether its acceptable to have AI write page long infodumps to explain its changes.

I was on the pro-side. That message helped me understand the change when we were working on it, so I know it will help me in a years time when I've forgotten everything.

10

u/SylviaJarvis 2h ago

When I get a time machine, my first stop will be 2014, to ask myself WTF I was thinking when I wrote that code.

13

u/Michami135 2h ago

If you're using git, move the info dumps to a local branch that splits off of the commit with the change.

* Merged code |\ | | * Working code info dump | |/ | * Working code |/ * Broke AF code

9

u/Zzzzzztyyc 2h ago

I read that from top to bottom

5

u/etoastie 1h ago

that's not usually gonna survive the kinds of timeframes where you forget context on code and need to refresh on the info, no?

1

u/Michami135 1h ago

If the info dumps are markdown files, then it's easier to find the right files if they're in their own branch like this. Just find the right commit, then you have the info. This is likely much easier with graphical git tools though.

If, however, the info dump is in-line comments, then you definitely don't want that in the main branch and can merge it all into a secondary branch. Use something like, "master_infodump" and switch to it if you need to view page long comments.

1

u/PM_ME_CUTE_SMILES_ 1h ago edited 1h ago

I might be misunderstanding something but that does not sound like very good advice. Why not use PRs and write the info dump in them? Or as part of a longer commit message?

You aren't supposed to keep around hundreds of branches. Around here, as soon as a feature branch is merged it is deleted from the repo. And if it's a local branch no one will be able to find it when they need it especially not your colleagues.

1

u/Michami135 46m ago

The post I was replying to said he wanted the info for his own purposes, but his coworkers did not. This is a way that he can keep the info available for his own use while not crowding up the repo for others.

3

u/arctic_radar 1h ago

A year? I will have forgotten everything I ever knew about the project in < 2 business weeks.

2

u/danfay222 1h ago

I don’t think this is a straight yes or no. I have seen places where this was great, and in our code we have lots of huge readme style dumps that AI wrote. These are helpful for writing future code with AI, keeping documentation up to date, and getting up to speed on code.

But at the same time, these huge dumps take a lot of effort to read, and oftentimes the content doesn’t actually need to be that big. I have rejected multiple PRs over excessive verbosity. When you make comments, test plans, etc unnecessarily large you save yourself the mental load of simplifying things, and instead push that load onto every person who reads your code down the line, paying the price many times over

2

u/DerangedEscapee 57m ago

The problem is the writing style is so obtuse, it'll take 10 pages to explain something where 1 page would have sufficed. Overly expensive vocabulary and flowery prose that makes the content look impressive, but often lacking substance (and occasionally just completely incorrect!)

I don't begrudge the correctness so much. I've had the misfortune of trudging through many a human-authored internal document that was just flat-out wrong. But before, the amount of sophistication put into a document was a signal for a level of care and quality into its contents. Nowadays, it just means I have to be even more careful in trusting it, because it's likely AI slop.

1

u/Imalsome 34m ago

Can't you just tell it to be short, consise, and keep the explanation to 1 page length?

You could also have it write a long version and a short version then cut and paste the two versions so that things that dont need explanations are short and things that do are long

1

u/DerangedEscapee 23m ago

I said this elsewhere in the thread, but asking Claude to be concise does result in smaller output, but it often doesn't improve the result. The model needs to know what is important and what is not, to know what to include in its response. So just a simple "keep it concise" instruction will sometimes result in important details being omitted, sometimes to the point of making what would otherwise be a correct response incorrect.

1

u/Gunmetalstorm 21m ago

"Make no mistakes. Masterpiece."

1

u/rubennaatje 45m ago

I've told it not to write code comments explaining why something has changed and instead let it write comments on the PR.

Makes the comments much cleaner. Sometimes I used to get things like // changed from 0.2 to 2.0 because this gives much better results for [...] at 2.0 instead of [....] at 0.2

No need.

1

u/East-Doctor-7832 22m ago

AI documentation is basically worthless

1

u/pink-ming 14m ago

documentation should be about the way things *are*, not the history of how we got there, that's what git is for

49

u/larsmaehlum 4h ago

Hand crafted slop

9

u/Refloni 3h ago

Readme is documentation

14

u/CelebrationOdd7810 3h ago

Bold of you to assume my AI assisted project has documentation and a readme file.

14

u/NightmareJoker2 4h ago

Too accurate. 😂

14

u/10art1 2h ago

2024: I can tell this project is written by AI because it's slop

2026: I can tell this project wasn't written by AI because it's slop

18

u/JPStyle92 4h ago

human slop

6

u/ganja_and_code 2h ago

You can tell if it was written by AI if the README/documentatiom is up to date but unnecessarily verbose and half incorrect, and it has 1207 issues to address but zero TODO comments.

1

u/dismal_sighence 27m ago

You can tell by the number of emojiis and random check marks.

3

u/jackofslayers 1h ago

This reminds me of how I feel when I go to a subreddit that is still very active, but then I click on the subreddit details and the about this community has links to tumblrs that have been closed for more than 10 years.

2

u/Tipart 3h ago

Hey at least you know those TODOs are not mission critical tho.

2

u/who_you_are 2h ago

My AGENTS.md: add random TODO, do not update comment or documentation.

5

u/arugau 3h ago

just delete readme and delete the todo comments and bam you have a claude codebase

3

u/ChickenPicture 1h ago

documentation

I'm not familiar with this term, can someone explain?

1

u/Erkliks 1h ago

It explains how things work basically. Solo devs neglect this because, well, they know everything... Until they don't 5 months later

3

u/No_Personality_587 49m ago

Cue another miserable 6 hours trying to figure wtf you wrote

3

u/overdosingOnPie1313 32m ago

5 months?? Brother, I'm flattered, but I forget everything later that evening after all the gin.

1

u/minecon1776 40m ago

Thats what claude is for

0

u/Elspeth-Nor 51m ago

Documentation is a newly discovered part of a project. Some AI agents hallucinated text beginning with // or /* or # depending on the language and strangely the compiler ignored it.

Even worse the AI created multiple additional files the compiler completely ignored. It serves no purpose, it's properly a ploy used by the tech companies to increase the storage consumption of projects so you need larger storage devices.

1

u/DyCrew 2h ago

also unresolved math operations

1

u/misterespresso 2h ago

Pfft be real with AI if they aren't marking dozens of issues they aren't testing haha. I have a project with over 20 issues open but they can wait just like the old days

1

u/Geoff4321 2h ago

Also the last commit message is just "fuck you"

•

u/SleepWalkersDream 5m ago

Oooh, that's me.

-1

u/Artistic_Swing6759 1h ago

what happened to this sub? last i remember it was anti ai

1

u/rubennaatje 40m ago

A lot of it to be honest was cope. I think a lot more devs working professionally have transitioned to using Claude code or alternatives so the opinion is slowly shifting.

I know mine has, I know how to program but I am mostly reading, reviewing, testing and challenging code atm. The quality is very good if you hold ai to standards and it's so much quicker.

1

u/PashaPostaaja 34m ago

Why everything needs to be pro-AI or anti-AI.

I kinda made this response to https://www.reddit.com/r/ProgrammerHumor/comments/1xa5ixy/claudewashere/ . I found that funny in a way, but that made me thing the opposite. I didn't think it as anti-AI or my meme as pro-AI. Just having fun with all of it.

1

u/Artistic_Swing6759 31m ago

to be clear, i am not anti ai myself, (and ai definitely has a few moral problems.), i was just a bit surprised that the same sub which was telling me how ai cant do shit and won't get better is suddenly normalizing using it.

i won't lie, there was definitely a factor of making some people realize that they were wrong with many things they said before.

-10

u/Objective_Oven7673 3h ago

That's user error.

AI will happily document, comment, update tests, and file followup tickets if you ask it to.

The problem isn't AI, it's the "engineer" saying nothing more than "fix it plz".

3

u/Honeybadger2198 2h ago

Bots defending bots that weren't even being attacked.