AlgoViz

Talking and drawing

easy 30 min

A good design that nobody can follow scores like a weak one.

Video lesson · Chapter 1 of 5

Build the reservation path

0:00 / 3:40

Messy drawing, clear drawing

1:15Reel coming soon

Theory

Read or listen first. About 1 min.

What it is

A design lives in someone else's head only if they can follow it. Drawing shows the parts and how they connect. Talking carries the listener through them in order.

Both follow simple conventions that anyone can learn.

Why it exists

Interviewers score what they understood. A good idea in a tangled drawing is hard to credit.

Clear pictures also help you. Gaps in the design show up as gaps on the board.

A short history

  1. 1921

    Frank and Lillian Gilbreth present process charts, ancestors of the flow chart.

  2. 1976

    Peter Chen introduces the entity-relationship diagram for data.

  3. 1997

    The Unified Modeling Language becomes a standard.

  4. 2000s

    Simon Brown develops the C4 model: context, containers, components and code.

Words to know

Boundary
A line around what belongs together.
Legend
A key to the symbols.
Synchronous
The sender waits; solid arrow.
Asynchronous
The sender does not wait; dashed arrow.
Narration
Saying what happens as you draw.

How it works

Step through the idea, or press Play.

Step 1 of 3

Draw. Left to right, one box per system, verbs on arrows

Understand it

Start here

Giving a visitor directions

A visitor needs the museum. You know the town, but knowing it is not enough. What you say and draw has to work in their head.

The sketched map
Where isthe museum?A question

Draw

Seven rules for a readable diagram

  1. 1

    Left to right

    Users on the left, stored data on the right. People read it like a sentence.

  2. 2

    One box per system

    A box is something you could switch off. Two copies of a service are one box marked "x 3".

  3. 3

    A dashed outline around what you run

    Users and other companies stay outside it.

  4. 4

    Verbs on arrows

    "books a seat", not "HTTP". The arrow points at whoever is asked.

  5. 5

    Dashed means later

    Solid arrows are waited for. Dashed ones happen in their own time.

  6. 6

    Mark the source of truth

    One word beside the store that wins when copies disagree.

  7. 7

    Leave room

    Use the middle third first. New parts need somewhere to go.

Messy: what does it do?

A messy drawing: users, two boxes called Service and Service 2, and three identical database icons called DB, DB 2 and Storage, joined by unlabelled grey lines that cross. There is no boundary.
Vague names, the cache and the queue drawn as databases, lines without direction or verbs, and no edge between ours and theirs. Try to say what a booking does here.

Clear: the same system

A clear drawing: readers book a seat with the booking service, which reads the map from the seat map cache, saves the booking in the bookings database marked source of truth, and adds an email to the email queue on a dashed arrow. An email worker takes it and sends it to an email provider outside the dashed outline of our system.
Solid arrows are waited for, dashed ones happen later. The dashed outline is everything we run.

Notation

Eight symbols are enough

DrawMeansExample
Stick person or circleSomeone outsideReader, driver
RectangleA service we runBooking service x 3
CylinderStored dataBookings database, source of truth
Rectangle with a clock or "2 s"A cache, and how old it may beSeat map, 2 s
Row of small squaresA queue or logEmail queue
Solid arrow with a verbAsks and waitssaves booking
Dashed arrow with a verbHappens lateradds email
Dashed outlineEdge of our systemEmail provider is outside
Put a two-line legend in a corner: solid is now, dashed is later. Say it once.

The same notation in Mermaid

Arrow labels that help

  • "claims driver"
  • "reads map"
  • "adds click event"
  • "refreshes every 2 s"

Arrow labels that do not

  • "data"
  • "HTTP"
  • "uses"
  • No label and two heads

Order

What to draw first

Build the picture in this order

Do not draw in silence for three minutes. Say the next box before you draw it: "Next I need somewhere to keep bookings." They can stop you early, and you get thinking time while your hand moves.

Narrate

Follow one request

Choose one real person doing one thing. Point at each box. Give each one a sentence with the same shape: who asks, what happens, what changes.

How long it takes

6 boxes×10 s=60 s6\ \text{boxes} \times 10\ \text{s} = 60\ \text{s}
One sentence is about ten seconds. If a walk takes four minutes you are explaining boxes, not following a request.

Worked example: booking a seat, word for word

  1. You

    Let me follow one booking. Maya wants seat 12 at ten o'clock.

    • Maya's phone asks the booking service for the map.
    • The service reads it from the cache. It may be two seconds old.
    • Maya taps seat 12. The service saves the booking in the database.
    • The database has a unique rule on seat and slot, so if someone was faster it refuses.
    • It worked, so the service adds an email to the queue and answers Maya straight away.
    • Later the worker sends the email. That arrow is dashed because nobody waits for it.
  2. You

    That is the main path. Is anything unclear before I look at what breaks at nine?

  3. Interviewer

    What if the email queue is down?

  4. You

    Good, the dashed arrow. The booking stays valid. We keep the email to send in the same database and pass it on when the queue is back.

The same walk as a sequence

Boxes show what exists. A sequence shows what happens. Use a sequence when order matters.

Second example, the bus tracker, in five sentences. "Bus 14 reports where it is every ten seconds. The bus service checks that the report really came from bus 14 and keeps only the latest position. A parent's app asks for the bus. The service checks that this parent has a child on bus 14, and only then answers. The trip is stored later, on this dashed arrow, for the school's records."

Think aloud

Talking without rambling

  1. 1

    Answer first

    "I would use a queue." Then the reason.

  2. 2

    One reason, one number

    "Sending takes three seconds and the reader does not need it."

  3. 3

    Stop

    About thirty seconds is enough for most answers.

  4. 4

    Check

    "Shall I go into retries, or move on?"

Say your thinking, not your noise

Instead ofSay
"Um, so, maybe, I guess...""Two options come to mind. Give me a moment."
A long silence"I am checking what happens if two people do this at once."
"And also, and also...""The main point is X. I can say more."
"Obviously"Leave it out
"Does that make sense?" every minute"Where would you like more detail?"

Disagree

When you see it differently

Disagree without a fight

Recipe sharing: search

  1. Interviewer

    I would put all recipes in a search engine from day one.

  2. You

    That would give good ingredient search straight away. My worry is a second copy to keep in step while we have 50,000 recipes. The database's own text search can serve that, and I would move when ranking or size asks for it.

  3. Interviewer

    I still prefer the search engine.

  4. You

    Then let us draw it that way: the database stays the source of truth, and the index is a copy filled on this dashed arrow. A load test with real recipes would tell us which of us is right.

Remote

On a shared screen

  • Before

    Open the tool. Practise a box, an arrow with a label and a dashed line until your hands know them.

  • Layout

    Requirements in the top left, numbers under them, design in the middle, a to-do list on the right.

  • Show where you are

    Move the cursor to the box you are naming. Zoom out between phases.

  • Type, do not draw letters

    Short names, large text. Copy and paste a box instead of drawing it again.

  • Pause more

    Sound is delayed and they cannot wave. Stop after each box for a breath.

  • Plan B

    If the board fails, draw in a shared text page: [Reader] -> books -> [Service] -> saves -> (DB).

Change it

Editing in front of them

  1. 1

    Say the break

    "At nine, map reads overload the database."

  2. 2

    Add one thing

    Draw the cache and its verb. Leave the rest alone.

  3. 3

    Mark what changed

    A colour or a star for the new part.

  4. 4

    Walk only the new part

    "Reads stop here now. Writes are the same."

Summary

The whole topic in one minute.

Draw left to right, one box per system, a verb on each arrow, dashed for what nobody waits for.

Follow one request out loud, then pause so the other person can speak.

  • Left to right, one box per system, a boundary, verbs on arrows.
  • Solid is now, dashed is later, and one store is the source of truth.
  • Follow one request with a sentence for each box.
  • Answer first, one reason, stop, check.
  • State their point fairly before you disagree.

Sources