architecture

  • One Core, Two Interfaces, No Rewrites

    When building applications, I always build the core first, then the interfaces. It was no different with Ask the Canon: a uv run main.py ask "..." CLI for quick iteration and validation, then the web app for MVP. Search, ranking, citations, all using the same engine.

  • Build the Simplest Thing That Works

    I needed a CRM the other day. Not Salesforce, not even a web application. I just needed a way to track contacts, notes, reminders, and a small product catalog.

    Before writing any code, I focused on the constraints first.

  • Two Python Scoping Bugs: A Lesson in Object Lifetimes

    Your app works fine with one user. You open a second browser tab and the data is wrong. Your tests pass individually but fail when run together. The culprit: a global object created at module scope.

  • The Repository Pattern: Swap Data Sources in One Line

    Your live data source just broke. The API provider changed their auth overnight, no warning, no migration path. Now your entire app is blocked.