Blog

Thoughts on software engineering, web development, and technology

S
Sam Lee

The Lint Setting That Ate 12 GB

Dependency-update PRs kept running out of memory in the cloud build. The cause was one ESLint setting that built a full TypeScript program per package for type information no rule used.

Oct 06, 2026·TypeScript
S
Sam Lee

17 Duplicate Saves Weren't a Loop

One user's form was saved 17 times in 14 seconds, and it looked like a loop. The logs showed 17 separate form submits, so the fix disables Save while the request is in flight.

Oct 05, 2026·.NET
S
Sam Lee

The Preflight Check That Asks One Question

Before a production migration changes any schema, a small check asks MySQL whether a metadata lock is already queued on our busiest tables. If one is, or if the check can't tell, the deploy refuses and gets re-run.

Oct 01, 2026·MySQL
S
Sam Lee

Teaching AI Agents to Write Fewer, Better Comments

Two comment tags, a ticket pointer instead of the whole story, and a check-only hook that sends bad comments back on every save. The hook checks shape; review checks sense.

Sep 30, 2026·Claude Code
S
Sam Lee

The Index That Would Only Have Existed in Staging

On our .NET backend, NHibernate's startup schema update creates indexes declared in the mapping, but it's off in production. So indexes on busy tables ship as EF Core migrations instead.

Sep 28, 2026·.NET
S
Sam Lee

When a GraphQL Client Silently Drops Your Filter

A query filtered on a field it never fetched. Our GraphQL client didn't object when the query was built. It failed later, on live updates, where nothing on screen showed it. Mapping the field fixed it.

Sep 24, 2026·GraphQL
S
Sam Lee

Indexing a GUID Stored in a TEXT Column

MySQL won't index a TEXT column without a key length. When every value is a 36-character GUID, a 36-character prefix is the whole value, so the prefix index loses nothing.

Sep 22, 2026·MySQL
S
Sam Lee

Why an OR Made MySQL Skip the Index

A query asked for `id IN (subquery) OR id = ?`, and MySQL scanned the whole table to answer it. I split it into two simpler queries and merged them in the app, and the merge turned out to be the part that needed tests.

Sep 21, 2026·MySQL
S
Sam Lee

Green Pipeline, Failing Tests

A smoke-test step marked continue-on-error kept every staging run green, and the Slack alert that should catch failures was silently dropped whenever the tests never ran. My fix makes the alert arrive, and it is still an open PR.

Sep 17, 2026·GitHub Actions
S
Sam Lee

The Migration That Waited 15 Minutes

A one-column ALTER waited on a table lock MySQL lets it wait on for a year, and every new query on that table lined up behind it. A 10-second lock timeout on the migration's own connections makes it fail fast instead.

Sep 15, 2026·MySQL

Built by Sam Lee with

 ♥