Latest articles
Dispatching a million jobs without hammering your queue
A queue job feels free because it's "async." At volume it isn't. Dispatch is a database write, and the message is a payload you pay to move. I've run a carrier-billing firehose on Laravel queues, and these are the two costs that actually bite, plus the two fixes Laravel just shipped for them.
Shipping three open-source libraries, and knowing when one is done
I published three small libraries in a short stretch. The mechanics of publishing aren't worth an article. The discipline that kept them from being slop is, and so is the harder, less-discussed call - deciding a library is finished instead of adding features it doesn't need.
You don't need an agent SDK. The whole loop is 30 lines.
There's a lot of ceremony around AI agents right now - frameworks, orchestrators, abstractions over abstractions. The actual control loop is about thirty lines of TypeScript, and the only per-vendor code is one function that maps a provider's API onto a single response type. Here's the whole thing.
I retry payment charges on purpose. Here's why it's safe.
Retrying a failed HTTP call is reflexive. Retrying a charge feels reckless, because you might bill someone twice. The safety doesn't come from your code being careful. It comes from where the idempotency key lives, and from never remembering a failure.
Stop your AI agent from hallucinating your schema
Coding agents are confident about your database in exactly the way that gets you burned. They work from their training set, not the app in front of them. An MCP server fixes that by handing the agent your real models, relationships, and schema - and the most important code in it is the part that admits what it can't do.
Every carrier is different. The shape of the problem isn't.
I wired up more than twenty carrier-billing integrations across about ten countries. Every carrier was different; the shape of the problem never was. Here is that shape, and the small PHP package I distilled it into.
The concurrency bugs nobody warns you about when agents touch git
I built a system that runs a crew of AI agents in parallel against a real git repo. The bugs that actually bit me had nothing to do with the AI. They were a semaphore that miscounts under a microtask race, a resource that refuses to be parallel, and a try/catch that catches nothing.
An agent should ship a diff, not a paragraph
The scary part of letting an AI agent into your repo isn't that it might be wrong. It's that it edits your files in place and then tells you it went fine. I built an agent workshop on two rules instead: every task runs in its own git worktree, and the permissions live in code the model can't talk its way past.
Two ways to know a goal happened
A live sports app lives or dies on latency, so we ingested match events two ways at once - a push stream over MQTT for speed, and a poll every two seconds as a safety net. Neither is enough on its own, and here's why you want both.
One class is allowed to talk to the gateway
In a multi-tenant SaaS wrapping a third-party gateway, every tenant has a secret key you have to decrypt to make a call. The safest design I've found is to let exactly one class ever hold that decrypted key - and to make that a structural rule, not a guideline.
Settling a fantasy gameweek exactly once
When a fantasy football gameweek ends, thousands of squads have to be scored, ranked, and paid out - and the job that does it runs every five minutes, so it must be safe to run again before it has finished. Here's the idempotent pipeline, and why the ranking is a cursor loop instead of a SQL window function.
The tenant filter you can't forget - until a queue worker forgets it for you
A global scope that filters every query by the current org makes cross-tenant leaks almost impossible in your request code. Then a queue job runs with no request behind it, the scope quietly switches off, and you learn where the sharp edge actually lives.
The boring half of bug triage is a cron job now
We run a fleet of Laravel services, each firing errors into Sentry all day, and nobody had time to read it, so the slow-burn bugs hid in the noise. I built a pipeline that files the real ones, hands an AI agent the first fix attempt, and leaves a draft PR to review. Here's the pipeline, and the three things that fought me.