Appearance
0.3 — Notation and Conventions
A reference page for the symbols, units and markup this Volume uses. Nothing here is introduced for the first time — every notation is also defined where it is first used, per the book's rule that no symbol appears before it is explained. This is the place to look it up afterwards.
1. Mathematical notation
Asymptotic notation (developed in Chapter 4.1):
| Symbol | Read as | Means |
|---|---|---|
| O(f(n)) | "big O of f" | Grows at most as fast as f — an upper bound |
| \Omega(f(n)) | "big omega" | Grows at least as fast — a lower bound |
| \Theta(f(n)) | "big theta" | Both — a tight bound |
| o(f(n)) | "little o" | Strictly slower than f |
Industry usage is looser than the definitions. People say "O(n \log n)" to mean a tight worst-case bound, where \Theta would be precise. This book follows the common usage and says so where the difference matters.
The growth ladder, best to worst: O(1), O(\log n), O(n), O(n \log n), O(n^2), O(n^3), O(2^n), O(n!).
Logarithms. \log_b x is the power b must be raised to in order to give x. In complexity, the base is omitted because changing it multiplies by a constant, which the notation discards — so \log n means "roughly how many times you can halve n". In information theory (Chapter 1.8) the base is 2 and matters.
Common operators:
| Symbol | Meaning |
|---|---|
| \sum_{i=1}^{n} x_i | Sum of x_1 through x_n |
| \prod | Product |
| \lfloor x \rfloor / \lceil x \rceil | Floor (round down) / ceiling (round up) |
| x \bmod m | Remainder after dividing by m |
| \lvert S \rvert | Size of a set, or absolute value |
| \in | Is a member of |
| \cup, \cap | Union, intersection |
| \approx | Approximately equal |
| \ll, \gg | Much less than, much greater than |
| \equiv | Equivalent, or congruent modulo something |
| \oplus | Exclusive or |
Probability and statistics (Chapters 12.2 and 12.3):
P(A) is the probability of A; P(A \mid B) is the probability of A given B; E[X] is the expected value; \mu and \sigma are mean and standard deviation.
Percentiles are written p50, p95, p99 — p99 means 99% of observations are at or below this value, and it is the number that matters in performance work (Chapter 14.5).
2. Units
Data sizes, and the distinction that causes confusion (Chapter 1.3):
| Decimal | Binary | ||
|---|---|---|---|
| kB | 10^3 | KiB | 2^{10} = 1,024 |
| MB | 10^6 | MiB | 2^{20} |
| GB | 10^9 | GiB | 2^{30} |
| TB | 10^{12} | TiB | 2^{40} |
Storage manufacturers use decimal; operating systems often report binary — which is why a "1 TB" disk shows as about 931 GiB. Neither is wrong; they are different units. This book writes GB for decimal and GiB where the binary meaning is intended.
A bit is b, a byte is B. Network speeds are in bits per second (Mbps), file sizes in bytes — so a 100 Mbps link transfers about 12.5 MB per second, before overhead.
Time: milliseconds (ms), microseconds (µs), nanoseconds (ns).
The latency numbers worth memorising, as orders of magnitude rather than exact figures (Chapters 1.6 and 10.12):
| Operation | Order of magnitude |
|---|---|
| CPU cache reference | ~1 ns |
| Main memory reference | ~100 ns |
| SSD random read | ~100 µs |
| Round trip within a data centre | ~0.5 ms |
| Disk seek (rotating) | ~10 ms |
| Round trip between continents | ~150 ms |
The ratios are the point: memory is roughly 100× faster than an SSD, and a cross-continent round trip is roughly a million times a memory access. Most architectural decisions in Volume I follow from that table.
3. Code conventions
TypeScript is the primary language throughout Volume I, with Python, SQL, Bash and others where the chapter's subject requires them.
Every snippet sits in a realistic scenario — an order, a checkout, an upload — never foo and bar.
Numbered markers unpack the code:
ts
const iv = randomBytes(12); // (1)
const cipher = createCipheriv('aes-256-gcm', key, iv);(1) The prose immediately below the snippet walks the numbered lines in order, saying what each does and why it is there.
Output is stated whenever behaviour matters — what it prints, what it throws, what it returns.
Highlighting. Fence line ranges (```js{4,7-9}) and inline // [!code highlight], // [!code error] and // [!code warning] markers mark the essential lines. ::: code-group shows before-and-after or two-language pairs.
Code blocks are always dark, in both site themes, in a monospace font with ligatures. This is set globally and never overridden per page.
4. Page markup
Marked keywords — ==like this== — flag the exact term an interviewer or a specification would use. Three to ten per page, single terms or short phrases, never inside code or headings. They are an association anchor, not emphasis.
Bold carries the sentence you should remember from a paragraph. Italic is light emphasis or a defined phrase.
RecallBox closes every teaching page: a compressed summary of the page's essential points, followed by self-test questions. Read the box after a gap and try to reconstruct the chapter from it (Chapter 0.2).
## What the interviewer will push on appears on chapters with real interview weight, immediately before the recall box. Each entry gives the question, what is actually being checked, the tell that separates an understood answer from a memorised one, and — at the end — one thing to volunteer that nobody asks for.
Cross-references are written as "Chapter 7.3.2" in plain text. Links are used where the target exists; a reference to material not yet written appears as plain text only.
Every chapter ends with a **Next:** line naming what the following chapter fixes that this one left open.
5. Diagrams
Every figure is inline SVG or Mermaid — self-contained, theme-aware, and version-controlled alongside the text. There are no hotlinked images anywhere in the book.
Every figure is introduced in the prose before it appears and explained after it, with a caption. No figure stands alone.
The colour vocabulary is consistent, and it is worth knowing when reading a diagram quickly:
| Colour | Conventional use |
|---|---|
| Blue | The main subject, the request path, the client |
| Green | A correct or successful path, the server, storage |
| Amber | A secondary system, a queue, a warning |
| Red | A failure, an attacker, the thing that goes wrong |
| Purple | A control plane, a coordinator, a derived result |
| Cyan | Supporting detail, a cache, a neutral component |
Flow is numbered ①②③ where sequence matters, and arrows are curved rather than right-angled so that motion reads as motion. Complex mechanisms are drawn as two to four small panels — before, during, after — rather than one overloaded figure.
6. Spelling and terminology
British spelling throughout the prose: behaviour, serialise, normalisation. Code and identifiers keep their real spelling — serializeUser, normalize(), Color — because those are the actual names.
Money is written in minor units in code (total_minor, pence or cents as an integer) and in ordinary notation in prose (£24.99). Chapter 9.7.29 explains why floating point is never used for money.
Times and dates are UTC and ISO 8601 — 2026-08-02T14:22:10Z — unless a chapter is specifically about local time.
Vendor names appear only where the chapter is about them. Elsewhere the book names what a thing does rather than who sells it, so that a page does not go stale when a product is renamed.
Every acronym is expanded on first use in a chapter, even if it was expanded in an earlier one, because chapters are read out of order.
7. What this book does not contain
No testing content. No unit-testing chapters, no describe/it/expect snippets, no testing sections inside pages. Design points that are genuinely about structure remain, because they teach design.
No preamble. A page opens on the material — a scenario, a problem, a snippet, or a plain definition — not on a description of what the page will cover.
No unexplained examples. Every illustration is understandable from what the book has already taught or from ordinary experience. If a tool, term or product is named, it is either explained in a sentence there or it is not used. No invented terminology.
No claim without a source or a label. Specific figures, dates and specification references are verified, or marked as illustrative.
Recall
- O is an upper bound, \Omega a lower bound, \Theta both — and industry usage says O where \Theta is meant. Growth ladder: 1 < \log n < n < n\log n < n^2 < 2^n < n!. Log base is omitted in complexity because it is a constant factor.
- kB is 10^3; KiB is 2^{10} — which is why a 1 TB disk shows as ~931 GiB.
bis a bit,Bis a byte, so 100 Mbps is about 12.5 MB/s. - The latency table is ratios, not figures: memory ~100 ns, SSD ~100 µs, data-centre round trip ~0.5 ms, cross-continent ~150 ms. Most architecture decisions follow from it. Percentiles are written p50/p95/p99.
- Code is TypeScript in a realistic scenario, with numbered
// (1)markers unpacked in prose below and the output stated. Dark blocks in both themes. - Marked keywords are the exact terms to know, three to ten per page. RecallBox plus self-test closes every teaching page;
## What the interviewer will push onappears where interview weight is real; every chapter ends with a**Next:**line. - Figures are inline SVG or Mermaid, introduced before and explained after, with a consistent colour vocabulary — blue subject, green success, amber secondary, red failure, purple control, cyan supporting — and ①②③ for sequence.
- British spelling in prose, real spelling in code. Money as integer minor units, times as UTC ISO 8601, acronyms expanded per chapter.
- The book contains no testing content, no preamble, no unexplained examples and no invented terms — and every specific claim is either verified or labelled illustrative.
Self-test: What does \Theta assert that O does not? · Why is the logarithm's base omitted in complexity? · How many GiB is a 1 TB disk, and why? · What are the two orders of magnitude between memory and an SSD? · What do the numbered markers in a snippet promise? · What does a red element in a figure conventionally mean?