Module 1 / Four topics / Eight videos
The AI-Native
Refactorer
Refactoring is not optimization, modernization, or making code prettier. It is changing structure without changing behavior, so the next person to read the code can understand it faster and change it more safely. This course teaches the four refactors that pay for themselves fastest — and how to drive an AI assistant through each one without letting it rewrite your file.
- Format
- Lecture + hands-on video
- Practice
- 10-minute assignment per topic
- You need
- Python 3.10+, pytest, an AI assistant
Topic 01 of 04
Long Methods
The tell Four section comments inside one function — the code naming its own seams and staying put.
Long Methods explores one of the most common code smells in software development. Learn how to recognize methods that have grown beyond their purpose, extract meaningful responsibilities, improve readability, and reduce maintenance costs. Discover AI-assisted refactoring techniques that transform long, complex methods into clean, focused, and maintainable code.
Topic 02 of 04
Duplicated Code
The tell Two functions with nothing in common but their purpose — and no tool that can see it.
Duplicated Code teaches you how to identify repeated logic that increases maintenance costs and introduces unnecessary risk. Learn proven refactoring techniques to eliminate duplication, improve consistency, and simplify future changes. Discover how AI can help detect duplicated code and recommend cleaner, reusable designs while preserving correctness and readability.
Topic 03 of 04
Magic Numbers and Strings
The tell A literal sitting in business logic that exactly one person on the team can explain.
Magic Numbers and Strings examines the hidden costs of hard-coded values scattered throughout your code. Learn how to replace unexplained literals with meaningful constants, improve readability, simplify maintenance, and reduce errors. Discover how AI can identify magic numbers and strings and help transform them into self-documenting, maintainable software.
Topic 04 of 04
The Deepest Refactor
The tell A constructor that takes no arguments and builds three concrete services of its own.
The Deepest Refactor and the Biggest Long-Term Win explores why the most valuable refactoring often happens before a single line of code is changed. Learn how to rethink design decisions, simplify architectures, and address root causes instead of symptoms. Discover how AI can help identify deeper opportunities for improvement while preserving sound engineering judgment and long-term maintainability.
Carry this out of the course
The five steps, every time
- 01 SCAN — find the smell and name what it is doing.
- 02 PRIORITIZE — pick the one worth the next fifteen minutes.
- 03 PROTECT — write the characterization tests before you touch anything.
- 04 EXTRACT — one scoped change at a time, tests between each.
- 05 VERIFY — read the diff and ask where a new feature would go.
Skipping PROTECT is how people break production with a refactor. The bugs it lets through are the subtle kind — they only appear on the inputs you never thought to try by hand. A refactor is not done when the tests pass; it is done when a human has read the new code and agreed it is clearer than the old.