Skip to main content

Reference and Selective Reading

You do not need to read the source books front-to-back for this module. Use the concept pages and practice pages first. Open these local chunks only when you need alternate exposition, more worked examples, or the canonical move for a specific refactor.

Source Roles

SourceRoleWhy it is here
Clean Code (Martin)Primary teaching sourceBest arc for naming, functions, comments, classes, and the alternate smell catalog
Refactoring, 2nd ed. (Fowler)Primary teaching sourceCanonical smell catalog and refactoring moves; read the chunk that matches the move, not whole chapters
Head First Design Patterns (Freeman & Robson)Primary / approachable OO principlesBest first pass on OCP, loose coupling, and SRP with worked examples
Good Code, Bad Code (Hansen)Selective supportPragmatic second opinion on interfaces, DI, comments, and cross-class coupling
Object-Oriented Analysis, Design and Implementation (Dathan & Ramnath)Selective supportAcademic framing of cohesion, coupling, ISP, and LSP with contract-style reasoning
Design Patterns (GoF)Reference onlyIntroduction chapters for design-for-change vocabulary; pattern catalog is Modules 3-4
SICPBackground onlyUse only for abstraction-barrier vocabulary when encapsulation is not clicking

Read Only If Stuck

Cohesion, Coupling, and Encapsulation

The SOLID Principles

Naming, Functions, and Readability

Method- and Class-Level Smells

System-Level Smells and Design Judgment

Optional Deep Dive

Concept-to-Source Map

Concept pageBest source if stuckWhy this source
Cohesion: A class does one thing wellClean Code: Maintaining cohesionOperational description of how cohesion interacts with class count
Coupling: Minimize what a module needs to knowHead First: The Power of Loose CouplingWorked example that makes the kinds of coupling visible
Encapsulation and information hidingOOAD: Modular design and encapsulationClearest information-hiding framing
Single Responsibility PrincipleClean Code: SRPMost compact statement + bridge to cohesion
Open-Closed PrincipleHead First: OCPShortest credible walkthrough with code
Liskov SubstitutionOOAD: LSP and Pixel vs SolidRectangleStrong non-Square example with contract reasoning
Interface SegregationOOAD: ISPPrecise ISP statement in a small system context
Dependency InversionGood Code, Bad Code: Design with DI in mindPragmatic treatment that separates principle from mechanism
Names Reveal IntentClean Code: Meaningful Names -- introductionCanonical rules, most directly usable
Functions Should Do One ThingClean Code: Functions -- Do One ThingOperational statement + stepdown rule
Comments: when needed, when they lieClean Code: Comments do not make up for bad codeBest framing of comments as liability
Long Method, Large Class, Feature Envy, Data ClumpsRefactoring: Divergent Change to Feature EnvyCanonical catalog entries side-by-side
Primitive Obsession, Switch, Speculative GeneralityRefactoring: Data Clumps to Repeated SwitchesThree smells in one chunk with the move list
Shotgun Surgery, Divergent Change, Parallel HierarchiesRefactoring: Divergent Change to Feature EnvySide-by-side definitions; Fowler's original pair framing
YAGNI vs Premature AbstractionRefactoring: Architecture, YAGNI, and refactoringMost explicit local statement of the tradeoff