Learning Resources
This module is populated from the local chunked books in library/raw/semester-03-software-design/books. Use this page as a source map, not as an instruction to read everything.
Source Stack
| Book | Role | How to use it in this module |
|---|---|---|
| Clean Code (Martin) | Primary / readability and craft | Default escalation for naming, functions, comments, and SRP at class scope; smells chapter is a catalog second opinion |
| Refactoring, 2nd ed. (Fowler) | Primary / smell catalog and moves | Canonical catalog for Cluster 4-5 smells and their refactorings; read only the chunks the concept pages point at |
| Head First Design Patterns (Freeman & Robson) | Primary / approachable OO principles | Best first pass on OCP, loose coupling, SRP, and the principle-behind-pattern framing |
| Good Code, Bad Code (Hansen) | Selective support | Pragmatic second opinion on classes, interfaces, comments, dependency injection, and "caring too much" |
| Object-Oriented Analysis, Design and Implementation (Dathan & Ramnath) | Selective support | Academic framing for cohesion, coupling, ISP, and LSP with clear contract-style examples |
| Design Patterns (GoF) | Reference | Read only the introduction chapters chunked here; the pattern catalog itself belongs to Modules 3-4 |
| SICP (Abelson & Sussman) | Background only | Use only for abstraction-barrier vocabulary when encapsulation is not clicking |
Resource Map by Cluster
Cluster 1: Cohesion, Coupling, and Encapsulation
| Need | Best local chunk | Why |
|---|---|---|
| cohesion as a class-scope property | Clean Code: Maintaining cohesion | Strongest "what does a cohesive class look like" passage |
| cohesion and coupling definitions side-by-side | OOAD: Cohesion and coupling | Cleanest academic framing; distinguishes kinds of coupling |
| loose coupling in practice | Head First: The Power of Loose Coupling | Best operational explanation with worked example |
| encapsulation at module scope | OOAD: Modular design and encapsulation | Solid framing of information hiding vs data hiding |
| encapsulating mutable state | Refactoring: Encapsulate Variable | Mechanical move that cements the concept |
| encapsulating collections | Refactoring: Encapsulate Collection | Directly fixes the most common leak |
Cluster 2: The SOLID Principles
| Need | Best local chunk | Why |
|---|---|---|
| SRP at class scope | Clean Code: Single Responsibility Principle | Best compact statement + cohesion bridge |
| SRP reframed as "one reason to change" | Head First: Single Responsibility Principle | Alternate explanation, good for second pass |
| OCP with worked example | Head First: The Open-Closed Principle | Shortest credible walkthrough |
| OCP from a design-for-change angle | Design Patterns: Designing for change | Canonical framing from the pattern vocabulary authors |
| LSP with a concrete violation | OOAD: Why a Pixel is not a SolidRectangle / LSP | Clearest non-Square example; contract-style |
| ISP in one module | OOAD: Interface Segregation Principle | Academic-but-short ISP statement |
| DIP from a testability angle | Good Code, Bad Code: Design with DI in mind | Pragmatic second opinion on mechanism vs principle |
| DIP at the systems level | Clean Code: Systems / Dependency Injection | Scales the principle beyond single classes |
Cluster 3: Naming, Functions, and Readability
| Need | Best local chunk | Why |
|---|---|---|
| meaningful names -- the rules | Clean Code: Meaningful Names introduction | Canonical list of naming rules with examples |
| naming -- pronounceability and scope | Clean Code: Use pronounceable names | Useful for reviewing one's own names out loud |
| naming -- adding meaningful context | Clean Code: Add meaningful context | Best for "is this name scope-appropriate?" |
| functions -- small, doing one thing | Clean Code: Functions -- Small, Blocks and Indenting | Starting point for the stepdown rule |
| functions -- top-down reading | Clean Code: Functions -- Do One Thing | Operationalizes "one thing, one level" |
| function decomposition as refactoring | Refactoring: Extract Function (Part 1) | Mechanics of the move, with code |
| comments -- when they lie | Clean Code: Comments do not make up for bad code | Best framing of comments as liability |
| comments as naming failures | Good Code, Bad Code: Comments are a poor substitute for names | Tightest "rename instead" argument |
Cluster 4: Code Smells -- Method and Class Level
| Need | Best local chunk | Why |
|---|---|---|
| long function / long parameter list | Refactoring: Long Function | Canonical catalog entry |
| feature envy and data clumps | Refactoring: Divergent Change to Feature Envy | Canonical definitions + moves |
| data clumps and primitive obsession | Refactoring: Data Clumps to Repeated Switches | Covers three smells in one chunk |
| Replace Primitive with Object | Refactoring: Replace Primitive with Object | Mechanics of the canonical fix |
| Replace Conditional with Polymorphism | Refactoring: Replace Conditional with Polymorphism (Part 1) | Mechanics + justification |
| Clean Code smell catalog (second opinion) | Clean Code: Chapter 17 -- Smells G12 to G18 | Uncle Bob's parallel catalog; useful for vocabulary |
Cluster 5: System-Level Smells and Design Judgment
| Need | Best local chunk | Why |
|---|---|---|
| divergent change and shotgun surgery | Refactoring: Divergent Change to Feature Envy | Canonical definitions side-by-side |
| moving scattered behavior home | Refactoring: Move Function (Part 1) | Mechanics of the shotgun-surgery fix |
| combining scattered functions | Refactoring: Combine Functions into Class | Home-finding move for scattered behavior |
| parallel hierarchies and collapse | Refactoring: Extract Superclass / Collapse Hierarchy | Mechanics for flattening parallel trees |
| YAGNI and refactoring | Refactoring: Architecture, YAGNI, and refactoring | Best local statement of the tradeoff |
| "when layers get too thin" | Good Code, Bad Code: When layers get too thin | Pragmatic check against speculative generality |
External Resources
All URLs below were validated against the live web before inclusion. Each is non-duplicative with the local chunks.
Canonical reference
- Martin Fowler: Code Smell (bliki) -- One-page definition and history of the term. Read once; return when teaching others.
- Martin Fowler: Yagni (bliki) -- Canonical essay on cost/benefit of speculative features and abstractions. Required for Concept 15.
- refactoring.guru: Code Smells catalog -- Fowler's catalog with diagrams; useful alternative presentation for the smell family map.
- refactoring.guru: Bloaters -- Visual summary for Cluster 4 Concept 12.
- refactoring.guru: Couplers -- Visual summary for Feature Envy and Inappropriate Intimacy.
Primary lectures
- cleancoders.com: Foundations of the SOLID principles (Uncle Bob, Ep. 8) -- Robert C. Martin's paid-but-often-free-preview episode on SOLID. The free preview already contains the key motivation; watch only the free portion for this module.
- cleancoders.com: SOLID Case Study (Uncle Bob, Ep. 14) -- Example-driven companion to Ep. 8. Useful after Cluster 2.
- Robert C. Martin: Solid Relevance (Clean Coder blog) -- Short written argument that the SOLID principles are unchanged by modern trends; good for "when not to" debates.
Practitioner essays
- Sandi Metz: Rules (Reinhardt.io reprint of POODR) -- Sandi Metz's four rules (100 lines/class, 5 lines/method, 4 parameters, 1 instance variable per view). Useful as heuristics, not laws; pair with Concept 15.
- Martin Fowler: Separated Interface (EAA Catalog) -- Crisp statement of why the interface often belongs with the client, reinforcing DIP.
Use Rules
- If you are stuck on cohesion/coupling vocabulary, go to OOAD Chapter 1 first; Clean Code Chapter 10 second.
- If you are stuck on a smell name or move, go to Fowler's Chapter 3 chunk for the smell and then the specific refactoring chunk -- do not try to read the book linearly.
- Open one chunk for one gap; do not read a whole chapter sequence by default.
- External URLs are for alternate exposition and for "is this principle still relevant?" arguments. They are not a second syllabus.
- If rereading is not fixing the problem, stop and write the design critique of a real file in your own words before reading more.