Remix.run Logo
▲ tripleee 2 hours ago

People saying this are telling on themselves that they have no idea what quality code is. It's not about looking pretty or nice variable names.

Code quality matters to AI just as much as it did to people

▲bbctr1 2 hours ago | parent [-]

Do you have any data backing this statement? Or is it just your experience?

▲bpeng2000 2 hours ago | parent | next [-]

Personal experience:

AI tends to add new wheels for a new feature in a large codebase, because finding, understanding, and generalizing the existing code to integrate a new feature will likely break existing features, cost more effort (and token) to implement and test. Human reviewers also tend to like these code since they are clean, easy to review, and get the job done, especially when they are not familiar with existing codebase.

The issue is that wheels like these accumulate in the codebase, and they inevitably entangle. When an upstream specification changes, when a new feature that works with many existing features are introduced, all these wheels need to be revisited, and in many cases they are not because the new test cases do not cover all the paths. The code base got larger and more complex, and contains more bugs than the unit tests can cover, especially when unit tests are often "bent" to fit the wrong behavior unnoticed.

▲tripleee 2 hours ago | parent | prev [-]

-

▲piker 2 hours ago | parent | next [-]

Yep.

The worst part about this is that if you aren't watching it, the AI will "solve" this with a thousand assert_3_plus_5_equals_8() test cases that just further clutter the workspace and the context window. Churn baby churn.

▲Rudybega 2 hours ago | parent [-]

I haven't had this issue since like last year with frontier models. What are you using?

▲troupo an hour ago | parent [-]

All the models do this. I'm literally right now watching Opus 5.5 duplicating code even after telling it to fix duplication.

▲tripleee an hour ago | parent [-]

-

▲SmirkingRevenge 2 hours ago | parent | prev [-]

The models are pretty good at finding code duplication and eliminating it though, and it's usually part of my AI review process at this point

If you let it go buck wild on a massive change, there are those times where it sort of paints itself into a corner but rewrites are cheap (for now), so it's just not that big of a deal, imho

▲tripleee 2 hours ago | parent [-]

-