on judgement
The best code I ever wrote is code I deleted.
The Nomad deployment layer was mine alone — 108 commits, not one by anyone else.
I liked it. It worked. And that was exactly the problem: I was the only person in
the company who could operate it. A deployment stack with a bus factor of one isn't
infrastructure, it's a liability with my name on it.
So I argued for replacing roughly a year of my own work with Docker Compose —
simpler, boring, and something the whole team could actually run. We did, and that
Compose deployment still ships to every customer today. I learned more about
architecture from deleting that layer than from building it: the sophisticated
option you personally prefer is not the same thing as the right option.
on maintainability
I rewrote a system that already worked.
Backup/restore v2 was shipped and running at customers. It also had two god
controllers and a complexity curve I could feel bending the wrong way. I tried a
safety net first — an availability gate that locks the feature out when
preconditions fail — and realized it treated the symptom, not the cause. I brought
in a senior colleague for a sanity check, then rewrote the core onto a saga
architecture: explicit steps, compensating rollback in reverse order, state carried
in a context object because mid-restore the database you'd read it from is down.
Three weeks, ~13,000 lines deleted, ~16,000 written. The hard part wasn't the
code — it was deciding that "it works" and "it's finished" are different claims.
on stubbornness
Six thousand classes stood between us and a native build.
Our telephony driver was the last backend that couldn't compile to a GraalVM
native image. The blocker: its ARI library negotiates the protocol version at
runtime by reflectively probing all 31 generated implementation packages — about
6,000 classes. Fine on the JVM, impossible in a native image.
The fix was to make the version configurable without changing JVM behavior by a
single bit, generate reflection metadata for the five versions we actually support,
and document how to extend it with the tracing agent. Boot time went from JVM
startup to ~50 ms and memory from ~350 MB to ~100 MB. Along the way I found the
integration tests' dialplan had been silently ignored for years — the config file
was named extension.conf, and Asterisk reads extensions.conf.