▶ Sign up free for the video, slides & prompts
The lesson below is open to all. Enter your email once to unlock every video, slide deck, prompt and code example on this device.
Checking…
AI angle: review your code with AI
Ask AI for a code review, and decide which advice to take.
🎬 Video version coming soon — read it now
In real teams, code is reviewed by a colleague before it's accepted. AI can give you a quick first review on your own projects. The skill is deciding which advice to take.
A good review prompt
Telling the AI your level stops it from suggesting things you haven't learned and can't judge yet.
Ask about edge cases
Then test each one yourself. This builds the habit of thinking about empty lists, zero, negative numbers and strange text.
Judging the advice
Not every suggestion is good. Take it when:
- It fixes a real bug you can reproduce by running the code
- It makes code clearly simpler to read
- You understand the change completely
Be sceptical when:
- It adds libraries or patterns you don't need
- It makes short code longer "for best practice" with no clear benefit
- It "fixes" something that wasn't broken. Test before and after
Always re-run
After you apply changes, run your program again with the same inputs, including the tricky ones. AI-suggested code can introduce new bugs while fixing old ones. In the Production Python course you'll learn to automate this with tests.
Keep your code safe
Don't paste company code, passwords, API keys or customer data into public AI tools. For learning projects like these, you're fine.
In one line
Ask AI to review at your level, test every suggestion, keep only what you understand, and always re-run your program after changes.
Share with a friend