Blog
Thoughts on software engineering, web development, and technology
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.
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.
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.
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.
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.
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.
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.
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.
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.
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.
Built by Sam Lee with
♥