Chapter 21
Master reading list
Books — for LLD specifically
- Head First Design Patterns — Eric Freeman et al. The most accessible introduction to the GoF patterns; uses Java examples.
- Design Patterns: Elements of Reusable OO Software (GoF) — Gamma, Helm, Johnson, Vlissides. The original 1994 book. Still relevant; reference.
- Clean Code — Robert C. Martin. The "how to write good methods, classes, comments" book. Strong opinions; useful to know.
- Refactoring — Martin Fowler. Catalogue of refactorings (Extract Method, Replace Conditional with Polymorphism, etc.). Pairs naturally with design pattern study.
- Domain-Driven Design — Eric Evans. For when LLD scope grows: how to model complex domains, aggregates, bounded contexts.
- Effective Java — Joshua Bloch. Java-specific best practices: immutability, equals/hashCode, builder pattern, etc.
Online resources
- Refactoring Guru: Design Patterns — clean explanations with diagrams and code examples in multiple languages.
- java-design-patterns GitHub — every GoF pattern implemented in Java with examples.
- Martin Fowler's Patterns of Enterprise Application Architecture catalog
- LeetCode OOD Discuss — community-contributed LLD problems and solutions.
How to actually upgrade
- Try each of the 15 problems on a blank page before reading the walkthrough.
- Pick one pattern (Strategy, State, Observer) and implement it in code in your language of choice. Don't just read about it; write it.
- Read existing code that uses these patterns (Spring framework, Netty, even the Java standard library). See how production code applies them.
- Practice on actual problems from your day job. When you write a class, ask: which pattern (if any) applies? Why?
- Read other people's LLD designs and critique them — what would you do differently and why?