logoalt Hacker News

ModernMech • yesterday at 11:30 AM • 1 reply • view on HN

> they inevitably end up writing an absolute mess

I don't think this is inevitable. How do you define an absolute mess? Whatever you come up with, give the agent instructions to not do that. Then audit the code to make sure it's not happening.

> Not only does the code become impossible for humans to reason about very quickly,

What makes it actually impossible? It's using logic that is beyond human comprehension? It's using the programming language in a clever way no human would expect? Have you tried instructing it to code in a way that's more comprehensible to humans, e.g. literate programs?

> it actually becomes difficult for agents to reason about it.

This I have not seen. Do you have an example?


Replies

sunaurus • today at 7:03 AM

> Whatever you come up with, give the agent instructions to not do that. Then audit the code to make sure it's not happening.

Yes, this is what I mean by saying you need to stay on top of the agents

> What makes it actually impossible?

A combination of wrong abstractions, lack of abstractions, assuming some key requirements were just implementation details and thus are safe to refactor, assuming some implementation details were key requirements and thus must be protected at all costs, etc etc.

In practical terms, it's just volume of code that is spread extremely wide, duplicated with subtle differences, and just organized extremely confusingly.

> This I have not seen. Do you have an example?

If you try to vibe code longer term projects, you very often start getting completely nonsensical explanations from agents about why they are doing things. They reference requirements which are not real (based on what they interpret from the messy code), they write thousands of test cases that are redundant, or test things which are implementation details. Eventually even trivial changes become extremely slow due to lack of structure, due to fresh agents being confused by contradictions introduced by previous sessions, and due to test suites that take hours to run.