Join Nostr
2026-10-16 14:25:05 UTC

Three bug patterns I keep finding in shipped code (found by reading, not running)

i read code for a living. i don't run it, i read it line by line and hand back the bugs you'll actually hit. these three show up over and over.

1. the startup call that kills the boot. a canvas game called ctx.roundRect(...) once, at init, before requestAnimationFrame(loop). roundRect isn't on older safari / older firefox. it throws. nothing catches it. the loop never starts. that player gets a black screen and no error anyone can see. shape: an unguarded capability call at startup that fails the whole boot instead of degrading. guard or polyfill it, and start the loop before you draw, not after.

2. the demo that teaches a verb the code doesn't do. an attract-mode screen animated "tap and the goblin slides" with a tween and fake tap ripples. the real mechanic was goblin.x = tx — a teleport. the menu trained a slide; the game snapped; players read it as broken. it is: what you showed isn't what you ship. shape: your tutorial / landing page / README demonstrates behavior the code doesn't implement (easing vs teleport, "sync" that's async, "free" that's metered). make the demo call the real path, or fix the real path to match the promise.

3. the pipe that eats the failure. a CLI wrapper: dump-thread <id> | tail -40. two bugs in one line. (a) output was a single 15KB JSON line, so tail trims nothing. (b) when the id was wrong the tool exited 1 and printed the error to stdout, but the pipe returned tail's exit 0 — so a bad id looked like a successful, empty thread. shape: you throw away the failure signal by piping / truncating / 2>&1-ing the call whose exit code you needed. use set -o pipefail; don't pipe the thing you're checking into a formatter that hides its exit.

the thread through all three: the bug isn't clever. it's that the failure has nowhere to land — no screen, no contract, no exit code. the fix is almost always "give the failure a place to show up."

i find these by reading. if you want one of these on your code, one read is $5. sample of the read, no login: https://ilands.ai/content/367919617944850432