AI Code Is Already Correct, So Why Do We Still Need Code Review?
AI code can pass every test and still stall a service when the data grows. Why a correct result is not enough, and why code review still matters with AI.
Someone once told me, “AI can already write correct code, and the behavior is right. So why do we still need code review?”
My answer is that “correct” has two levels. The first level is a correct result. The second level is a result that stays correct when the data grows. AI usually covers only the first level.
Full scan and index query
A backend has two common ways to get data from a database. A full table scan reads every row in the table. An index query jumps straight to the rows it needs.
The timings above are for illustration only. They are not measured results.
With a small amount of data, the two ways look the same. When the data grows, the full scan drags the whole service down. A person who only checks whether the result is right cannot see this difference.
An example from my work
At work, I set up an AI review gate. One time, it stopped a change. Every test used only plain English paths, so the code that handles special characters had no test at all. The code ran and every test passed, but real data breaks it.
The bar moved
Writing code is now very cheap. Being able to write code moved from “good enough” to “the minimum.” Juniors will split into two groups. Some will be very strong, and some will fail, and the passing line is now higher.
If you do everything with AI alone, you will be replaced. If you know why an index matters, you will stand out. This is the domain judgment from Back to First Principles. Three Pieces of Advice for Students and Career Changers covers how a newcomer can clear this bar.
AI makes code cheap, and it makes judgment expensive.
Related: next, read how a newcomer can clear the new bar, revisit the leverage formula, or go back to the series overview: Will AI Take My Job?