AI-generated code is un-refined gem

When we let the agents do all the coding without reviews, the code will absolutely look like a mess, and letting agents generating more instead of reviewing will just lead to a bigger mess. That’s what happened to Claude Code, and we should not sacrifice quality for the sake of delivery speed. That’s how I expect the current AI narrative to be: AI-generated code/videos/images/essays are slop, and hand-rolled code is a proof of taste, yadda yadda.
Here’s my hot take: I think AI generates good code. But we need to define “good” here.
After a while of trying to code without AI assistance, I would say my own written code is sloppy too, and the LLMs just amplifies the sloppiness. Still, I think there is something valuable in that sloppiness: I learn how to detect pattern of bad code. You might say that I don’t have to eat sh*t to know how sh*t tastes like (gross, I know, but bear with me), and that there are plenty of examples of good code out there, why not go for that? I agree, but at least for me, looking at good code does not magically make me a good programmer, no matter how hard I look. There should always be many failed experiments to lead to a successful one.
I often feel anxious when I have to start from a complete clean slate, like there is absolutely no clue where to start: How should I design a event-driven architecture, now that I’m not even familiar with the components I’m supposed to connect with an event bus? That’s why I prefer to look through AI-generated code. Claude gives me a complete implementation of a event-driven design, and the code looks as messy as ever with absolutely no taste, but at least I get a glimspe of how things are structured. What’s left for me is to understand the flows, then refine the code to fit into mine.
So what works for me is to try to take it slow, look through the slop, and even type every line of code manually if possible. I think typing things out really goes against the trend of “agents doing all the work”, but it’s the best way to learn: Wrestle with the knowledge. Question it, challenge it, improve it. Use all your expertiese. Go through each change carefully. Don’t push things you don’t understand. All of them are plain old practices.
Sometimes the agent might be right and all is fine and dandy, but most of the times we sort out dumb things that AI could never do even after many tries. That’s when we get better.

