
I Asked ChatGPT to Review My Code. Here's What It Missed (And What It Caught)
Everyone's using AI for code review now. But is it actually good at it? I ran an experiment. I took 5 real pull requests from my projects and asked ChatGPT (GPT-4) to review them. Then I compared its feedback to what a senior developer found. The results were... mixed. What AI Code Review Caught 1. Obvious Bugs (10/10) AI is shockingly good at spotting basic errors: // AI caught this immediately func divide ( _ a : Int , by b : Int ) -> Double { return Double ( a ) / Double ( b ) // No zero check! } It flagged the missing zero division check, suggested a guard statement, and even wrote the fix. Faster than any human reviewer. 2. Naming Inconsistencies (8/10) let usrData = fetchUserData () // AI: "Consider renaming to userData" let temp = process ( usrData ) // AI: "What does temp represent?" It consistently caught abbreviated variable names and suggested clearer alternatives. 3. Missing Error Handling (9/10) func loadProfile () async { let data = try ? await api . fetchProfile () // AI
Continue reading on Dev.to
Opens in a new tab



