AI-Generated Code Review
The cluster focuses on debates about using AI to generate code, highlighting concerns over its reliability, subtle bugs, and the critical need for human review rather than blind trust.
Activity Over Time
Top Contributors
Keywords
Sample Comments
That's why we have code reviewing. If you review your AI generated code, understand it, and completely agree with it, that's fine of course. But the message of this article is that you still can't blindly rely on AI for even such simple tasks.
You get whole blocks of code written by AI? No reviewing from the original dev???
Use AI to generate AI prompts while you continue on with your normal work. How will they know if your code was not written by AI?The "look at Tom" thing isn't new, there have always been sloppy engineers that crank out bad code faster than their peers and got praised for it while slowing everyone else down because they had to actual debug and integrate the garbage.
The article is complete nonsense because AI generated code is often buggy, and always needs to be reviewed in detail. Also, the code can only be good if the prompt is good and detailed. All of this takes up a significant amount of time. It would seem that the author is technically incapable of reviewing code, which is why it's not even an afterthought.
This is tautological. If you keep instructions dumbed-down enough for AI to work well, it will work well.The problem is that AI needs to be spoon-fed overly detailed dos and donts, and even then the output can't be trusted without carefully checking it. It's easy to reach a point where breaking down the problem into pieces small enough for AI to understand takes more work than just writing the code.AI may save time when it generates the right thing on the first try, but that'
It's not that you ask it to write 200 lines of code at once, and blindly trust it. It's more that you start to use the lib, ask it to generate one helper method at the time, for an isolated task. Which leave you time to "review" the code that it wrote properly. Even when a human writes code, it needs to go through peer-review. So the exact same applies with AI. It's the job of the reviewer (in this case, the one who invokes the AI) to make sure that the one who wrote the
Alas, AI generated code is usually more tech debt.
I sincerely worry about a future when most people act in this same manner.You have - for now - sufficient experience and understanding to be able to review the AI's code and decide if it was doing what you wanted it to. But what about when you've spent months just blindly accepting" what the AI tells you? Are you going to be familiar enough with the project anymore to catch its little mistakes? Or worse, what about the new generation of coders who are growing up with these too
What's wrong with using AI to write code?
Yes. Firstly AI forgets why it wrote certain code and with humans at least you can ask them when reviewing. Secondly current gen AI(at least Claude) kind of wants to finish the thing instead of thinking of bigger picture. Human programmers code little differently that they hate a single line fix in random file to fix something else in different part of the code.I think the second is part of RL training to optimize for self contained task like swe bench.