Skip to main content
Loading page…
Python Mastery
Chapter 52
Lesson 4 of 5
Clean Code, Refactoring & Architecture
Contents
Notes
Tutor
Concept
Naming: The Hardest Thing in Programming
Loading activity…
Previous
1 / 8
Continue
Contents
Notes
Discussion
Tutor
26 min
8 activities
0 of 8 done
In this lesson
1
Naming: The Hardest Thing in Programming
2
Small Functions and the Single Responsibility Principle
3
DRY, KISS, YAGNI
4
Three-Layer Architecture
5
Recognising and Fixing Code Smells
6
Identify the Violation
7
The Boy Scout Rule
8
Apply YAGNI
Objectives
Identify and rename poor names, extract functions, and apply SRP to a messy module
Explain DRY, KISS, and YAGNI and give a real Python example of each
Describe a three-layer architecture (domain, IO, presentation) and explain why it matters
Identify common code smells and apply a refactoring step to fix them
Chapter 52 · Professional, Production-Ready Python
Packaging with pyproject.toml
Dependency Management with uv, Lockfiles & Ruff
Git & GitHub Workflow
Clean Code, Refactoring & Architecture
Security Basics & Production Practices
Previous: Git & GitHub Workflow
Next: Security Basics & Production Practices