Remix.run Logo
skybrian 17 hours ago

There is a lot of noise out there from anti-AI types who never seriously tried to clean up messes with AI. If you just ask for new features and never look at the code, coding agents will make a mess. If you often ask questions about how to clean up messy code, coding agents are great help for that, too. But you have to ask.

Arainach 16 hours ago | parent | next [-]

Agents (and humans) don't know what cleanups are safe or a good idea. They can get stuck in loops when different goals (conciseness, performance, etc.) clash. Their "improvements" can break things unintentionally. Targeted improvements can be good. Giant lists of "fix everything" are bad and will break things.

Tech debt comes with insufficient tests, so you won't know what you've broken until too late in many cases.

EPWN3D 16 hours ago | parent [-]

Yeah that's why step 0 is to tell the LLM to write a test suite for the thing you want to rewrite. It'll do that, but it does require adult supervision. Once you have that test suite, you can send the LLM into an inner dev loop. Like human programmers, LLMs are great when they have a fast inner loop.

The fact that LLMs exist doesn't mean you can just stop thinking. It mean the things you have to think about will be different. You have to treat them as savants with absolutely no ambition.

ModernMech 16 hours ago | parent [-]

There’s a trap here though: the LLMs if you let them will spend all their time maintaining that test suite, they can become quite rigid in the way they design them. So it’ll write some code, break a test, which breaks a contract so then it updates the test and the contract but updating the test also broke another contract… soon enough you’re spending all your tokens fixing contracts instead of writing code.

In a sense the LLM having a fast inner loop is its blessing and curse. A blessing because it gets feedback quickly, but a curse because it becomes naval gazing and cannot see the forest for the trees.

At least this is my experience with Sol maby other models behave differently.

dolmen 3 hours ago | parent | next [-]

Software engineering also applies to the test suite. So its management requires supervision.

tosti 13 hours ago | parent | prev [-]

Sounds like one of the teams I left before project completion 13 years ago.

brazukadev 16 hours ago | parent | prev [-]

asking to clean up is not enough, it is needed to understand the code and fix the things the agents are getting wrong.

skybrian 14 hours ago | parent [-]

It's true that you need to ask good questions to get good results. If you try to understand the code yourself, you will ask better questions.