Production war stories

I Shipped a Race Condition That Oversold Stock (And Other War Stories)

Most engineering blogs are about things that worked. This one is about things I broke, mostly in Polaris, the retail system I built for shops that bill all day, and one in an AI pipeline at Entropy Labs. These happened between 2024 and 2026. Two cashiers, one item Two cashiers at different counters scan the same product. The shop has one left. Both press “Complete sale” within a fraction of a second of each other. ...

April 8, 2026 · Updated September 2026 · 4 min · Muhammad Hassan Raza
Django performance notes

Polaris Performance Log: The Django Mistakes I Made First

Polaris is the retail operations system I built for shops that bill all day: invoices, refunds, stock, customer ledgers. The first version was correct and slow in the places cashiers notice most. Checkout dragged, refunds dragged, and customers standing at the counter were, to put it politely, fuming a little. None of what follows is clever. It’s a log of the Django habits that looked fine with three test products and fell over with a real catalogue. ...

February 10, 2025 · Updated September 2026 · 4 min · Muhammad Hassan Raza