Compiler Driven Development with Go

On the small Golang codebases I’ve recently been working with- hundreds to a few thousand lines- I have repeatedly gotten into refactoring parties, piling the implementation of one brainstorm on top of another with only minimal preplanning.

I’m finding that as long as I can get my changes to compile, they work.

So- there I go, plunging headstrong into the jungle, carving and slicing and moving things around. When I’m ready to get out, there’s the compiler at my side, super fast, giving me the string I need to follow to put it all back together.

Good TDD habits I grew working in Clojure- an amazing tool and ecosystem, but brutal for refactoring without tests- are over there in the corner sullenly staring at me.

Pretty terrifying, but pretty great too.