Description
This course created by Stephen Leonard, is an intermediate-level course designed for developers who can already write working Python and want to make their code clean, readable, and inexpensive to change over time. Spanning 8 sections and 26 concise lectures (1 hour and 45 minutes total), the curriculum moves beyond basic syntax into practical software design, refactoring, and application structure. Every code sample is verified on Python 3.12 and 3.14, with refactorings presented as runnable before-and-after pairs that preserve exact behavior while making code easier to test and extend.
Topics This Course Covers
- Core Python Design Principles: Coupling and cohesion, the Zen of Python as practical design advice, clear naming, single-purpose functions, and information hiding using modules, underscores, and properties.
- Code Smells & Safe Refactoring: Identifying and fixing long functions, long parameter lists, duplicated code, magic values, primitive obsession, data clumps, feature envy, message chains, repeated switches (using dispatch tables and match), and Python-specific smells like mutable default arguments, bare except, star imports, and global state.
- Pythonic Classes, Contracts & SOLID: Deciding between functions, classes, and dataclasses, favoring composition over inheritance, enforcing contracts with Protocols and ABCs, and applying SOLID principles without over-engineering.
- Design Patterns in Python: Recognizing classic patterns that Python provides natively alongside patterns that still add real value in modern codebases.
- Errors, State & Side Effects: Treating exceptions as intentional design decisions and managing state, side effects, and immutability cleanly.
- Small Application Architecture & Safe Testing: Structuring applications into layers with clear dependency direction, using ports and adapters, organizing packages and modules without import cycles, and refactoring safely under behavior-focused tests.
Who Will Be Benefitted Taking This Course
- Intermediate Python Developers: Programmers comfortable with Python functions, classes, exceptions, and modules who want their codebases to stay maintainable as they grow.
- PCAP-Level Learners: Students preparing for or moving past PCEP/PCAP certifications who are ready to transition from language syntax to software architecture.
- Developers Coming from Other Languages: Engineers familiar with Java, C#, or C++ who want to learn idiomatic, Pythonic approaches to SOLID and design patterns rather than forcing boilerplate patterns onto Python.
Why Take This Course
Writing code that runs today is only half the job; real-world software engineering depends on writing code that your teammates and your future self can safely modify six months later without breaking existing behavior. Rather than preaching rigid rules in isolation, this course explains the trade-offs and costs behind every design principle, anchors ideas in authoritative sources like PEP 8, PEP 20, and Fowler's Refactoring, and demonstrates every improvement with runnable before-and-after code. In under two hours, it gives you a sharp, practical toolkit for spotting structural flaws early and keeping Python applications clean and adaptable.








