π§ Module 06: Software Design¶
Software design is about writing code that stays readable, changeable, and reliable as it grows. This module focuses on practical design principles you can apply daily β even in small scripts β to reduce bugs and make future changes easier.
Estimated Time: 6-8 hours
Prerequisites: Module 01 (Foundations), Module 04 (OOP Concepts), Module 05 (Functional Programming)
Level: βββ Upper-Intermediate
π Topics Covered¶
| # | Topic | Description | Key Concepts |
|---|---|---|---|
| 01 | DRY Principle | Remove duplication and centralize knowledge | duplication, single source of truth |
| 02 | KISS Principle | Prefer simple solutions that are easy to understand | simplicity, readability |
| 03 | YAGNI Principle | Build what you need now, not what you might need later | scope, overengineering |
| 04 | Separation of Concerns | Split responsibilities so each part has one job | layers, boundaries, modules |
| 05 | Coupling and Cohesion | Design for low coupling and high cohesion | dependencies, responsibility |
| 06 | Code Smells | Recognize warning signs of maintainability issues | long functions, god objects |
| 07 | Refactoring | Improve code structure without changing behavior | safe changes, small steps |
π― Learning Goals¶
By the end of this module, you should be able to:
- Spot duplication and apply DRY without over-abstracting.
- Choose simpler designs and explain why theyβre safer.
- Avoid speculative features and premature abstractions (YAGNI).
- Organize code by responsibility using separation of concerns.
- Reduce coupling, increase cohesion, and understand trade-offs.
- Identify common code smells and propose concrete improvements.
- Refactor confidently using small, behavior-preserving steps.
π Module Structure¶
06_software_design/
βββ README.md
βββ 01_dry_principle/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 02_kiss_principle/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 03_yagni_principle/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 04_separation_of_concerns/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 05_coupling_and_cohesion/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 06_code_smells/
β βββ README.md
β βββ examples.py
β βββ exercises.py
β βββ quiz.md
βββ 07_refactoring/
βββ README.md
βββ examples.py
βββ exercises.py
βββ quiz.md
Ready to start? Begin with 01_dry_principle!