Frontend Labs
⋯

Practice labs (hands-on, in order of difficulty)

  1. Overflow bug hunt: write an 8-bit signed-integer simulator (Ch. 1) and find the exact input that wraps from 127 to -128.
  2. Percentile dashboard: given a CSV of latency samples, compute and plot p50/p95/p99 vs. the mean, and explain the gap (Ch. 9).
  3. Toy PageRank: build a 6-node link graph and compute the dominant eigenvector by hand and with numpy.linalg.eig (Ch. 11).
  4. Backprop by hand: extend the 2-layer worked example in Ch. 21 to 3 layers and verify your hand-derivative against PyTorch's autograd.
  5. Base-rate simulator: build the IDS false-positive simulation from Ch. 16 and plot precision as the base rate varies from 1-in-10 to 1-in-1,000,000.
  6. Toy RSA: implement full key generation, encryption, and decryption with 200-bit primes (using a primality-testing library), and time how long factoring n takes vs. key size.
  7. M/M/1 capacity planner: simulate a request queue at increasing utilization and reproduce the hyperbolic wait-time curve from Ch. 25.
  8. PID autoscaler: simulate a service under bursty load and tune a PID controller to scale replica count without oscillating (Ch. 29).

Generated from real-life-maths-guide.md · 8 Oct 2026 16:36