A shoelace knot hit #1 on HN. It's a lesson in idempotent state.

4 min read 1 source biomimicry_analogy
├── "Normalized failure modes are the real bug — we stop seeing problems we've accepted as routine"
│  ├── top10.dev editorial (top10.dev) → read below

The editorial frames the viral appeal of Fieggen's page as a recognition moment: developers realizing they'd accepted a daily failure (re-tying laces six times a day) as normal rather than questioning the underlying mechanism. The 'failure mode was so normalized I stopped seeing it' reaction is presented as the actual story, more important than the knot itself.

│  └── @Top HN commenter (Hacker News) → view

Admitted to re-tying their laces six times a day for thirty years without ever considering that the problem might be the knot itself rather than the laces. This resonated because it mirrors how engineers treat recurring bugs as environmental noise instead of investigating the root cause.

├── "Physical knots are a useful analogy for silently degrading state machines in software"
│  └── top10.dev editorial (top10.dev) → read below

Argues that Fieggen's analysis of the Granny Knot — accumulated asymmetric rotational force eventually exceeding friction — maps directly onto backend bugs where small biases compound over thousands of operations before catastrophic failure. The knot doesn't fail at step 1 or 100 but at step 3,247, mirroring state machines that drift undetected until a threshold is crossed.

└── "A small structural change (wrap twice instead of once) fixes the underlying instability without changing the interface"
  └── Ian Fieggen (fieggen.com) → read

Fieggen's core claim, maintained on his site since 2003, is that the standard bow knot is structurally unstable because its two halves twist in opposite directions under lateral force. His fix — wrapping the loop twice rather than once — preserves the single-pull release behavior while eliminating the rotational accumulation that causes spontaneous untying.

What happened

On a Tuesday morning in June, a static HTML page about tying shoelaces — last meaningfully updated when Bush was still in office — climbed to 348 points on Hacker News. The page belongs to Ian Fieggen, a Melbourne-based illustrator who has been running fieggen.com/shoelace since 2003. The submission was titled, simply, "Ian's Secure Shoelace Knot."

The content is exactly what it says. Fieggen describes the standard bow knot most adults tie — what he calls the "Granny Knot" variant — as inherently unstable. The loop-around-and-pull motion produces a knot whose two halves twist in opposite directions, which under repeated lateral force (walking, running, your kid kicking a soccer ball) progressively works itself loose. His fix: when you wrap the loop, wrap it twice instead of once. The knot still unties with a single pull on the free end. It just doesn't come undone on its own.

The HN thread, predictably, was less about shoes and more about why a 23-year-old page about textile topology was suddenly the most-upvoted thing on the front page. The top comment was a developer admitting they'd been re-tying their laces six times a day for thirty years and had never once considered that the problem might be the knot, not the laces. That sentiment — "the failure mode was so normalized I stopped seeing it" — is the actual story.

Why it matters

Fieggen's knot is a near-perfect physical analogy for a class of bugs every backend engineer has shipped at least once: the silently degrading state machine.

Consider what's actually happening in a standard bow. You have two loops held in equilibrium by friction. Each footstep introduces a small asymmetric force. In a Granny variant, those forces don't cancel — they accumulate in one rotational direction. The knot doesn't fail at step 1, or step 100. It fails at step 3,247, when the accumulated rotation finally exceeds the friction holding the bight in place. From the wearer's perspective, the knot "randomly" came undone. From a physics perspective, it was always coming undone; the only question was when.

This is exactly the failure profile of a distributed system that lacks idempotency. Every retry, every duplicate webhook, every at-least-once message delivery introduces a small asymmetric force on your state. If your handlers are commutative and idempotent — if the forces cancel — the system stays in equilibrium forever. If they aren't, you don't notice on day one. You notice at 3am six months in, when a counter is off by 47 or a payment got processed twice, and you spend a week trying to reproduce something that was deterministic the entire time.

The fix Fieggen proposes is structurally identical to the fix for non-idempotent handlers: add a second wrap. A single wrap creates a knot that's stable under static load and unstable under cyclic load. A double wrap creates a knot that's stable under both. The cost is one extra motion at tie-time. The benefit is you never re-tie. The asymmetry between the cost of doing it right once and the cost of doing it wrong forever is the entire argument for engineering rigor.

There's a deeper parallel worth naming. The standard bow knot is what evolution would call a local optimum. It works. It's been taught for centuries. It survives because it's good enough that the failure mode looks like user error ("my laces came untied") rather than design error ("this knot is wrong"). Most production bugs live in exactly this niche: good-enough behavior that externalizes its failures onto users, who blame themselves or shrug and retry. The cultural work of moving from "laces come untied sometimes, that's life" to "the knot is wrong, here's the fix" is the same cultural work as moving from "distributed systems are hard" to "your handler isn't idempotent, here's the fix."

What this means for your stack

Three concrete takeaways, and none of them are about shoes.

First: audit your at-least-once handlers for accumulating state. Anywhere you have a retry loop, a message queue, or a webhook receiver, ask the Fieggen question: if this fires twice, do the forces cancel or accumulate? Counters, balances, append-only logs that don't dedupe by event ID, email-sending code without a sent-marker — these are Granny knots. They work until they don't. The fix is almost always a unique key on `(handler_name, event_id)` with `ON CONFLICT DO NOTHING`, or a Lamport-style version check before the write. One extra wrap.

Second: be suspicious of failure modes you've normalized. Every engineering org has a class of incidents that have been re-categorized as "just how it works." Cron jobs that need manual restart on Mondays. A deploy step that fails 1 in 20 times and everyone retries without thinking. The bow knot of your codebase. The Fieggen page going viral is a reminder that the highest-leverage debugging is often not in the gnarly edge case but in the boring, daily failure you've stopped logging.

Third: distrust elegance that depends on friction. A lot of code holds together the way a single bow holds together — through accumulated convention, not structural guarantee. "We don't double-process because the queue is usually fast enough." "We don't lock because contention is rare." These are friction arguments. They're true until vibration exceeds friction, and then they're catastrophically false. Replace friction with topology wherever you can afford to.

Looking ahead

The fact that a static page from 2003 can still top Hacker News in 2026 is its own signal. The half-life of a genuinely correct mental model is much longer than the half-life of any framework, language, or platform you're currently learning. Fieggen's page will still be right in 2046. Your current ORM probably won't. Optimize accordingly — and double-wrap the loop.

Hacker News 558 pts 210 comments

Ian's Secure Shoelace Knot

→ read on Hacker News

// share this

// get daily digest

Top 10 dev stories every morning at 8am UTC. AI-curated. Retro terminal HTML email.