Field notes — essays & research notes

Things I've written down.

Ruby, Rails, performance, security and applied machine learning. Updated when something feels finished.

55 posts · page 3 of 6
SECURITY 07 / 04 / 26

Your dependencies are your attack surface

A modest Rails app pulls in a hundred-odd gems and several hundred transitive ones. Almost none were chosen by anyone.

2 min
RUBY & RAILS 06 / 30 / 26

The 55% page-load win was four queries and a cache key

Cutting clinical-study page loads by more than half under real traffic. Not a rewrite — profiling, eager loading, and one honest look at what was cacheable.

4 min
LLM & AGENTS 06 / 27 / 26

Chunking is a retrieval decision, not preprocessing

How you split documents determines what is findable. Everything downstream inherits that choice, and almost nobody measures it.

3 min
RUBY & RAILS 06 / 24 / 26

Everything that runs before your controller

A Rails request passes through twenty-odd middleware before your code sees it. Knowing the stack turns a class of mystery into a list.

2 min
SECURITY 06 / 17 / 26

Where SQL injection still lives in Rails

Active Record parameterises almost everything. The gaps are specific, well known, and exactly where people write raw fragments.

3 min
MLOPS 06 / 13 / 26

Your model didn't degrade, the world did

Model weights are frozen the day you deploy. Everything they were fitted to keeps moving, and nothing tells you unless you look.

2 min
RUBY & RAILS 06 / 10 / 26

Time zones: store UTC, and know which "now" you called

Most time-zone bugs come from two nearly identical methods and one place where dates are not really times.

2 min
SECURITY 06 / 03 / 26

Rate limiting the endpoints that actually get abused

Blanket limits annoy real users and barely inconvenience attackers. The endpoints worth protecting are a short, specific list.

2 min
RUBY & RAILS 05 / 27 / 26

The tests worth writing

Coverage measures which lines ran, not whether anything is verified. What actually catches regressions is narrower and cheaper than a coverage target.

2 min