Learning Roadmap
A suggested order for all 37 patterns — from first principles to expert-level. Follow the stages or jump to whatever interests you.
Start Here
Simple patterns with immediate real-world value. Master these first.
Singleton
Ensure a class has only one instance, and provide a global point of access to it.
Factory
Define an interface for creating objects, but let subclasses decide which class to instantiate.
Adapter Pattern
Convert incompatible interfaces into compatible ones
Facade
Provide a simplified interface to a complex subsystem of classes.
Iterator
Provide a way to access the elements of an object sequentially without exposing its underlying representation
Observer
Define a one-to-many dependency where when one object changes state, all its dependents are notified automatically
Strategy
Define a family of algorithms, encapsulate each one, and make them interchangeable
Template Method
Define the skeleton of an algorithm in a base class, deferring some steps to subclasses
RAG
Ground LLM responses in real data by retrieving relevant documents before generating an answer.
Chain of Thought
Break down complex problems into step-by-step reasoning to improve answer quality.
Model Registry
A versioned catalog of trained ML models with metadata, lineage, and stage transitions from staging to production.
Data Versioning
Track datasets like code with immutable versions so any model run can be reproduced months later.
Level Up
Patterns that require understanding object relationships and trade-offs.
Builder Pattern
Separate construction from representation
Prototype Pattern
Create objects by cloning an existing prototype
Composite Pattern
Compose objects into tree structures to represent hierarchies
Decorator Pattern
Add responsibilities to objects dynamically
Proxy Pattern
Control access to another object through a surrogate
Chain of Responsibility
Pass a request along a chain of handlers. Each handler decides either to process the request or pass it along the chain
Command
Encapsulate a request as an object, allowing you to parameterize clients with different requests, queue them, and log them
Mediator
Define an object that encapsulates how a set of objects interact
Memento
Capture and externalize an object's internal state without violating encapsulation, allowing it to be restored later
State
Allow an object to alter its behavior when its internal state changes
ReAct
Combine reasoning and action: think through steps and execute tools to solve tasks.
Tool Use
Enable LLMs to call functions and external tools to expand their capabilities.
Reflection
Generate, critique, and refine outputs iteratively to improve quality.
Memory
Maintain context across interactions using short-term and long-term memory systems.
Guardrails
Validate inputs and outputs to ensure safety, quality, and compliance.
Feature Store
Centralize feature computation, storage, and serving so training and inference always use the exact same data.
Training Pipeline
Automated, reproducible workflows that ingest data, train models, evaluate them, and register successful runs.
Serving Pipeline
Deploy ML models behind a scalable, low-latency API that handles feature lookup, prediction, and response transformation.
Model Monitoring
Continuously track model performance, input distributions, and prediction drift to catch silent failures in production.
Go Deep
Complex patterns for large systems, experienced engineers, and senior interviews.
Abstract Factory Pattern
Create families of related objects without specifying concrete classes
Bridge Pattern
Decouple abstraction from implementation so they can vary independently
Flyweight Pattern
Share fine-grained objects efficiently to reduce memory usage
Visitor
Represent an operation to be performed on elements of an object structure. Visitor lets you define a new operation without changing the classes of the elements on which it operates
Multi-Agent
Coordinate multiple specialized agents working together to solve complex problems.
A/B Testing
Safely roll out new models by routing a fraction of traffic to the candidate and comparing business metrics against the control.