Using AI Assistants Without Shipping Their Mistakes Reviewing Generated Code Like a Reviewer
3 / 5
Next
Reviewing Generated Code Like a Reviewer ~16min

Run this checklist every time

  1. Does it run? Obvious, and frequently the answer is no
  2. Do these functions exist, in this language, at this version?
  3. Are queries parameterised, or is a variable concatenated into SQL?
  4. Is output escaped?
  5. Are errors handled, or silently swallowed?
  6. What about the empty case, the null, the failed request?
  7. Does it match the surrounding code, or has it invented a different style?

The specific failure patterns

  • Invented APIs. A plausible method name that does not exist. Check the documentation
  • Outdated syntax. A removed function, or a deprecated argument
  • Missing edge cases. The happy path is handled beautifully; the empty array crashes
  • Security shortcuts. String-concatenated SQL, innerHTML with user data, a hardcoded key
  • Over-engineering. Three abstraction layers where a function would do

Test it before you trust it

Empty input, one item, many items, wrong type, no network. Generated code is written to satisfy the description you gave, not the reality it will meet.

Do not paste blindly into a large file

Add it in a small piece, run it, then continue. A 200-line paste that breaks the page gives you no idea which part is responsible.

Tasks
Preview