Fix and Improve
AI-made code can be confidently wrong. Find the problems, fix them properly and prove your app works.
- Suits
- Learners who have built and read small apps with AI (V1, V2) and want to check, debug and improve what the AI makes.
- Before this
- Where it fits
- Level 2, Builder (from about 10): Build interactive apps with the AI helper and coding agent, review every change, find bugs and prove your app works. This course is in Build with AI: Vibe coding: describe what you want to an AI model, then review, guide and improve what it builds.
What you'll be able to do
- Explain why AI-generated code needs checking: confident mistakes, missing cases, and functions or packages that don't exist.
- Debug with evidence: reproduce a bug, read the console error, and locate the line before asking for help.
- Write simple checks that define what "works" means, including edge cases, before asking an AI agent to make them pass.
- Ask an AI tool for a fix with the error, the relevant code and the expected behaviour, and reject fixes that hide the problem.
- Handle user input safely (textContent, not innerHTML), keep secrets out of code and respect other people's data.
Lessons
1. When AI is wrong
25 minAI coding tools can be confidently wrong: they miss cases and sometimes use functions or packages that don't exist. That's why you check.
2. Debugging with evidence
30 minAI-off checkpoint: reproduce the bug, read the console, and find the line yourself — before asking anyone for help.
3. Tests define "works"
30 minWrite simple checks first — what should happen, including edge cases — then ask the AI agent to make them pass.
4. Asking for a good fix
30 minGive the AI tool the error, the relevant code and the expected behaviour — then review the fix and reject any that hide the problem.
5. Safe and kind apps
30 minTreat what people type as text, not code (textContent, not innerHTML), keep secrets out of your code, and respect other people's data.
Plus 1 sandbox project with automated checkpoints.
How it's assessed
- Explains why AI-generated code needs checking, with examples of confident mistakes, missing cases and invented functions or packages.
- Debugs from evidence: reproduces a bug, reads the console error and locates the line without AI help (AI-off checkpoint).
- Writes simple PASS/FAIL checks, including edge cases, that define what "works" means.
- Asks for fixes with steps, expected and actual behaviour, the error and the relevant code, and rejects fixes that hide the problem or change the checks.
- Shows user input with textContent, keeps secrets out of code and collects only the data an app needs.
To complete the course
- Complete all 5 lessons and pass each check (70% or more), including the AI-off checkpoint in "Debugging with evidence".
- Finish the Dragon Egg Bug Hunt project with all automated checks passing, including your own runChecks().
- Write a reflection that names each bug, the evidence that led to it, and any AI fix you rejected and why.
Notes for parents, guardians and teachers
- This course uses Amphicode's built-in AI helper and coding agent inside the sandbox; learners can type their own questions. Using any outside AI tool should follow that tool's own age rules and be guided by a parent, carer or teacher.
- Lessons explain why packages suggested by AI tools must be checked before installing. Installing anything outside Amphicode is a guardian-guided decision.
What comes next
- V4: Apps with Data · Look under the hood: databases, APIs, keys and deploys.
- V6: Real Projects in the Maker Studio · Move from one web page to a real React project: components, a build, tests that prove it works, packages you approve, and a history of every version.
A parent, guardian or teacher creates the account. A short placement check suggests where each learner starts.