20 min Lecture
-
The "trust but verify" mindset — you MUST read the code
- Why type annotations matter for AI-generated code
- Testing as a verification mechanism
-
Demo: CLI tool with full type hints, tests, and
documentation
50 min Exercise (includes breaks)
-
Project: Build a CLI tool from scratch with
AI
-
Requirements: argparse/click, type
annotations, pytest tests, docstrings
-
Task 1: Generate the initial structure
-
Task 2: Read every line — find at least 2
things you'd change
-
Task 3: Run the tests — do they actually
test the right things?
-
Task 4: Refactor one function based on your
review
Project Prompt
"Create a CLI tool that [your choice: converts files, fetches
data, generates reports, etc.]. Include: click for CLI, full
type annotations, pytest tests with >80% coverage, and
Google-style docstrings. Structure as a proper package with
pyproject.toml."
Outcome: Habit of examining AI code
critically + a working CLI tool to take home