Writing
Field notes from real production work — Rails & Postgres at scale, AWS bills that grew teeth, and AI tooling that earns its keep.
-
July 2026 · 6 min read
Is It a Regression, or Just a Flaky Test? Teach Your CI to Tell the Difference
A red build tells you something failed. It doesn't tell you the thing that matters — whether a human needs to fix it now, or whether the test will be green next run. Here's a small, dependency-free flake engine that answers that from run history.
-
July 2026 · 7 min read
A False Signal Is Worse Than a Missed One: Citing and Abstaining in LLM Document Extraction
When you turn public documents into sales signals with an LLM, the expensive failure isn't the signal you miss — it's the one you invent. Two disciplines fix it: cite every signal, and abstain when the document supports nothing.
-
July 2026 · 6 min read
When ‘Compliant’ Is a Legal Claim: Computing EUDR Deforestation Risk — and Knowing When to Abstain
Scoring forest loss inside a plot boundary is the easy half. The engineering that matters is refusing to certify on bad geodata.
-
July 2026 · 6 min read
Data Sovereignty Is an Access-Control Pattern (and It Should Fail Closed)
Turning ‘the community owns its data’ into enforceable, audited code: default-deny access, owner-granted sharing, no super-role, and an append-only audit trail.
-
July 2026 · 6 min read
When Not to Answer: Building a Voice-Over-Email Loop With a Consent Gate
A small, runnable prototype of a voice product over email — transcribe, LLM reply, synthesize, thread back — and why the most important line of code is the one that refuses to speak.
-
July 2026 · 6 min read
Knowing When Not to Make the Highlight Reel
Ranking, dedup, and the senior instinct to refuse — building a camera-roll video picker.
-
July 2026 · 6 min read
Flip One Byte and the Whole Chain Knows
Building a tamper-evident, hash-chained log and the verifier that makes it worth anything — and what real end-to-end voting adds on top.
-
July 2026 · 6 min read
Measure the Aggregate, Never the Person: Privacy-Preserving Analytics with a k-Anonymity Gate
Most analytics ships a re-identifiable event log to a server and aggregates there. Here's the inversion — aggregate on-device, and refuse to report any cohort small enough to single someone out.
-
July 2026 · 7 min read
Fail-Open or Fail-Closed: The One Decision Every Piece of Edge Middleware Has to Make
When the edge state store goes down, your middleware has to choose between letting traffic through and blocking it. That choice is a design decision, not a default.
-
July 2026 · 6 min read
The Audit Log That Can't Have Holes
Building a gap-free, append-only compliance ledger in Elixir/Phoenix — why the obvious approaches all fail, and the one pattern that survives a regulator.
-
July 2026 · 6 min read
The Authorization Gate: Modeling Multi-Party Workflows in Rails
Four parties, one work order, and the single invariant that keeps money and compliance from leaking out of the seams.
-
July 2026 · 6 min read
The LLM Suggests. The Rules Engine Decides.
Why a compliance or money classifier keeps a deterministic core — and puts the model behind an abstain gate.
-
July 2026 · 6 min read
Streaming a Conversational-AI Trainer — and Teaching It to Say 'I Don't Know'
How to stream an LLM roleplayer over Server-Sent Events, and why the debrief that scores a trainee should abstain instead of inventing a number.
-
July 2026 · 6 min read
Designing a Fail-Closed Access Gate in TypeScript
A worker walks up to a turnstile. Should it open? The safe answer to that question is a small, pure, boring function — and a tamper-evident record of every time you asked.
-
July 2026 · 6 min read
Never Trust the Model's Answer Key
Validating LLM-generated assessment content deterministically before it reaches a student
-
July 2026 · 6 min read
The Honest Answer Is Sometimes 'Not Enough Data'
Normalizing heterogeneous financial data with provenance — and building a gate that refuses to score a thin file.
-
July 2026 · 6 min read
The Number Was Green, So the Agent Stayed Quiet
Putting an eval harness and an abstain gate around an LLM analysis agent so it's trustworthy on noisy marketing data
-
July 2026 · 6 min read
A Staffing Forecast Without a Confidence Interval Is a Liability
Why a next-shift census model has to ship uncertainty, defer on thin data, and prove itself against a naive baseline before anyone staffs a floor from it.
-
July 2026 · 6 min read
The Agent Wanted to Call It Healthy. I Made It Abstain.
Shipping real software with coding agents, where the value is the judgment layer on top.
-
July 2026 · 6 min read
The Self-Healing Scraper That Refuses to Trust Itself
Letting an LLM repair a broken selector is easy. The engineering is in refusing to believe it.
-
July 2026 · 6 min read
The Best Thing an Observability Agent Can Say Is 'I Don't Know'
Giving an LLM observability assistant an eval harness and an abstain gate so it never invents a root cause on noise.
-
July 2026 · 6 min read
Never Bill a Sentence the Chart Didn't Write: Evidence Gates for Clinical Charge Capture
Why an AI that finds missed hospital reimbursement has to cite the chart and abstain — and why that guardrail belongs in deterministic code, not in a prompt.
-
July 2026 · 6 min read
The Query That Got 30× Faster Without Changing Its Answer
A patient-journey analytic over a claims graph, taken from a naive plan to a materialized-view rollup — with the one rule that separates an optimization from a bug.
-
June 2026 · 9 min read
Building a Client SEO Dashboard in React
An agency's report is the product as far as the client is concerned, so we built Beacon — a React SEO & Core Web Vitals dashboard — as a front-end craft exercise: animated score rings drawn by hand in SVG with no chart library, Core Web Vitals scored against Google's real thresholds, a responsive grid that never overflows, and a theme system that never flashes. Live demo.
-
June 2026 · 8 min read
Retry Backoff You Can Actually Test
Exactly-once is a lie, so every remote call needs retries with jitter — but jitter is exactly the part that's hard to assert on.
backoffliteseparates the pure backoff policy from the impure retry loop, with a seedable RNG and an injectabletime.sleep, so the AWS full/equal/decorrelated jitter strategies and the whole retry path are deterministically unit-testable. -
June 2026 · 9 min read
A Sans-I/O SSE Parser for Python
The "sans-I/O" idea behind
h11applied to Server-Sent Events: a parser that does zero networking, so you can feed it bytes from httpx, aiohttp, or a raw socket and get fully-parsed events.sansio-sseimplements the WHATWG event-stream rules — and the whole correctness story lives in the chunk boundaries, like a CRLF split across two reads. -
June 2026 · 9 min read
A Ruby Backend for the Vercel AI SDK
The Vercel AI SDK's
useChat/useObjecthooks speak a language-agnostic Data Stream Protocol — with official backends for JavaScript and Python, but none for Ruby.ai_streamis the missing piece: stream text, reasoning, tool calls, sources and custom data parts to the frontend from a Rails or Rack app. -
June 2026 · 8 min read
Compiling Bash Globs into Ruby Regexps
Ruby's glob support is for files on disk; JavaScript has picomatch/minimatch for arbitrary strings, and Ruby had no clean counterpart.
picoglobcompiles*,**, braces, ranges and extglobs into a reusableRegexp— and the correctness lives in the edge cases. -
June 2026 · 8 min read
Fuzzy-Match Scoring in Ruby, with Highlights
Ruby's fuzzy gems do record-linkage or a boolean match; none return a relevance score and the matched positions you need to highlight a command palette.
fzy_scoreis a faithful port of fzy's scoring — and it powers the ⌘K palette in our own Hotwire demo. -
June 2026 · 10 min read
Saying "Hey Claude" Out Loud, On-Device
Could you say "Hey Claude" and have a coding agent start working — without streaming your mic to the cloud all day? The progressive-gating pipeline, the wake word we trained from scratch, and the macOS permission story underneath it.
-
June 2026 · 10 min read
Building a Multilingual Speech Corpus, Verified by Whisper
Public audio is plentiful and filthy. The dedup, the Whisper verification gate, and the immutable edge-served manifest behind LinguaGuessr — and why the same playbook applies to invoices and sensor data.
-
May 2026 · 10 min read
Postgres Indexing for Rails at Scale
Composite-index column order, partial indexes, reading EXPLAIN ANALYZE, and the counter-cache trade — the indexing decisions that start to matter once a table outgrows memory.
-
May 2026 · 10 min read
Sidekiq Idempotency and Reliability Patterns
Exactly-once is a lie. Once you accept that every job can run twice, the patterns that keep background work correct — idempotency keys, dedup, retries with backoff, and a deliberate dead set — fall into place.
-
May 2026 · 11 min read
Zero-Downtime Migrations at Scale
A schema change that is one line in development can take an
ACCESS EXCLUSIVElock and freeze a busy table in production. The locks, the backfills, and the multi-deploy choreography that keep the app up while the schema moves. -
May 2026 · 9 min read
Hunting N+1 Queries Systematically
Bullet, Prosopite, and strict_loading are not competing tools — they cover three different stages of the same problem. Here is how to use all three.
-
May 2026 · 10 min read
Rails Caching Done Right
Russian-doll fragment caching, low-level
Rails.cache, and key-based expiration — the caching model where you almost never write an explicitexpire, because the keys do the work for you. -
May 2026 · 9 min read
Real-Time UI Without React
A Turbo Streams + Stimulus pattern that gives you live updates, optimistic interactions, and zero client-side state to keep in sync.
-
May 2026 · 10 min read
A Petabyte, a Bill, and a Tiering Decision
How we cut an S3 line item ~60% without breaking a single user workflow.
-
May 2026 · 11 min read
The Support Tool That Replaced Itself
Building an MCP server so Claude Desktop could edit production data safely.
-
May 2026 · 13 min read
The Hidden Cost of `mount Admin::Engine`
What we learned migrating a generated admin to React + GraphQL.
-
May 2026 · 12 min read
The ERP That Will Only Talk to You by Email
A production integration built on AWS SES, a job queue, and compound indexes.
-
May 2026 · 12 min read
One UIConfig, Four Runtimes
A production server-driven UI across iOS, Android, React, and React Native.
-
May 2026 · 13 min read
Skills, Not Chatbots
Building an internal AI plugin system for an engineering team.
-
May 2026 · 8 min read
The Monorepo Was for the Agents
Cross-team context for AI agents without a real migration.
-
May 2026 · 9 min read
319 N+1s, 5,940ms Wasted
Auditing a decade of Rails code in one afternoon.
-
May 2026 · 10 min read
The Page That Counted 800 Million Rows
When aggressive denormalization is the right answer.
-
May 2026 · 8 min read
The Question the AWS Console Will Not Answer
RDS IOPS pattern detection with Ruby and a spreadsheet.
-
May 2026 · 9 min read
S3 Access Log Archaeology
Turning a year of access logs into an archival policy.
-
May 2026 · 11 min read
One Commit, Six Lessons
A Salesforce sync, a read follower, and the audit that reshaped a credentials posture.
-
May 2026 · 9 min read
The Support Tool That Edits Five Tables Atomically
A reparent-user workflow with a dry-run diff.