Effective Python with AI assistants
Published by O'Reilly Media, Inc.
Better, faster, smarter code
Course Outcomes:
- Learn to use AI coding assistants to streamline your development tasks.
- Practice fast-paced test-driven development with AI assistance.
AI coding assistants such as GitHub Copilot, JetBrains AI, and Codeium are rapidly taking hold in IDEs to revolutionize code completion and streamline problem-solving. As these assistants become ubiquitous for developers, a critical question arises: How can we ensure code quality in an AI-powered future?
Join Fernando Vieira to learn how to speed up Python development keeping all batteries attached. You will learn how to quickly deliver Python code that includes tests, documentation and type hints. And you will achieve all of this while ensuring code quality and avoiding situations where you don’t understand what the generated code does or whether it’s covering all requirements. As a bonus, get a quick start as a test-driven development (TDD) practitioner using AI assistant to shortcut all boilerplate parts of testing code.
What you’ll learn and how you can apply it
- Extract the best of AI code assistants, focusing on core logic and test cases.
- How to use AI to speed up tasks like documenting and type hinting.
- Practice fast-paced TDD with an AI assistant.
This live event is for you because...
- You’re a professional in software development who wants to use an AI assistant to speed Python coding delivery and improve quality with great documentation, type hinting and code coverage, preferably practicing TDD.
Prerequisites
- Fundamental coding skills
- Basic unit test knowledge
- An understanding of C-like syntax languages
- Familiarity with Python syntax and core language constructs.
Course Setup
- The course repository is available on the repo in GitHub. All setup instructions to run the project locally are presented in the readme.md file.
- You can use your preferred IDE and AI assistant to complete the proposed exercises during the session.
- If you have a GitHub Copilot license, enjoy the convenience of GitHub Codespaces (60 free hours per month for a 2-core instance). Simply create a new Codespace from the repository, ensuring you select the correct branch before proceeding.
Recommended Preparation
- Watch “The Basics of Unit Testing” (chapter 1 of The Art of Unit Testing, video edition)”
- Watch “The Basics of Unit Testing” (chapter 1 of The Art of Unit Testing, video edition)
- Watch TDD parts 1 and 2 of Clean Code Fundamentals (on-demand course)
Recommended Follow-Up
- Read Test-Driven Development with Python, 3rd Edition
Schedule
The time frames are only estimates and may vary according to how the class is progressing.
Using AI Coding Assistants (50 minutes)
- Presentation: AI coding assistants: what they are, product, limitations. (10 min)
- Presentation: Overall best practices (5 min).
- Presentation: How to use AI assistant chat feature (5 min).
- Exercise: Using AI chat to explain code (10 min).
- Pulse Check: Were you able to understand the code after the AI assistant explanation?
- Presentation: How to use code completion feature (5 min).
- Exercise: Using AI code complete to finish a small code task (10 min).
- Q&A (5 min).
- Break: 5 mins
Writing code with AI (40 minutes)
- Presentation: Good practices of coding with AI assistants (5min)
- Presentation/Live coding: Coding with an AI assistant (5 min)
- Exercise: Coding with an AI assistant to solve a problem (15 min)
- Discussion: How effective was it? (5 min)
- Presentation/Live coding: make AI assistant generate documentation and type hints, ask for improvement suggestions (error handling / log messages) (10 min)
Unit Testing with AI (20 minutes)
- Presentation: Good practices of unit testing with an AI assistant (5min)
- Exercise: Unit testing an existing code to reach 100% code coverage (15 min)
- Pulse check: How helpful was the AI assistant while coding unit tests?
- Break: 5 mins
Test Driven Development (TDD) with AI (55 minutes)
- Presentation: TDD – a very quick overview (5 min)
- Presentation: How to accelerate TDD with an AI assistant - live coding / code example (10 min)
- Q&A: Do you have something to ask about what have just been showed (5 min)
- Exercise: apply TDD to solve a proposed problem (10 min)
- Discussion: is the AI assistant able to understand what you want to achieve? (5 min)
- Exercise: apply TDD to solve a proposed problem (15 min)
- Discussion: Do you feel it will be easier to practice TDD with the help of an AI assistant? (5 min)
Final Thoughts & Remarks (5 minutes)
- Presentation: what you should remember + quick review of best practices
Your Instructor
Fernando J. Vieira
Fernando J. Vieira is a Brazilian-Portuguese software craftsman with over two decades of industry experience, offering a uniquely global and multidisciplinary perspective. With a robust academic foundation in software engineering, electrical engineering, and data science, Fernando has worked across a wide range of sectors—from traditional manufacturing to dynamic tech startups—spanning multiple continents.
Now working as an independent consultant, Fernando partners with companies and individuals to elevate their software development practices. He does this through hands-on mentoring, targeted instruction, immersive workshops, and direct engagement in areas such as coding, CI/CD, automation, and Infrastructure as Code (IaC).
A passionate advocate for software excellence, Fernando regularly contributes to the tech community by writing insightful articles and essays on software craftsmanship, best practices, and leadership.