Engineering

How I build software

Most of this site is about tools for musicians. This part is for anyone who loves building software as much as I do (it's my site, haha). These are the principles I actually design by, with real code for each one. It's not a coding tutorial. It's how I build software that's still a joy to change years later, written down for free so anyone who's interested can take what's useful.

  1. Why I care so much about quality

    Good software is a set of clean Lego pieces you snap together. Bad software is a board soldered into a knot. Here's why I build the first kind.

    3 min read

  2. Nouns: your program's dictionary

    Name every concept once, model it once, and use that one model everywhere. Five slightly different Song classes is how codebases rot.

    3 min read

  3. Cohesion, coupling, and changing one thing in one place

    Each module does one job and hides how. Callers use its interface and nothing else, so changing a behavior means editing one place.

    4 min read

  4. Interfaces with no surprises

    Prefer pure functions, compute instead of storing state, name every side effect, and never swallow an error. A good API does exactly what it says.

    3 min read

  5. Wrap every vendor

    Every third-party library sits behind a small interface of your own, and its types never get past it. Swapping vendors becomes a one-module change.

    5 min read

  6. Make Python fail when a boundary is crossed

    Python won't stop you from importing a module's internals. Here's the real config that makes your linter and tests fail when anyone tries.

    6 min read

  7. Dependency injection and the AppContext

    One AppContext builds every dependency and hands it down. Modules never construct their own, so any piece can be swapped, faked, or tested.

    5 min read