← Back to context

Comment by bhaak

2 days ago

I vibecoded a project without looking at the code as an experiment, and I had the same experience as you. It really drives home the point that, left to their own devices, LLMs produce abysmal code.

If you give them no constraints, they’ll produce code that just works, and it’ll look exactly like that.

We already know the solution to this problem. Software engineering. Put the LLM through the same grinder as any software dev and out constraints into place. Tell the LLM that the code design is bad and that it should improve it.

In my case, I had to go through several rounds of refactoring before the code at least resembled a good codebase.

A fun fact is that the refactorings didn’t break any functionality. Only adding new features broke preexisting behavior.

I don't think this is the case anymore if you're using the latest expensive models, i.e fable.