Journal
Short write-ups on correctness, infrastructure and the specific bugs that changed how I build. RSS.
Why read replicas return stale data after a write, how replication lag works, and three ways to get read-your-writes consistency.
7 min · Databases · Scaling · PostgreSQL · Architecture
Mistral Voxtral 3 adds transcription in 50 languages, realtime TTS and a voice agent SDK. How the pipeline works, what it costs and what to check.
6 min · AI · Voice · Agents · APIs
JSON.stringify silently drops undefined, empties Map and Set, and turns Dates into strings. Here is every rule and how to serialize safely.
6 min · JavaScript · JSON · Debugging
RegExp.escape turns any string into a literal regex fragment. How it works, where the old escape helper breaks, and where you can use it today.
6 min · JavaScript · Web Platform · Node.js
Idempotency keys let clients retry API requests without double charges or duplicate orders. Learn how they work, how to store them and the races to avoid.
7 min · Scaling · APIs · Reliability · Databases
Inception Mercury 3 is a diffusion LLM that refines whole drafts in parallel. How it works, its API and specs, and when its speed matters for your app.
6 min · AI · LLMs · APIs · Performance
Uint8Array.toBase64() and fromBase64() encode and decode bytes natively, with hex, base64url and buffer options. How they work and where they run.
The circuit breaker pattern stops calls to a failing dependency, fails fast and probes for recovery. Learn the three states, trip rules and fallbacks.
7 min · Scaling · Reliability · Architecture
JetBrains Mellum2.1 is a 12B open MoE model with 2.5B active parameters for coding agents. How it works, what changed, and how to run it.
6 min · AI · LLMs · Open Models · Agents
Using await inside forEach doesn't wait: forEach ignores the promises, so code runs early and errors escape. Here's why, plus for...of and Promise.all fixes.
6 min · JavaScript · Async · Debugging
Customizable select lets you style a native <select> with CSS using appearance: base-select, rich options and selectedcontent. Here's how it works.
6 min · CSS · HTML · Web Platform · Accessibility
The transactional outbox pattern keeps database writes and published events in sync. How it works, polling vs CDC, and handling duplicates.
7 min · Architecture · Scaling · Reliability · Databases
Claude Haiku 5.5 is Anthropic's cheap, fast model with a 1M context and adjustable effort. What it costs, how effort works and what breaks when you migrate.
6 min · AI · LLMs · Anthropic · APIs
JavaScript text modules let you import a .txt, .sql or shader file as a plain string with type: "text". Here is how they work and where they run.
5 min · JavaScript · Web Platform · Node.js
Exponential backoff with jitter spreads out retries so failed clients don't hammer a recovering service. How it works, which jitter to use, and what to retry.
EmbeddingGemma 2 embeds text, code, images, audio and video in one space and runs on-device. How it works, task prefixes, and Matryoshka sizes.
5 min · AI · Embeddings · RAG · Open Models
JavaScript fetch() resolves on 404 and 500 errors, so your catch block never runs. Here's why, and a small wrapper that checks response.ok properly.
6 min · JavaScript · Node.js · Debugging
ariaNotify() lets you make screen readers speak from JavaScript with one call, no hidden live region needed. Here is how it works and when to use it.
5 min · Accessibility · Web Platform · JavaScript
Consistent hashing lets you add or remove cache servers while moving only a small share of keys. Here is how the ring, virtual nodes and hash slots work.
6 min · Scaling · Caching · Architecture
OpenAI Ultrafast mode makes GPT-6 Astra stream output up to several times faster at six times the price. How it works, what it costs and when to use it.
6 min · AI · LLMs · OpenAI · Performance