Summary
AI code generation fails in specific, predictable ways: fabricated APIs, subtly wrong logic, deprecated patterns, and confident wrong answers on version-specific questions. Knowing the failure modes is the difference between shipping working code and shipping bugs.
Objectives
- 01List the five most common AI code-generation failure modes.
- 02Explain why each occurs.
- 03Design a review checklist that catches them.
The Lesson
The list
Fabricated APIs: functions that don't exist, plausibly-named. Version drift: patterns from an older version of a library. Off-by-one and edge-case errors: correct-looking code that fails on empty input. Silent async issues: awaits missed. Security holes: SQL concatenation, missing auth checks. Every one is catchable with a review.
Key Ideas
- The failure modes are predictable. Design the review to catch them.