How to Approach a Design
Someone says "design a link shortener" and the blank whiteboard stares back. Beginners start drawing boxes. Experienced designers start asking questions, because the right boxes depend on answers you do not have yet.
The rule
Ask, count, sketch, deepen, weigh — never boxes first.
Five steps, always in this order:
- Ask — pin down requirements. Functional: what must it do? (Create a short link, redirect a click, maybe show click counts.) Non-functional: how well? (How many users, how fast, how available, how long do links live?)
- Count — a back-of-the-envelope estimate of load and storage. Rough is fine; you want the order of magnitude.
- Sketch — a high-level design that meets the functional needs: the main boxes and arrows.
- Deepen — pick the parts the numbers say are risky and design them in detail.
- Weigh — say what each choice costs. Every design gives something up.
A handy number for step 2: a month has about 2.5 million seconds (30 × 24 × 3,600 = 2,592,000).
The shortcut
Turn every requirement into a number per second, then look at the ratio of reads to writes. The ratio tells you which path deserves the attention.
Ask
Hop expects 100 million new links a month. Each link is clicked about 100 times.
The trap is skipping Ask. "Design a shortener" could mean a hobby tool or a global service; the same boxes cannot serve both. Two minutes of questions saves an hour of designing the wrong thing.
Drills
Answer fast — trust the rule.
What is the first step when asked to design a system?
Which of these is a non-functional requirement for Hop?
About how many writes per second is 25 million new links per month?
Hop serves 4,000 reads and 40 writes per second. Where should design effort go first?
Remember
- Ask, count, sketch, deepen, weigh — never boxes first.
- Shortcut: turn requirements into per-second numbers; a month is about 2.5 million seconds.
- Trap: designing before you know whether it is a hobby tool or a global service.
