1160
submitted 2 days ago* (last edited 2 days ago) by copacetic@discuss.tchncs.de to c/programmer_humor@programming.dev
you are viewing a single comment's thread
view the rest of the comments
[-] HexDecimal@feddit.online 57 points 2 days ago

As an open source project maintainer I can always tell whenever a pull request is AI assisted because no human would ever write full tests for all their pull requests.

[-] porous_grey_matter@lemmy.ml 27 points 2 days ago

Uh oh, I pretty much always do this. Especially for new-to-me projects. The less confident I am about how the whole thing works, the more I write tests for my change. Should I stop pushing them so people don't think I'm Claude?

[-] Ephera@lemmy.ml 13 points 2 days ago

I mean, the thing with LLMs is that they tend to overdo it. They test completely unnecessary details. Your idea of having tests for all features is probably still way less tests than the typical LLM-generated commit...

[-] Buddahriffic@lemmy.world 7 points 2 days ago

And they'll miss important test cases such that their change will pass all of their tests (they keep iterating until it does) but then will still fail on some common edge cases.

[-] MangoCats@feddit.it 10 points 2 days ago

If you've got 100% coverage for every feature, yeah, people are going to think you're a bot.

[-] SaharaMaleikuhm@feddit.org 7 points 2 days ago

Nice try bot. The Terminators are already trying to blend in.

[-] NocturnalMorning@lemmy.world 2 points 2 days ago

Is your name Claude?

[-] LePoisson@lemmy.world 1 points 2 days ago

Look if someone thinks you're Claude because you bothered to test your code that's kind of sucky. But then again the fuck do I know, I don't contribute or maintain anything so that's just an off the cuff take.

At some point we'll have to acknowledge that AI doesn't mean inherently awful and bad IF it's used responsibly and in a helpful manner. I don't think LLMs are intrinsically bad but the way these companies have been marketing them and trying to make them some technological panacea that'll replace all the people and fix everything is utterly deranged and divorced from reality.

At the end of the day they're large language models, their job is to come up with what the model "thinks" a person would write as an answer to whatever the prompt is. They're not magic and I'm tired of people anthropomorphizing the shit out of LLM / "AI" and acting like AI output is being delivered by the machine with some sort of logic and knowledge and oversight. It is not.

[-] tyler@programming.dev 1 points 1 day ago

that AI doesn’t mean inherently awful and bad

it does when it's actively destroying the planet. There's no good use of AI. There's less bad uses since we're now in an era of AI generated cyber attacks, so people are using it to defend. But there's no good use. It's a horrendous technology that is destroying humanity with every use.

It's the same as a nuclear bomb. If the bomb was never used and we just knew how to make it, it wouldn't be that bad. But it was used, it killed hundreds of thousands of people, and no matter what happens in the future it's still horrific technology.

[-] LePoisson@lemmy.world 1 points 1 day ago

I do think there are responsible ways to build data centers, they have been around for a long time now - just the scale and speed and cutting corners happening now is something awful.

There is no modernity without data centers, this message between us could not exist without data centers - but what is going on now with these large AI companies and hyperscalers and the giant market speculation and spectre of the looming pop of this huge economic bubble .. That all is madness to the highest degree.

I'm not really disagreeing with you completely but I do think there are good use cases if the technology is applied well and the infrastructure is built responsibly in the way that causes the least environmental impact. That's not happening though.

[-] tyler@programming.dev 1 points 1 day ago

To be clear, this isn’t about data centers. It’s about unrestricted AI data centers. The difference between a normal scale data center and a hyperscale AI data center from a water use perspective is 6 million gallons a year vs over 2 billion gallons a year. Like, they’re not even close. We had responsible data centers and life was fine. Now it’s not.

[-] LePoisson@lemmy.world 2 points 1 day ago

I'm aligned with you on that. Also speaking as someone in the USA ... We desperately need electrical infrastructure overhauled, invested in and nationalized. The state needs to intervene and help support the American people. Really all of our public infrastructure desperately needs help. So do a lot of people who are looking for work. We spend billions of dollars on killing kids but we can't fucking spend some to employ folks in massive green energy grid public works projects and kill two birds with one stone?

It's embarrassing. FDR, our most popular president, literally implemented all of these kind of policies - it's insane the Democratic party keeps shying away from them.

[-] nykula@piefed.social 4 points 2 days ago

Libtcod? Cool project. Btw do those generated tests tend to be helpful or confusing?

[-] HexDecimal@feddit.online 7 points 2 days ago* (last edited 2 days ago)

The important part is that the tests track regressions and they're helpful for that. After that, it's okay if tests are mostly write-only.

I've noticed that AI commentary tends to describe what the code is doing verbatim which is better for naming tests and functions rather than writing code comments, docstrings, or change notes. I usually have to fix this public-facing documentation to not talk about library internals which no user of the library would ever care about.

So far I feel that AI assists are good when you have the time and effort to push back on them, but that isn't an option for all projects, it works well for my own projects which have very few contributors in the first place. For the most part I can treat them with the same scrutiny as human written code. When the person submitting the code is obviously not checking their own code then that's a problem.

[-] OwOarchist@pawb.social -2 points 2 days ago

When the person submitting the code is obviously not checking their own code then that’s a problem.

If you're getting a high volume of those, it's time to just ban those users and move on.

[-] MangoCats@feddit.it 2 points 2 days ago

Yep, and that's where I wonder if AI written code might, eventually, be more maintainable... at least by AI.

[-] HexDecimal@feddit.online 10 points 2 days ago* (last edited 2 days ago)

From what I've seen and heard, AI seems to do well for test-driven development. That doesn't necessarily translate into good code, but it does translate into tested code.

At the very least it can translate the documentation of an API into the appropriate tests to verify the documentation is correct, and I'm being quite humbled by that.

[-] MangoCats@feddit.it 1 points 2 days ago

The thing I have to constantly adjust for is: it does things at 10x my speed (on average, some things it does slower, but some things it does 100x faster), and about 80% of my accuracy. So, I have to really aggressively apply the bug catching methodologies that a lot of times I would get away without "because I'm that good..." not really, but there are some things I do that I have justifiably high confidence in, others that definitely need testing which I try to do before handing over to the test team. The reason I don't apply those bug catching methodologies to ALL my code is because that slows me down 3-5x, and it seems to slow down the LLMs about 2-3x, so they're only 3-5x faster than me, on average, when they are writing all the tests and multiply reviewing all the docs and code, compared to me "winging it."

Where I think all this LLM stuff is going to pay off bigger is 10 years in the future, looking back at old code, yeah all that documentation is a bit of overkill, but we tended to underkill the documentation 10 years ago and we're still not doing as much as we probably should when we do things the "just before LLMs came on the scene" ways.

[-] Ephera@lemmy.ml 6 points 2 days ago

One problem I could see with the aggressive testing (which also happens in human-written codebases) is that it becomes hard to tell essential behaviour apart from details. If you nail everything down with a unit/integration test, nothing can be changed anymore.

I could imagine that this is part of the reason why LLMs love to duplicate code rather than adjusting existing code.

[-] porous_grey_matter@lemmy.ml 3 points 2 days ago

Well... That's why you test the public API and not the internals. And if you need to change the API you should have a good enough reason that changing the tests is okay too.

[-] MangoCats@feddit.it 1 points 2 days ago

Well, since it's "just" LLM time writing the tests, test the internals too, but clearly mark which tests are the public API and which tests are intnernal, so it knows to never ignore / update a public API test without consultation, but it an internal test fails it can make the call: did this test start failing because I unintentionally broke something, or because the test was testing something that no longer matters - I have seen Claude go both ways, fixing its own mistake due to a test catching an unintended consequence of a change, and also just patching the test because the old test was... old.

this post was submitted on 23 Oct 2026
1160 points (98.8% liked)

Programmer Humor

33796 readers
2163 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 3 years ago
MODERATORS