
Expected loss and variance from a tiny discrete distribution
Calculate expected loss, variance and the distribution of a two-case average, then test how copied observations and rare large failures change the evaluation.
The journal / Ideas in progress
Engineering & everyday learningSoftware, systems, and the things I’m learning along the way. From first principles to AI in production.
Find something to readA little theory. A lot of practice.

Calculate expected loss, variance and the distribution of a two-case average, then test how copied observations and rare large failures change the evaluation.

A messy quantity column retains original tokens and rejection reasons. A worked analytical example with explicit assumptions and checked results.

Build an explicit token budget for an international document assistant, reserve output capacity, and handle oversized inputs without silently dropping evidence.

Trace a policy question through retrieval, context assembly, citations, and abstention to build a RAG pipeline whose evidence can be inspected.

Define what one analytical row represents, keep receipt and line measures separate, and distinguish a missing line from an observed zero with executable SQL.

Choose few-shot examples that explain a decision boundary, include near misses, and preserve a separate holdout for evaluating the prompt.

Trace a modal dialog through focus, keyboard and accessibility-tree checks in Chromium, then define the remaining Electron and screen-reader checks.

Design a calendar-search tool with explicit timezone, interval boundaries, pagination, and access rules so model-generated arguments have one meaning.

Give Claude Code a reproducible TypeScript repair, inspect the resulting behavior, and verify a patch without relying on a confident completion message.

Relax the document wrapper’s automatic flex minimum, inspect action containment, and add wrapping plus a keyboard-accessible full filename.

Protect tenant-scoped membership identity, preserve roles during repeated adds, and reproduce an insert-or-fetch query that returns nothing after a conflict.

Protect a bounded ring queue as one state transition, including its head, tail and count, and state what the mutex does not guarantee.