Module Check: Quality, Testing & Debugging
This module has made one argument, nine different ways: when you build with AI, you are responsible for everything. The AI is a powerful tool. Tools do not carry responsibility — builders do. This check consolidates the core concepts, tests your reasoning across all nine lessons, and closes with a capstone task that asks you to demonstrate the integrated habit of mind this module has been building.
Flashcards — click each card to reveal the answer
A student ships a login feature without testing it because 'the AI generated it and it looks fine.' Two weeks later, users with email addresses containing a plus sign cannot log in. Which principle did the student violate?
Which of the following best describes what makes a test a strong test?
A developer prints a variable's value inside a function and confirms it is correct, but the value is wrong when the caller uses it. What does this tell you about where the bug is?
An AI-generated function uses the line: query = 'SELECT * FROM orders WHERE id = ' + order_id. Which single change eliminates the entire class of vulnerability this creates?
A developer's codebase has 100% test coverage but still ships with a critical bug. How is this possible?
An AI assistant claims, with apparent confidence, that library.fetchUser(id) is the correct method to call. You have never used this library before. What is the mandatory next step?
The nine lessons in this module describe one integrated practice: before you ship anything, ask — does this do what I intended, for all the inputs it will actually receive, securely, at the performance level users require, and is that claim backed by a test that would fail if it were wrong? The AI cannot answer that question for you. You can.
Full-Spectrum Audit
- This capstone task integrates every dimension covered in this module. Budget 30-45 minutes.
- Step 1 — Generate: Ask an AI to build a small feature of meaningful complexity: a function that accepts a user's date of birth (as a string), validates it, calculates their current age in years, and returns a JSON object containing the age and whether the user is eligible for an 'adult' tier (18+). Ask the AI to include basic error handling.
- Step 2 — Test (Lesson 2): Before reading the code deeply, write six test cases: a normal adult user, a user born today, a user born on a leap day, an invalid date string, a date far in the future, and a null/empty input. Run all six and record pass/fail.
- Step 3 — Debug (Lessons 3 & 4): For any failing test, apply the systematic method: read the full error, identify the error type, locate the origin in the stack trace, form a hypothesis, make one targeted change, confirm the fix.
- Step 4 — Review (Lessons 5 & 9): Apply the seven-category review checklist. Write one observation per category. Write full three-part review comments (What / Why / How) for every finding rated P1.
- Step 5 — Security (Lesson 6): Does any part of this function accept the date string and use it in a way that could be exploited? Is any date, timezone, or locale assumption hardcoded? Document your findings.
- Step 6 — Performance (Lesson 7): What is the time complexity of this function? Is it appropriate for a function that might be called 100 times per second for many users? State your reasoning.
- Step 7 — AI Verification (Lesson 8): Find one thing the AI stated or assumed confidently that you had to verify externally. What was it? Was it correct?
- Step 8 — Reflect: Write three sentences: what the AI got right, what you had to fix or improve, and what this exercise reveals about your role as a builder.