/** 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.
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.
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.
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
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.
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.
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.
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.
I came to the same conclusion about "It's not X, it's Y" in narrative text. If I force it to not do that, it starts making errors where it seems to assume X.
Also no tests. People were extremely bad about being diligent about writing tests. AI does the opposite and sometimes goes overboard writing frivolous tests.
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.
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.
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.
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?
He had a graduate degree in something related and was enthusiastic to be asked to write that portion. So I assumed he would give me a earnest effort borrowed heavily from somewhere over the next few days. Wasn't supposed to be original and this was a one off R&D project that was fine if he came back two weeks with something that would marginally improved the behavior of what we were filtering with a short period for integration and some tunning.
We can't explicitly use these public models for several reasons, but didn't expect him to pull the the high school student turning in an essay written by a English grad student stunt.
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.
Frivolous tests can be bad, when they give you a false sense of confidence.
I had a kid a couple months ago submit a MR with tests included in the code and the tests were just nonsense. It was doing stuff like "create a native datastructure (Python dict), pass the datastructure as an arg to a function that just reads it and doesn't mutate anything, and then check that the values in the datastructure are still what they were initially created as"; if that test ever fails, it's above your paygrade, because the language is broken. It's basically just doing x = 1; assert x == 1 and acting as if that'll catch anything.
LLMs don’t write good tests. They write stupid tests like “test that the correct implementation of the interface was called” instead of verifying actual behavior
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."
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.
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.
TDD is writing tests you know will fail, then writing/refactoring code that will pass said tests, then going back to write more tests for more features
Compiler errors are a form of TDD, like TypeErrors and Syntax errors
Everyone uses TDD in some form... most are just using the IDE to do it for them
AI uses TDD because it's the only way for it to know if something works or not. One shotting isn't anywhere near as good as folks might claim without TDD. The agent will write a test, write code, then run the test, realize the test fails, and try to treat that as a new debugging session. End user only sees the final result with passing tests. In other words, AI's tests aren't there for future use, they're a mechanism to mock up what devs themselves do (create a small part of a project, run it a few times until they're happy, then move onto the next).
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.
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.
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.
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
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.
I have my Claude code set to write decision records in ASD-STE100 language when I gig reasons for stearing it's direction. With each decision given a code that is to be referenced in the next got commit.
This way by looking at the code and the commits you can see why I asked for something to be done the way it was done.
I mean i assume the argument is between not writing anything at all and having Claude do the summary. Many many people just dont explain themselves in changelogs and such
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
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
Bingo. My boss told our lead dev to have his agent shorten its responses. I told our dev to leave the report his agents generate for me in verbose mode. I prefer the details, because it usually itemizes even small changes, and provides explanations for any changes to prior findings.
The ease of generating documentation for new feature adds and fixes is one of the less heralded benefits of AI.
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.
You know how code is self documenting? Well, some misfits think that's not good enough and write a novel alongside the code describing how it worked 5 months ago
IMO, personally, I think good code is largely self-documenting as to what it does. But comments are still needed at times because "what the code does" might be easy enough to read at a glance, however "why the code does what it does", in certain sections, can be far more important and less self-evident.
I don't need a comment to tell me that the line is looping backwards through a list, you can read the code just as quick as the comment and know that; I need a comment to tell me that the code is looping backwards through the list for a specific reason and it should stay that way instead of being changed (unless the change takes that reason into account).
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.
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.
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
Sometimes I write comments apologizing to whoever has to maintain my code after I'm gone. (Joke's on me, they'll just rewrite it from scratch because that will be easier than decoding my regexes.)
I use deploynator to release the code, thus ensuring that the documentation is updated through ast analysis and other techniques with readmenator (pip install readmenator && pip install deploynator)
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.
2.0k
u/Copious-GTea Oct 20 '26 •
I can tell which model my coworker vibed with based on the comments it left.
238
u/coomzee Oct 20 '26 edited Oct 20 '26
My favourite is a KQL query.
| where X != !true
Have to say that made me laugh when I saw it in a PR
717
u/YeetCompleet Oct 20 '26
Also no tests. People were extremely bad about being diligent about writing tests. AI does the opposite and sometimes goes overboard writing frivolous tests.
118
u/TheColourOfHeartache Oct 20 '26
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.
48
u/ganja_and_code Oct 20 '26
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.
19
u/Refloni Oct 20 '26
Readme is documentation
14
u/the_great_zyzogg Oct 20 '26
AI documentation will always be full and complete grammatically correct sentences. Almost like we're speaking The Queen's English.
Human devs (myself included) will be very brief and to the point. Like, one or two levels above caveman speech.
Honestly, I generally prefer reading the latter over the former. It gets to the damn point quicker.
24
u/CelebrationOdd7810 Oct 20 '26
Bold of you to assume my AI assisted project has documentation and a readme file.
54
u/10art1 Oct 20 '26
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
14
u/NightmareJoker2 Oct 20 '26
Too accurate. 😂
15
u/ChickenPicture Oct 20 '26
I'm not familiar with this term, can someone explain?
4
u/Tipart Oct 20 '26
Hey at least you know those TODOs are not mission critical tho.
4
u/jackofslayers Oct 20 '26
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.
4
u/iggy14750 Oct 20 '26 edited Oct 20 '26
Agreed. Smells like human developer in here. :P
3
u/makinax300 Oct 20 '26
I keep my readmes up to date. I am just used to it.
Also I only recently started writing todos because vscode didn't highlight TODO for some reason.
But idrc about docs.
(It still doesn't, I just use micro now)
3
u/NerdWithAWand Oct 21 '26
Claude, add this to global instructions
5
u/arugau Oct 20 '26
just delete readme and delete the todo comments and bam you have a claude codebase
2
u/who_you_are Oct 20 '26
My AGENTS.md: add random TODO, do not update comment or documentation.
2
u/misterespresso Oct 20 '26
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
2
u/Jonathan_the_Nerd Oct 20 '26
I'm in this picture and I don't like it.
Sometimes I write comments apologizing to whoever has to maintain my code after I'm gone. (Joke's on me, they'll just rewrite it from scratch because that will be easier than decoding my regexes.)
1
u/chomu_lal Oct 21 '26
😂
1
u/New_Ruin9882 Oct 21 '26
The good days
1
u/SignalBake6872 Oct 21 '26
I use deploynator to release the code, thus ensuring that the documentation is updated through ast analysis and other techniques with readmenator (pip install readmenator && pip install deploynator)
1
u/retardpotatochip Oct 22 '26
it's too accurate
1
u/Crawfish1337 Oct 26 '26
But I enjoy writing tests :(
1
u/ManuelKick33 Oct 29 '26
It do be like that though
1
u/Dharul Nov 01 '26
Prolly will last longer than the AI itself
1
u/DyCrew Oct 20 '26
also unresolved math operations
1
u/SleepWalkersDream Oct 20 '26
Oooh, that's me.
1
u/FAMICOMASTER Oct 20 '26
That's how you know it's a project worth looking at
1
u/PumpkinFest24 Oct 21 '26
Never will understand SE that read docs. Docs have an unknown truth value. The code is all true.
1
u/shwlob Oct 21 '26
My code is just so unexplainably bad I never have to worry about being accused of using AI.
1
u/The-Great-Cornhollio Oct 20 '26
I love this
-2
u/Artistic_Swing6759 Oct 20 '26
what happened to this sub? last i remember it was anti ai
0
u/warmhaze8pinksips Oct 20 '26
lmao the username is such a power move though
0
u/GraduatedSapphic Oct 20 '26
This is still preferable.
-10
u/Objective_Oven7673 Oct 20 '26 edited Oct 20 '26
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".
Edit: as a commenter finally pointed it, I read this meme completely backwards by inserting a comma where there wasn't one.
I leave my downvotes of shame for all to see.
59
u/larsmaehlum Oct 20 '26
Hand crafted slop
4
u/Geoff4321 Oct 20 '26
Also the last commit message is just "fuck you"
19
u/JPStyle92 Oct 20 '26
human slop