Kacam.net

Observe the world

Computer systems: one piece at a time

Not "memory management" or "networking", but "how far apart are a TLB miss and a page fault" and "how many round trips before the first byte" — one prompt drills one piece, until you can put a number on it.

These prompts only exist in 简体中文 for now.

How to use this

This set teaches rather than interrogates: it guides you instead of pressing until you have nothing left to say. When you're stuck it first asks which layer you're stuck at (never heard of it / know it but not why / know why but can't apply it), then decides what to give. Only after guiding you twice on the same point will it spell it out — and then it asks you to say it back in your own words.

It will keep pushing you for numbers: answer "there's some overhead" or "it's faster" and it cuts you off. A conclusion you can't put a number on is a memorised one — that's exactly what this set drills.

How to start

  1. Pick one, open it, copy the prompt.
  2. Paste it into a brand-new conversation, say nothing, and wait for its first question.
  3. Expect to be asked for orders of magnitude: how many nanoseconds, how many microseconds, how many times slower. Saying you don't know is fine — it notes it and moves on.

Four commands you can call out at any time

  • 跳过 move to the next scene now
  • 换个说法 explain this bit again from another angle
  • 直说吧 spell the answer out, then make me say it back
  • 复盘 jump to the wrap-up and print the review card

Three traps

  • Don't read the answer key at the end first — that "how people get it wrong" section is the answer to every question it will ask.
  • Don't reach for the jargon. Saying "that's a TLB miss" is easy; saying how much cheaper it is than a page fault is the part that counts.
  • When it starts praising you, point it back to the "don't praise me" rule. Guiding is not coddling.

Want a feel for the numbers? Start with random reads and the first-byte one. For production debugging: malloc, TCP stalls, context switches. Writing concurrent code: reordering and false sharing.

Memory

mmap 省掉的到底是哪一次拷贝
「mmap 是零拷贝所以更快」——省的是哪一次,代价换到哪去了?
★★★★☆ · about 30 min

Storage

一次 4KB 随机读,时间花在哪
说 SSD 快,快在哪一项上?快多少倍?
★★★☆☆ · about 30 min
write 返回了,断电之后数据还在吗
write 返回了,一秒后断电 —— 数据还在吗?
★★★★☆ · about 35 min

Networking

两端都没挂,数据为什么过不去
两端都没挂,数据就是过不去 —— 卡了 40 毫秒还是 200 毫秒?
★★★★☆ · about 35 min
These prompts are open source They live in the public kacam-net/hero-prompts repo. If one of them doesn't press hard enough, or its answer key is missing a line, go and change it — whether it ships here is a separate call, made by the catalogue on this side.