Engineering Atlas › Low-Level Design

A study path for low-level design

11 min read · last reviewed 2026-10-17

Open in the interactive app: practice, quiz, mock interview →

In one minute

How it works

What you are actually learning

High-level design decides which services exist and how data flows between them; low-level design decides what happens inside one: which objects exist, who owns which state, what each interface promises, and how behaviour varies without a pile of if statements. Three sub-skills make up the whole:

Vocabulary (pattern names, the letters of SOLID) is the easy part; the path below gives each of these three skills something to practise on.

The learning path through this course

Each stage lists the lessons in this course that cover it.

  1. Foundations: objects and types. Classes and Objects, Enums, Interfaces, Encapsulation, Abstraction, Inheritance, Polymorphism. Goal: you can explain what an object is in memory, why fields are private, and how a call on an interface finds the right method.
  2. Relationships. Association, Aggregation, Composition, Dependency, Realization. Goal: for any two classes you can say who creates whom, who owns whom, and what breaks if one is deleted.
  3. Principles. DRY Principle, KISS Principle, YAGNI Principle, Law of Demeter, Coupling and Cohesion, then the SOLID set: Single Responsibility Principle, Open/Closed Principle, Liskov Substitution Principle, Interface Segregation Principle, Dependency Inversion Principle. Goal: you can name the principle a piece of code violates and propose the smallest fix.
  4. Communication with UML. Class Diagram, Use Case Diagram, Sequence Diagram, Activity Diagram, State Machine Diagram. Goal: sketch a design in under five minutes using only the notation a reviewer needs.
  5. Patterns. Creational: Singleton, Factory Method, Abstract Factory, Builder, Prototype. Structural: Adapter, Bridge, Composite, Decorator, Facade, Flyweight, Proxy. Behavioural: Strategy, Observer, State, Command, Template Method, Iterator, Chain of Responsibility, Mediator, Memento, Visitor, Null Object Pattern. Goal: for each one, the problem it solves, the simpler alternative, and when it is overkill.
  6. Design problems. Start with small, closed worlds (Design Tic Tac Toe, Design Snake and Ladder Game, Design LRU Cache, Design Bloom Filter), move to state machines (Design Vending Machine, Design Elevator System, Design Parking Lot), then time and concurrency (Design Rate Limiter, Design Task Scheduler, Design Logging Framework), and finish with money and contention (Design Splitwise, Design Movie Booking System).

The order is a prerequisite graph, not a strict line. Strategy needs Interfaces and Polymorphism; the Open/Closed Principle needs Strategy-like thinking; Design Vending Machine needs State and the State Machine Diagram. If a lesson feels like magic, walk back along its prerequisites rather than rereading it.

The practice loop for every topic

Reading gives recognition, which feels like understanding and is not. For each topic:

  1. Read once, slowly, and close it.
  2. Implement from memory the smallest version that shows the idea: a Strategy with two strategies, not a framework.
  3. Write tests first for the behaviour, then for the invariants. "A full parking lot rejects a car" is behaviour; "a spot is never assigned to two vehicles" is an invariant.
  4. Apply a change request. Add a new vehicle type, a new payment method, a second currency. Count the files you touched; that is the honest measure of your design.
  5. Port it to a second language. It shows which parts were the idea and which were the language: Go has no inheritance, TypeScript checks shapes rather than names.

Spacing and retrieval

Two findings from learning research matter here. Retrieving something from memory strengthens it more than re-reading it (the testing effect), and retrieval spread over growing gaps beats the same amount crammed together (the spacing effect). A practical schedule: after first learning a topic, review it 1, 3, 7, 14 and 30 days later. A review is not rereading; it is redoing a five-minute version of step 2 from a blank file, or answering the lesson's Check yourself questions without looking. If you fail a review, restart that topic's schedule from today. The practice task in this lesson builds exactly this scheduler.

Learning with an AI assistant

Use an assistant as a sparring partner, not an author. Ask it to play an interviewer who keeps changing requirements, to critique your diagram against a named principle, or to generate a design in which you find three problems before reading its own critique. Asking for "the design of a parking lot" and reading the answer only trains recognition. Agents tend to over-produce structure (an interface and a factory for everything), so reviewing generated designs is excellent practice for YAGNI and KISS.

The same shape elsewhere

Ordering topics by prerequisites is the ordering problem shape: a directed acyclic graph that must be walked so every node comes after its dependencies. Build systems order compile steps this way, package managers order installs, schema migration tools order migrations, and a task scheduler orders jobs. Recognising the shape means you reach for a topological sort, cycle detection and a tie-break rule, whatever the domain.

Down the stack

Layer 1The contract

"Knowing LLD" should be testable. A reasonable contract: given a two-paragraph requirement, within 45 minutes you produce a class diagram, the key call sequence, and working code for the core operations with tests for the invariants; when given a change request, you can predict which classes change before touching them, and be right. Each lesson's Practice and Mock interview are small instances of it.

Layer 2The mechanism

Experts do not store patterns as definitions; they store chunks: "a thing with modes that change behaviour" maps to State, "many listeners, one source" maps to Observer. Chunks form from many worked instances, not from one long chapter. Interleaving helps chunks form: mixing Strategy, State and Command problems in one session forces you to decide which applies, which blocked practice never asks. Each spaced review is a retrieval that strengthens a chunk; a failed review means the chunk never formed and needs a fresh worked example.

Layer 3The machine

Every design becomes memory and instructions, and "elegant" designs sometimes cost real performance. In CPython, an ordinary object carries a 16-byte header plus an attribute dict (classes with __slots__ drop the dict), so a million small objects can cost on the order of 100 MB. A Go struct has no header at all; wrapping it in an interface makes a two-word value (an itab pointer and a data pointer), and storing a non-pointer value in an interface usually forces a heap allocation. V8 gives objects that are constructed the same way a shared hidden class, so field access becomes a fixed offset; adding fields in different orders creates different hidden classes and slows property access. An interface call costs a few nanoseconds and usually blocks inlining, which matters only in hot loops; deep object graphs mean pointer chasing at about 100 ns per cache miss. The pattern lessons each end with these costs.

Why it's built this way

  1. Design skill is judgement under change, so the path ends in design problems with change requests, not in a catalogue.
  2. Judgement needs vocabulary, so principles and patterns come before problems.
  3. Patterns are combinations of interfaces, polymorphism and composition, so those come first.
  4. Memory for skills decays without retrieval, so the loop asks you to rebuild from a blank file on a spaced schedule.
  5. Designs run on machines and are maintained by teams, so every lesson ends in runtime cost and leadership concerns.

Diagram

flowchart LR
  A["OOP foundations"] --> B["Relationships"]
  A --> C["Principles and SOLID"]
  B --> D["UML diagrams"]
  C --> E["Design patterns"]
  B --> E
  D --> F["Design problems"]
  E --> F
  F --> L["Practice loop"]
  L --> R1["Implement from memory"]
  R1 --> R2["Test invariants"]
  R2 --> R3["Apply a change request"]
  R3 --> R4["Review in 1, 3, 7, 14 days"]
  R4 --> R1

Worked example

Priya has five hours a week and an interview loop in eight weeks: 40 hours. The full course (about 60 lessons, 45 minutes per concept and 2 hours per design problem) needs about 60, so she triages.

That is 31 hours. The 31 topics with three five-minute reviews each (1, 3 and 7 days) add 7.75 hours, for a total just under 40. The practice scheduler below produces her daily agenda: a typical day in week 3 shows two new topics and four reviews.

Trade-offs

ApproachStrengthsWeaknessesChoose when
Catalogue firstComplete vocabularyPatterns without problems are soon forgottenYou already design daily and want names
Problem firstMotivating; mirrors interviewsWeak fundamentals show as tangled designsInterviews soon, fundamentals solid
Layered path with spaced reviewDurable; each layer supports the nextSlower to feel productiveBuilding the skill for the long term
AI-generated designs to critiqueUnlimited, varied review materialEasy to slide into passive readingPractising judgement and code review

Pitfalls in production

Leadership lens

Check yourself

  1. Why does the path put Interfaces and Polymorphism before any design pattern?

    Show answer

    Most patterns are arrangements of interfaces, polymorphic dispatch and composition, so without those a pattern is a shape to copy rather than a mechanism you understand and can adapt.

  2. You reread the Observer lesson three times and still cannot write it from scratch. What should you change?

    Show answer

    Switch to retrieval: write the smallest Observer from a blank file, check it against the lesson, and retry a few days later; repeated failure calls for a new worked example, not another reading.

  3. Why does interleaving Strategy, State and Command problems help more than ten Strategy problems in a row?

    Show answer

    Mixed practice forces you to decide which pattern applies, which is the skill you need in real design and interviews; blocked practice skips that decision.

Watch

Free resources

Open in the interactive app: practice, quiz, mock interview →