Posts tagged: practice
context.Canceled and context.DeadlineExceeded Are Not the Same Error
Most Go code treats ctx.Err() as a boolean. That loses information you almost always wanted later.
Code Review as Conversation, Not as Test
Most teams treat code review as finding flaws. Better reviews are collaborative exploration where both people learn something.
Why Puppeteer PDFs Are So Large (and How to Compress Them)
Puppeteer generated a 53MB PDF from a ten-page document. Here's why Puppeteer PDFs are so large and the one Ghostscript command that brings it to 300KB.
Your TypeScript Types Don't Exist at Runtime
TypeScript is a compile-time tool. The types are gone when the code runs. Where this bites you in production and how to close the gap at the boundaries that matter.
What Gets Logged and Why (and What You're Losing by Logging Everything)
High-volume logging makes it hard to find signal. Selective logging makes incidents easier to investigate.
Error Handling in TypeScript That Is Actually Usable
The catch (e: any) is a code smell that tells you the team gave up on typed errors. The alternatives, their tradeoffs, and the patterns that make error handling composable.
Faster Builds with esbuild
Most TypeScript projects still use tsc for everything. esbuild strips types and transpiles fast. Here's how to use both without sacrificing type safety.
The Subtle Bug That Lives in Your Retry Logic
Retry logic is everywhere. Most of it is wrong in the same way: retrying when it shouldn't, or not retrying when it should.
Schema Migrations Without Downtime (and Why You Should Practice Now)
Most teams avoid schema migrations until they're forced to do one at 3am. Better to practice when stakes are low.
