INTERACTIVE DESIGN PATTERN LESSONS

Don’t just know
the pattern.
See why it works.

Small problems. Moving parts. Real understanding.
Explore design patterns through interactive visuals and TypeScript and Kotlin examples.

Built around the “oh, that’s why.”
A LITTLE LOOK INSIDE · OBSERVER

New display? Change the weather station.

Weather station 18 °C

Direct calls to named displays

Phone18 °CHistory18 °CAlerts18 °C
One reading → each display
Add a display → edit the station
CONNECT THE DOTS
function publish(reading: number) {
  phone.update(reading)
  history.update(reading)
  alerts.update(reading)
}

The station calls each display by name. Adding or removing a display means changing the station’s code.

Illustrative snippets · not a complete lesson
UNDERSTAND IT. SEE IT. TRY IT.Interactive diagrams TypeScript + Kotlin examples Guided practice

LESS MEMORIZING. MORE MAKING SENSE.

An idea you can follow.

Explore the structure, understand the problem, and apply the pattern yourself.

01

Understand the problem.

Start with a working example. Add a requirement and see why the original design becomes harder to change.

02

See how it works.

Explore interactive diagrams and follow the calls between objects. See what changes, what stays stable, and why.

03

Put it into practice.

Connect the explanation to TypeScript or Kotlin examples. Apply the pattern to a different scenario with guided challenges and feedback.

Already familiar? Jump straight to practice or revisit the quick reference.

THE PATTERN CATALOG

A small problem.
A good place to start.

You don’t need to learn them all at once. Pick the kind of problem you’re working on, then explore one pattern.

BEHAVIORAL PATTERNS

Give objects clear responsibilities and flexible ways to communicate.

4 behavioral lessons available

Command

One request. Execute now, revisit later?

Package a request as an object so controls and receivers can evolve independently.

Try it with an undoable text editor

State

Same command. Different state. What happens?

Let an object’s current state decide how it responds to commands.

Try it with an order lifecycle

Strategy

Same job. A different way to do it?

Swap the algorithm without rewriting the code that uses it.

Try it with a sorting tool

Observer

One change. Who needs to know?

Let listeners join, react, and leave without rewriting the publisher.

Try it with a weather station