tutorpackSee prices
All courses

AI at work · course 27 of 105

AI Code Review: Catch Bugs Before They Run

Check the Python an AI writes before you trust it: predict what it really prints, find and fix the bug, and pick the tests that would have caught it.

4 modules

Not on sale yet. When sales open: $4.99 USD for this course, paid once, or every course for $9.99 USD a month. Prices

Runs in Claude (claude.ai, the Claude apps or Claude Code) with your own Claude account. A course opens there as soon as your payment goes through; nothing is shipped.

Preview

What it teaches

How to check the code an AI assistant writes for you before you trust it. You predict what AI-written snippets really print (the traps: shared default lists, sort() returning None, floats, //, falsy zeros, changing a list while looping), find the bug in a function against its docstring and give the fix, and pick the tests that would actually catch a bug (boundaries, branches, odd input, a second call, a hostile SQL input). The AI asks 3 questions, places you, shows a short card per module, then gives you one item at a time and checks you against an answer key: every answer about what the code does came from running it.

For people who already use ChatGPT, Copilot or Claude to write Python (analysts, ops, junior developers) and want to catch the bugs before they run the code.

How long

37 items. About 20 rounds (if you already know the basics) to 50 (from scratch) plus a 12-item final: 1-3 sessions (not timed with a real person). The tutor gives a one-line save code at the end of each session.

The modules

4 modules, drilled one item at a time.

  1. M0

    The words

    Concept questions

  2. M1

    Predict what AI-written code prints

    Say what a snippet really prints

  3. M2

    Find the bug

    Name the buggy line and give the fix

  4. M3

    Which test catches the bug?

    Pick the tests that catch the bug

Before it teaches, it asks

  1. 1
    Which AI tools write code for you (Copilot, ChatGPT, Claude, Cursor...), and how much Python can you read: none, a little, or comfortably?
    AI voice (ElevenLabs)
  2. 2
    What does this print?scores = [3, 1, 2]best = scores.sort()print(best)print(scores)
  3. 3
    This function was written by an AI. Find the bug: which line, and what’s the fix?1 def can_vote(age):2 """True if age is 18 or older."""3 return age > 18

What’s exact, and what isn’t

Show

Straight from the course’s own notes.

Produced by running the code
Every snippet was run on Python 3.14.3 and 3.9.6 (they agree). Every “what does it print” answer is what the code printed; 9 of the 10 listed wrong answers were produced by running the code the student is picturing. Every buggy function fails at least one test, every fix on the answer list passes every test, and the answer key’s own fix changes only the lines the answer names; a fix of your own is checked by the tutor against the same tests, by hand. Every “which test catches it” answer is the set of options that give a different result on the buggy and a correct function. A planted-error test (4 errors) was caught.
Sourced
Why to review AI code and what to look for, from GitHub’s Copilot responsible-use page, Anthropic’s Claude Code best practices, the Python docs and OWASP; short quotes matched word for word on 2026-10-10.
Honest limit
The tutor can’t run your code. A fix that isn’t on the list is checked against the item’s tests by reasoning, and marked “worked out”. The bugs here are small and planted, not taken from a real assistant’s output.
Not in it yet
Other languages, reviewing whole pull requests, security beyond hard-coded secrets and SQL injection.