Skip to content
IT Vizag
← Functions & Clean Code

▶ 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

Lesson 8 of 9 · 2 min read

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

🔒 Ready-to-copy prompt: sign up free (above) to unlock it.

Telling the AI your level stops it from suggesting things you haven't learned and can't judge yet.

Ask about edge cases

🔒 Ready-to-copy prompt: sign up free (above) to unlock it.

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.

Tip: Keep a "lessons learned" text cell. Each time a review teaches you something, write one line. Ten reviews later, you'll have your own style guide.

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.

Saved on this device. Sign in to keep progress everywhere.

Share with a friend