Finished-Looking Is Not Finished

AI-generated code has a dangerous quality for students: it arrives looking done. The formatting is tidy, the variable names are sensible, and there is usually a confident comment explaining what it does. Nothing about it looks like the messy first draft you would write yourself, so your brain skips the step it most needs to take — checking whether the code is actually right. That is exactly when a wrong assumption slips through: a function that drops the wrong item, a calculation that only works when the list is long enough, or a crash waiting for an input nobody tried.

The skill that matters here is reviewing: treating every AI answer as a classmate's draft that might be brilliant and might be broken, and proving which one it is before you submit it, save it, or build on it. The checklist below takes about ten minutes, needs no installation, and works on any AI answer in any language.

Step One: Read It Before You Run It

Do not run AI code first. Read it first, line by line, and explain each line in plain words, as if you were teaching it to a classmate. If you cannot explain a line, that line is unreviewed — and unreviewed lines are where bugs hide. Pay special attention to the cleverest parts: a slice like [1:], a division, a minimum or maximum, and any line that silently assumes something about the input, such as “this list has at least two items.” Is that assumption true for every input this program will ever see?

Write your explanation down as a short note, not just in your head: “this drops the lowest score, averages the rest, adds the bonus, and caps the result at 100.” Once the claim is written, it can be tested — much easier than testing a vague feeling that the code “looks about right.”

Step Two: Run Three Inputs, Not One

Paste the program below into the browser editor in Python — one of the 34+ executable languages on CoderFile (120+ syntax-highlighted) — and run it three times. The program is the kind of answer an AI gives with total confidence: drop the lowest score, average the rest, add a bonus, cap at 100. It works beautifully on the first input. It does not survive the other two.

# final_score.py — an AI-style answer. Read it, then run all three cases.
def final_score(scores, bonus): kept = sorted(scores)[1:] # drop the lowest score total = sum(kept) / len(kept) + bonus return min(total, 100) print(final_score([70, 80, 90], 5)) # Expected: 90.0
print(final_score([90], 5)) # What happens with one score?
print(final_score([], 5)) # What happens with no scores?

The first run gives 90.0, exactly as promised: 70 is dropped, 80 and 90 average to 85, and the bonus makes 90. The second and third runs crash, because dropping the lowest score from a one-item or empty list leaves nothing to average. The code does precisely what its comment says — the problem is that the plan only makes sense with at least two scores, and nobody stated that condition. That gap between “works on the example” and “works in general” is the most common flaw in AI-generated code, and only awkward inputs reveal it.

Step Three: Shrink the Failure Before You Fix It

When a run fails, resist the urge to paste the error back to the AI and accept whatever comes back. First shrink the problem: run the single failing function on its own, with the smallest input that still breaks it. Here, final_score([90], 5) is already small, and it tells you the whole story — the bug is not in the bonus, the cap, or the sorting, but in the assumption that something remains after dropping one item. A shrunken failure also gives you a test you can keep: after any fix, that same tiny input must now pass, or the fix is not a fix.

Shrinking also stops you from fixing the wrong thing. If you had only run the normal case, you might have “improved” the averaging and felt productive while the real crash stayed untouched. In Lab lessons, exercises are checked as you go, training the same instinct: isolate the failing piece and prove it works before moving on.

Step Four: Rewrite the Part You Cannot Explain

A fix you cannot explain is just another unreviewed line. Once you know the failure — nothing left to average after dropping the lowest — write the guard yourself before asking the AI for anything. Here the honest fix is a decision, not just a line of code: what should happen when there is only one score, or none? Keeping the single score as-is, returning the bonus alone, or refusing the input are all defensible answers, but they are different programs, and only you can say which one the assignment actually wants. That decision is the understanding the AI cannot make for you.

A simple version keeps the single score and treats an empty list as zero, verifiable with the same three runs. Try writing it yourself first — it is only a few lines — then compare it with an AI suggestion using the same checklist. If the AI version differs, do not assume it is better: run both on all three inputs and let the results decide. The version you understand and can defend is worth saving, even when it is plainer than the AI's.

Step Five: Save the Reviewed Version, Not the Draft

Save the fixed program as a snippet, with a note that records the review, not just the result: what the AI first suggested, which input broke it, what you decided the edge case should do, and which three runs now pass. Next term, when you reuse the snippet, you will see the reasoning, not just code that happens to work. Share it with a classmate and ask them to run it with an input you did not try, and use the built-in developer tools to format it first, so the reviewer reads logic, not layout.

When Reviewing Every Day Hits a Limit, That Is the Upgrade Moment

Stay on Free ($0: 20 executions a day, 10 AI requests a day, 10 saved snippets, 3 private snippets, 3 collaborators per snippet) while it fits — reviewing one or two AI answers a day, three runs each, fits comfortably. But a reviewing habit grows: deadline week brings an AI answer for every assignment, each needing three runs plus a re-run after the fix. That is when Pro earns its $9/month or $69/year — unlimited saved snippets and executions, 100 AI requests a day, 10 collaborators per snippet, and unlimited private snippets — and Team ($19/user/month, or $15/user/month billed annually) covers a class reviewing AI code together. See the pricing page for current terms, and upgrade for a limit you hit, not for a feature you might use.

Your next step is one AI answer you already have, not a new one. Open the editor, paste the final-score program above, and run all three cases — normal, single score, empty — so you see the crash yourself. Then write the guard in your own words, re-run all three, and save the reviewed version as a snippet with a note about what broke and what you decided. That single reviewed answer, saved with its reasoning, is worth more than ten AI answers you never checked — and it is the habit that will carry every project after it.