The Daily
A note a day on APIs and the realities of shipping web applications. Stuff I've actually learned across 25 years of doing the work.
Boring Tech: When a MySQL Table Beats Your SaaS Subscription
Half the SaaS tools I see on client invoices are just a cron job and a database table wearing a trench coat. Here's how to know when to stub it yourself — and when to stop.
A client came to me last year paying $340/month for a scheduled notification service that fired emails when lab results crossed a threshold. I looked at their stack — Laravel, MySQL, Forge — and had the same thing running as a native feature in about four hours. The SaaS vendor had a beautiful dashboard. I had a table…
Read the daily →MariaDB Generated Columns: Drop the Lookup Table
Sometimes the right move is deleting a whole table. Generated columns in MariaDB let you index derived values without maintaining separate rows.
I deleted a lookup table last month and the app got faster. No migration of existing data, no backfill job, no caching layer — just a generated column and an index on top of it. It's one of those features that's been sitting in MariaDB for years and I keep watching people reinvent worse solutions around it. What…
Read the daily →OpenAI Streaming in PHP: Surviving the Half-Written Response
Streaming OpenAI responses sounds simple until a server timeout kills the connection mid-sentence and you're left debugging ghost output.
Streaming from the OpenAI API feels like a solved problem until it isn't. The docs are clean, the happy path works first try, and then you deploy to production and start getting support tickets about responses that just... stop. Mid-word. Mid-list. Sometimes mid-JSON if you're doing structured output. The timeout…
Read the daily →Reading InnoDB Deadlock Logs Like You Mean It
Deadlocks are one of those errors developers cargo-cult around. I'll show you how to actually read the InnoDB error log and find the query pair that caused one.
Deadlocks are one of those errors that teams learn to retry around rather than actually fix. I've inherited codebases where the retry logic had its own retry logic, and somewhere underneath it all was a two-query deadlock that could have been solved in an afternoon. The InnoDB error log tells you exactly what happened…
Read the daily →Your Singleton Isn't a Singleton in Laravel Octane
Laravel Octane's persistent process model breaks a core assumption you've been making since day one. Here's what actually happens to your singletons.
I spent an afternoon last year chasing a bug where a healthcare client's per-request tenant context was leaking between requests under load. The app had been running fine on traditional FPM for two years. We moved it to Octane for the performance gains and within a week we had users occasionally seeing another…
Read the daily →