Posts
Explore my latest articles and thoughts
Your Agent Doesn't Need a Smarter Model
Picking the right model is the small lever. Picking what the model knows before you ask it anything is the big one. Walks through a lean CLAUDE.md (with a secrets disclosure), what sub-agents actually inherit, shared vs per-agent context layers, and why I ended up organizing agents by area rather than language — plus the Context7 gotcha, the area-drift gotcha, and a colleague's nightly-PR-review experiment that keeps hitting the same wall. Basically: "I'd rather hand a Haiku agent a clean project manifest than run Opus on a diff with no background."
Not Every Question Deserves Your Best Model
Why defaulting to the top-tier model for every prompt is the fastest way to burn through an AI budget, and what deliberate task-to-model routing actually looks like. I walk through the mental model (Haiku for mechanical work, Sonnet for day-to-day coding, Opus for real reasoning), the reverse gotcha that made me upgrade a few of my own agents from Haiku to Sonnet, and a concrete example: a PR review skill that runs a cheap Haiku checklist pass first and only escalates to Sonnet when it finds something worth a closer look. Basically: "Stop sending your commit messages to Opus."
They Said I Couldn't Code Without Autocomplete
My journey from getting teased by senior devs for using autocomplete to running local LLMs on my laptop. It walks through every tool that shifted how I work — Copilot, ChatGPT, Cursor, Claude — the failures along the way (thousand-line PRs, hallucinated code, things I didn't review properly and broke), and where I think this is all heading. Also: why local models like Qwen running on my M2 Pro are genuinely useful for the boring 40% of the work, even if they still lose to Haiku on anything complex. Basically: "My instinct has always been to use whatever helps me build faster — and AI is just the newest version of that same idea, turned up to eleven."
I Never Wanted to Write a Blog
My first post that isn't about databases. It's the why behind this blog: years of saying no to writing, feeling stuck in my career, imposter syndrome that doesn't shout but never goes away, and what changed when I started using AI as a writing partner. Also a little about who I am — Rails dev since 2012, based in Cartago, Costa Rica, husband and father of two. And why I think fundamentals matter *more* in the AI era, not less. Basically: "I never wanted to write a blog — and here's why I finally did."
Making Indexes Work For You: Composite Indexes and Query Plans (Part 2)
Part 2 is about the practical side of indexes — the strategy behind using them well. It covers composite indexes and the leftmost prefix rule (the column order genuinely matters, and the first column can do double duty), how to use EXPLAIN to stop guessing whether your index is actually being used, the situations where indexing is the wrong call (small tables, low cardinality, write-heavy tables), and a production gotcha I learned the hard way: adding an index to a huge table isn't a casual operation and needs `algorithm: :concurrently` to avoid locking everything. Basically: "I knew indexes make queries faster — here's everything I didn't know about using them well."
Database Indexes: What Are They and Why Should You Care? (Part 1)
Part 1 starts from what you already knew — that indexes speed up queries — and then digs into the how and the surprises. It covers the full table scan problem with a million-row example, explains indexes through the book analogy, goes under the hood into how B-trees work (20 comparisons vs 1 million), and then hits the big discovery: indexes aren't free, and they can actually slow down your writes. It wraps up with a quick before/after experiment showing a 225x speed improvement. Basically: "I knew the good side, here's how it works, and here's the bad side I didn't expect."