Free to LearnErasure coding studio

Keep data alive when drives die

Hard drives die, and some quietly damage what they hold. Five quick experiments show how storage systems rebuild lost data. Each time, predict first, then run the real repair math and compare.

Part 1 of 5

Copies vs Check Slices

Your prediction

Your predictions (0)

    Three Ways In · Layer 3 of 3 · Node.js 22+ · Zero Dependencies

    Build With Your Coding Agent — 5 Rungs + Planted Traps

    Build a fault-tolerant erasure-coded block store with your coding agent across five rungs: framed XOR stripes, GF(256) byte arithmetic, Cauchy/Vandermonde parity matrices, matrix-inversion shard reconstruction, and CRC-verified bit-rot scrubbing. Each rung gives you an architect prompt for Claude Code, Codex, or Cursor, a planted bug that unguided agents write, and a deterministic test suite that catches it.

    1. Framed XOR stripe: Fixed-size data shards + single parity shard preserving exact file byte length — Planted trap: Trimming trailing zero bytes on decode instead of framing original byte length.
    2. GF(256) byte math: Carry-free Galois Field addition, log/exp multiplication, and inverses — Planted trap: Wrapping log exponents mod 256 instead of mod 255, corrupting products that cross 255.
    3. Cauchy parity rows: Encoding matrix where every k-row subset is invertible — Planted trap: Building parity rows that become linearly dependent for specific two-drive losses.
    4. Any-k reconstruction: Gauss-Jordan inversion rebuilding missing data from any k surviving shards — Planted trap: Skipping row pivot swaps when a diagonal entry hits zero during elimination.
    5. Silent bit-rot scrub: Per-shard CRC32 sealing and corrupt-shard quarantine before decode — Planted trap: Decoding from the first k shards without verifying checksums, folding silent corruption into output.
    unzip agent-track.zip && cd erasure-coding-lab/agent-track
    node --test test/*.test.mjs
    mkdir -p src/mine
    EC_CANDIDATE=src/mine node --test test/rung-01.test.mjs

    Download 5-Rung Agent Track (agent-track.zip) Read AGENT-TRACK.md on GitHub Open agent-track/README.md on GitHub

    Run the course tests on your own computer
    git clone https://github.com/itsHabib/free-to-learn.git
    cd free-to-learn
    git switch --detach 7dba0d743224c10a707307769782b0db3f9a2a1a
    cd courses/erasure-coding-lab
    node --test tests/erasure.test.mjs

    Browse the pinned source on GitHub · Reuse terms