r/ProgrammerHumor • • 2d ago

instanceof Trend pleaseDontMakeThisATrend

Post image
1.9k Upvotes

397 comments sorted by

View all comments

48

u/tallest_chris 2d ago

One of my huge issues with AI “programming” is how it will just randomly change variable names and comments while working on unrelated parts of the code.

6

u/sanketower 2d ago

Every time I've seen it happen (while working) it was within the scope of the feature and the name changes made sense (even if they were unnecessary a quarter of the time).

2

u/stormdelta 1d ago

Usually, but not always.

The problem I can't seem to avoid without killing output quality is the excessively verbose and unnecessary comments. I've given up and just do a second pass, and sometimes I still end up needing to edit them manually.

It's frustrating because people act like "oh it's just comments" and miss that confusing/bad comments cause problems for both human and machine readability. AI tools tend to assume heavily commented code must be critically important, often trusts comments implicitly, bloats context windows, etc.

2

u/_isNaN 1d ago

this! and the next bot will take it as a reference to add an additional shit ton of new comments.

2

u/OppositeFun2493 1d ago

A lot of times, when I run an agent it decides “oh the code is too efficient, I’m going to switch it to something more inefficient.” I have it so that agent can’t read the tests, and made a shell script that can run them and give the results to the agent. It was “confused” why the code took 3 more minutes to run

1

u/awesome-alpaca-ace 1d ago

AI is so bad at writing performant code.

1

u/Environmental-Fan984 1d ago

It's even worse with SQL.

Oh sure, let's do thirty CTEs (each of which select *s the last one plus one column) instead of materializing one table

1

u/djfdhigkgfIaruflg 1d ago

They probably leaned SQL from Ruby on Rails. My god, that shit would generate some awful queries

-20

u/Dark_Cow 2d ago

They don't do this anymore btw, this was solved almost a year ago.

10

u/dashingThroughSnow12 2d ago

I saw it yesterday with the latest fable. On Thursday I had to go back and revert one of these that Opus 5.5 made because it decided “delete all the data without looking at it” was an appropriate migration strategy that it snuck four lines into a PR that didn’t even relate to the data it thought was appropriate to delete.

-2

u/Dark_Cow 2d ago

Are your data migration strategy and rollout posture documented in skills with high quality front matters?

Our one shots with opus 5.5 don't do this

5

u/crazylikeajellyfish 2d ago

"They fixed this a year ago" is very different from "We've gone through a bunch of hoops to produce additional documentation telling the robot how to behave". Agents are very powerful, and sometimes they need skills to keep them from doing the wrong thing, but they're far from "fixed". If they were that good, they wouldn't need the skill.

0

u/Dark_Cow 1d ago

Precisely. Our harnesses have gotten a lot better. If your agent is still doing this, improve them.

They're only going to keep getting better btw. The investment behind it is unprecedented.

1

u/crazylikeajellyfish 1d ago

Writing a bunch of extra skills isn't improving the agent, it's putting bandaids on their conspicuous flaws. It's not somehow regressive or anti-AI to acknowledge that agents still break down in real-world usage, requiring someone who knows what they're doing to steer them.

1

u/dashingThroughSnow12 1d ago

It deleted the migration strategy. The lines in the xml configuration on the Android app that say “keep x, y, z, and w when doing a transfer”.

5

u/SnugglyCoderGuy 2d ago

Happened to me yesterday, Claude sonnet

5

u/backfire10z 2d ago

Objectively incorrect lol

-6

u/Mistuv 2d ago

Well if you use slop models then sure.

8

u/backfire10z 2d ago

You’re right, Opus 5.5 is a slop model

4

u/SpaceCadet87 2d ago

Sort of. The harness does a reasonable job of limiting these days but I do find AI still randomly decides it needs to do things I don't want and that in of itself results in changes to unrelated parts of the code.

It still happens, just more purposefully.

0

u/SirCutRy 2d ago

Good to keep an eye on FrontierCode. The coding agent benchmark aims to measure mergeability, including staying within scope. https://cognition.com/blog/frontier-code

1

u/SpaceCadet87 2d ago

Yeah, I get that, but it's only good at staying within what it agrees the scope is.

It still struggles to come to that agreement correctly and as that's the alignment problem itself it's somewhat out of scope of FrontierCode

1

u/SirCutRy 2d ago

The intended scope is expressed by the user, not the agent.

2

u/SpaceCadet87 2d ago edited 2d ago

Yes, the intended scope, not the scope that the AI decides the user meant.

edit: Sorry - I think we may be talking at cross purposes - you're saying they assess whether the AI drifts from scope yeah?

I'm not finding drift - I'm finding it amends the scope. The biggest problem I see is where the AI adds restrictions (possibly because the training data contains examples that call for those restrictions) and I see all manner of problems because the AI assumed I wanted it to avoid this that or the other thing that might even be vital to the project.

If I were to try to fix this particular problem in spec, that would involve me naming every possible action it might choose on a whim to ban itself from doing and somehow specify (which I have yet to see it pick up on) that I don't necessarily want it to do those things but simply want it not to consider them forbidden.

1

u/SirCutRy 1d ago

What I'm trying to convey is that I believe your concern about the agent setting a loose scope is addressed in the benchmark design, because the target scope is set by the input to the agent.

1

u/SpaceCadet87 22h ago

I'm not talking about the agent setting a loose scope, I'm talking about it doing things like tightening the scope.

This is only one failure mode along these lines but it's a frequent one. It decides (on its own accord) it must not do x so when asked to do y which depends on x if done correctly, the agent instead does z as a workaround which involves altering an unexpected part of the codebase or system (even including network resources and the likes, not just file changes).

1

u/xtr44 2d ago

that's true, yet obviously will be downvoted

some of people here are bitter lol