Software Design Principles
Evaluate and improve a codebase's structure using coupling, cohesion, SOLID and information hiding, and explain what each change makes cheaper.
4 objectives 6 steps about 125 min
Learn it step by step
Read the lessons in order, try the practice checks, then prove the skill with the knowledge check.
This skill page is a public outline. Its lessons and knowledge check appear here as subject-matter experts approve them.
Learning objectives
- Identify coupling and cohesion problems in a module and classify them by connascence type and strength.
- Apply SOLID principles to refactor a class design, stating which future change each refactoring makes cheaper.
- Judge when DRY, YAGNI or abstraction-first advice should be overridden, giving a concrete reason.
- Reduce coupling with the Law of Demeter, command-query separation, inversion of control and a functional core with an imperative shell, and explain what each makes easier to test or change.
Lesson plan
6 steps, about 125 min · 5 of 5 lessons available so far
- Why structure matters: paradigms, modules and the cost of change Concept · 20 min
- Measuring coupling with connascence Concept · 20 min
- SOLID, inversion of control and command-query separation Concept · 25 min
- Untangling an order service one refactoring at a time Worked example · 30 min
- When duplication beats the wrong abstraction Concept · 15 min
- Principles check: diagnose and justify Knowledge check · 8 questions
Practise it
Take a 300-800 line module from your own or an open-source codebase, list five coupling or cohesion issues with their connascence type, refactor two of them under passing tests (one by separating a pure functional core from its I/O shell), and write one paragraph per change on the future change it makes cheaper.
Build it from scratch
Practice builds that exercise this skill by re-creating a real technology.
- Build your own Web FrameworkIntermediate · 8–15 h
References
Hard prerequisites
None.
Unlocks
On these roadmaps
Progress and evidence for this skill are shared across all of them.