Articles
Posts
Daily lessons from shipping software — patterns, gotchas, refactors, and the tools that change how I work.
2026
June
- These are the tools I'm testing in my setupA hard reset was my excuse to stop installing on autopilot and try new tools — some replacing what I'd used for years. These are the tools that are now part of my setup: cmux, oh-my-zsh, starship, rtk and mise.
- Guardrails in LangChain: Blocking Prompt Injection Before the ModelPutting "NEVER ignore these rules" in the system prompt is security theater — the model obeys the attacker on the first clever sentence. The real defense is a bouncer that inspects the message before it reaches the AI. Let's build one, and watch LangChain v1 ship it for you as middleware.
- Finally Understand How LangChain WorksA raw LLM is brilliant and chaotic at the same time. LangChain is the missing structure around it — and you can understand the whole tool by building a barbershop that books and cancels haircuts through plain conversation.
- Compozy: The Orchestrator That Turns Spec-Driven Development Into Real CodeWhat Spec-Driven Development is and how Compozy makes it practical: an idea council, a PRD, task execution in a daemon, and review rounds. All in one real example, building a tic-tac-toe game in React, from the first prompt to the fixes.
2024
December
November
- Stop Blocking the UI on Slow Updates. Use useTransition.useTransition lets React mark a state update as non-urgent so it can be interrupted by something more important — typing in an input, clicking a button — instead of freezing the whole UI behind it.
- Stop Suppressing exhaustive-deps. Stale Closures Are Why You Should Listen.The react-hooks/exhaustive-deps rule isn't a style preference. It's the guardrail that prevents useEffect from running with stale values you forgot you closed over.
October
- Stop Wrapping Every Function in useCallback. It Only Helps in Two Cases.useCallback memoizes a function's reference, not its work. Most of the time that does nothing — except in two specific cases where reference identity actually matters.
- Two React Patterns Worth the Swap: Callback Refs and Object LookupsTwo small refactors that remove boilerplate without changing behavior — a callback ref instead of useRef + useEffect for measuring a DOM node, and an object lookup instead of a switch for conditional rendering.
- Stop Stacking isLoading. Use React SuspenseNested loading states, error flags, and conditional renders pile up fast. React Suspense moves that complexity out of your components and into the tree where it belongs.
- Stop Passing 12 Props. Use Component Composition Instead.Every React component starts simple. Then it grows. Here's the pattern that keeps complexity from compounding — without rewriting everything.