Spaced repetition

Remember by reconstructing, not rereading.

These review cards turn parser knowledge into recall. Use them before study, after labs, and during weekly maintenance.

Review Schedule

If recall fails, reread only the smallest missing source and immediately answer again without looking.

Before study

Attempt the retrieval prompt. Mark any blank answer as the only thing allowed into the next reading block.

Same day

Rebuild the smallest parser slice without looking. Then compare against your code.

24 hours

Explain the invariant and rewrite one malformed-input test from memory.

3 days

Interleave: answer one Rust, one packet, one market-data, and one performance prompt.

7 days

Redo the lab with a different tiny fixture and record what failed first.

Retrieval Cards

Answer out loud or in a scratch file. No notes until after first attempt.

Rust memory model

  1. 1Why does a parser over &[u8] often return borrowed data instead of String?
  2. 2Where should ownership change from borrowed packet bytes to owned output?
  3. 3What error type would you return for short input, invalid UTF-8, and invalid decimal?

Packet parsing

  1. 1What does PCAP incl_len describe, and why must it be checked?
  2. 2Which IPv4 field tells you where the UDP header starts?
  3. 3Why is network byte order relevant for ports and lengths?

Streaming reorder

  1. 1What heap ordering do you need for timestamp reordering?
  2. 2What makes an event safe to emit?
  3. 3Why is full-file sorting the wrong mental model?

Market data

  1. 1What is a quote, and which fields identify bid versus ask?
  2. 2Why should price avoid f64?
  3. 3Which fields are transport metadata rather than market semantics?

Performance

  1. 1What metric matters for this parser: latency, throughput, allocation count, or all three?
  2. 2What would a flamegraph prove that a benchmark alone does not?
  3. 3What optimization should wait until after correctness?