Works until you discover subtle bugs hiding behind ugliness.
Yes, there are so many. As in hand-written code. I don’t take LLM written code for granted and I rewrite is sometimes. I know it’s not perfect. But it’s useful.
Compile code is not perfect also. But who does hand-written assembler anymore? Yes, LLM is another layer, it would be ugly and slower but it’s much faster to use.
Which is true for human-written code as well.
In both cases, it's your processes (automated testing, review, manual QA) that is the bulwark against bugs and issues.
With AI, you can set up great processes like having it check every PR against the source code of your dependencies or having it generate tests for what's an intermediate step or ephemeral solution that you would never write tests for if you had to do it yourself.
There's this idea on HN that if you delegate too much to AI, you get worse code. Presumably not appreciating all the code-improving processes you can delegate to AI, particularly processes you were never doing for hand-written code.