All posts
Layers in a React App
Split a React payment screen into view, model, and data, following Juntao Qiu. Running the example repo shows a useMemo bypass and a fetch loop.
Decision Models, Jev and Kev
Jev returns probabilities instead of text. Its confidence is arithmetic, not learned, and calibration belongs to the distribution, not the model.
overlay-kit
Swapping a global isOpen flag for one await: what I gained, what I lost, and how overlay-kit's events, reducer, and openAsync core really work.
LLM Calibration and Overconfidence
Calibration is knowing how often you'll be right. How ECE measures the gap, GPT-4's ECE going 0.007 to 0.074 after post-training, and what's known of why.
Shared Language
What to do when a product manager and a developer use the same word differently: ubiquitous language from Evans and grounding theory from Clark.
Harness (Systems) Engineering
After prompts gave way to context engineering, what comes next? Anthropic engineering points to harness design, evals, and containment.
Kalyx
Why I built Kalyx, a headless React DatePicker, and how it differs from Ark UI, React Aria and react-day-picker: UTC ISO values, Intl DST, timezone tests.
How to Save AI Tokens
Measure AI coding token costs with a React POC and cut them using prompt caching, subagents, lean MCP, context engineering, and Cursor Composer.
How Tokens Work
How BPE creates tokens, embeddings feed LLMs, prefill and decode shape pricing, and KV cache and prompt caching reduce repeated-input costs.
Context Files
How agents load CLAUDE.md, AGENTS.md, SKILL.md, and Cursor rules, why instructions get lost, and what an ETH Zurich study says to put in context files.
Four Tiers of Code Intelligence
Four tiers of tools that cut an AI agent's code search cost: context packing like Repomix, tree-sitter repo maps, CodeGraph's graph, and LSP-based Serena.
MCP and Function Calling
How MCP differs from function calling: six primitives, stdio and Streamable HTTP, the tools/list to tool_use loop flow, and risks like Tool Poisoning.
State Management
A framework for frontend state management across seven categories (local, global, server, form, URL, external, guards) with React modeling criteria.
Domain Models
Where frontend domain logic should live, with an income tax example: pure functions, anemic models, API mappers, ViewModels, and where to stop.
Domain Terms
How domains, domain models, domain objects, and domain object models differ, using Eric Evans' and Martin Fowler's definitions and an income tax example.
Reflections on Refactoring the Second Toss Frontend Fundamentals Mock Exam
Refactoring the meeting room reservation app from the second Toss Frontend Fundamentals mock exam: component decomposition and domain logic extraction.
The AI Frontend Engineer
How frontend engineers grow when AI writes the code: new skills in verification, specification, and judgment, drawn from Karpathy, Vercel v0, and METR.
Abstraction
What abstraction means in frontend and how good abstractions differ from bad ones: levels of abstraction, intention-revealing names, composition.
queryKey
How TanStack Query queryKey management evolved from inline arrays and constants to key factories and v5 queryOptions, with DataTag and invalidation.
How queryKey Comparison Works
How TanStack Query judges new queryKey arrays equal: hashKey serialization (key order, undefined, Map, cycles) and how filters compare key structure.
Placing ErrorBoundary
How many ErrorBoundaries to use and where, checked in source: what route, screen, and region each receive, one shared fallback, and retry conditions.
Why the Retry Button Does Nothing
Three cases where retry in a react-error-boundary fallback brings back the same fallback, checked in installed source, and how to clear each one.
Error Propagation
Throw the same error from seven places and only four reach an ErrorBoundary. This post traces where each kind actually propagates.
Mastering React Fiber
A source-based look at React Fiber: Stack Reconciler, Fiber nodes, double buffering, Lanes, the Work Loop, render and commit, and Concurrent Features.
Why React Uses MessageChannel
Why React's Scheduler uses MessageChannel over requestIdleCallback, rAF, or setTimeout, traced through React PRs and Chrome measurements of the 4 ms clamp.
Can Biome Replace ESLint and Prettier?
Biome vs ESLint and Prettier: linting and formatting benchmarks, adoption notes, and a migration guide for this Rust-based all-in-one toolchain.
Zustand, What Makes You ProviderLess?
A source-code analysis of how Zustand manages state without a Provider, including how its module-scoped design differs from the React Context API.
Understanding Compression Algorithms
Compares the structure, speed, and ratio of ZIP, GZIP, ZSTD, BZIP2, XZ, and Brotli, why tar.gz beats zip, and when to pick tar.zst for build artifacts.
The Difference Between LZ77 and LZ78
How LZ77 and LZ78 handle their dictionaries differently, how each forgets old data, and how DEFLATE, ZIP, GZIP, and Zstd descend from LZ77.