FastAPI vs Django: The Tradeoff Nobody Puts in the Comparison Posts


Every FastAPI vs Django comparison lands on the same beats: FastAPI is faster (true, mostly irrelevant), Django has more batteries included (true, and this is the actual point), FastAPI has native async (true, and often not the reason you’d pick it). Having shipped production services in both, the real decision criterion is rarely performance.

Read more ...

Idempotency Isn't Optional Once You Have Retries


Somewhere in a payments-adjacent service I worked on, a customer got charged twice for the same order. Nobody wrote a bug that says “charge the customer twice.” What happened was worse, in the sense that it was more instructive: everything worked exactly as designed, and the design was wrong.

Read more ...

Database Connection Pooling in Django: What Actually Happens Under Load


A few years back I got paged for an API that was returning intermittent 500s under load. CPU on the Postgres box was at 20%. Memory was fine. The app servers were fine. The errors were all FATAL: sorry, too many clients already.

Read more ...

Strategy Pattern vs If/Elif Ladders: When the Abstraction Pays For Itself


Somewhere in a billing service I inherited, there was a function that calculated fees differently depending on payment provider — Stripe, PayPal, a couple of regional processors. It was an if/elif ladder, about nine branches deep, and it offended me the way if/elif ladders offend most people who’ve read a design patterns book. I refactored it into a Strategy pattern: one class per provider, a common interface, a registry to look them up. It was better code, by every metric that shows up in a linter. It made the next incident worse.

Read more ...

TDD in a Real Codebase: What Actually Sticks After the Initial Push


Every team I’ve seen adopt TDD goes through the same arc: enthusiastic strict adherence for a few weeks, a crunch period where “write the test first” quietly becomes “write the test after, same day,” and eventually a steady state that looks nothing like the textbook cycle but still produces well-tested code. I used to think the steady state was a failure of discipline. It isn’t — it’s what actually survives.

Read more ...

Microservices Aren't a Performance Optimization


A team I worked with split a Django monolith into six services because “microservices scale better.” Six months later the same request that used to take 40ms was taking 180ms, and everyone was confused about why the “scalable” architecture felt slower. It felt slower because it was slower — that request now made four network calls instead of four in-process function calls.

Read more ...

Hello World!


You’ll find this post in your _posts directory. Go ahead and edit it and re-build the site to see your changes. You can rebuild the site in many different ways, but the most common way is to run jekyll serve, which launches a web server and auto-regenerates your site when a file is updated.

Jekyll requires blog post files to be named according to the following format:

Read more ...