Lesson 1Four checks that matter most
- Does it actually do what you asked — fully? Run it, with real and edge-case inputs, not just the happy path.
- Do you understand every line? A section you can't explain is a signal to ask or look it up, not to move on.
- Does it fit your project's style and structure? Correct but inconsistent code is harder to maintain.
- Is there a security or data-handling concern? Anything touching user input, passwords, payments or personal data deserves the most scrutiny.
Real-life example: a student in Next Door Tech's Cybersecurity track asked an AI tool for a simple login-check function. It worked for a normal username and password — but testing with an empty password revealed it let the user in anyway, a real security flaw common in quickly-generated code. Testing beyond the happy path caught a bug that could have shipped into a real application.
Try to break it
Before calling AI-generated code done, deliberately attack it: empty inputs, wrong data types, unusually large or small numbers, unexpected characters. If it survives that, you can trust it much further.