Three SOLID Principles, One Design Decision: OCP, ISP, and LSP in a Real FastAPI Service

Most SOLID explainers cover all five principles in one pass, give you a definition and a toy example for each, and move on. What they skip is showing up in a codebase that already works, finding where a principle is being violated, and making the case that fixing it actually changed anything. This post focuses on three: OCP, ISP, and LSP. They came up together in a single design decision on a FastAPI invoice-reminder service — and the interesting thing is that one construct in Python’s type system addresses all three at once. ...

May 21, 2026 · 7 min · 1399 words · Rifqi

Two Design Patterns I Applied in One MR

There’s a specific kind of file you learn to dread. Not broken — tests pass, CI is green, customers are using it. But you avoid it anyway. You touch it only when you have to, and when you do, you spend the first few minutes re-orienting: which method calls what, what side effects lurk where, whether there’s another spot you’ll forget to update. ClientService was that file. 354 lines, tested, shipping. But every time I touched anything PII-related, I’d Ctrl+F the file to find every spot that called encrypt(), because I didn’t trust myself to remember all three. That reflex is the smell. I’d been ignoring it for weeks. ...

May 21, 2026 · 10 min · 2012 words · Rifqi