I’ve been working with Go professionally for a bit, and I’m still not convinced it's the enterprise language it’s touted as, at least not to a software craftsman. It’s too nuts and bolts. The underdeveloped support for things like encapsulation, composition, and code reuse leads to too much code rot.
That said, looking at its origin at Google, as a response to a growing plague of production Python and Bash scripting, Go is a great nail and hammer for that problem. You can produce decent code that you won’t regret next week pretty damn quickly.
A Pomodoro Timer
In the past, I incorporated the Pomodoro Technique regularly in my workday, but when I started working from home, the mechanical timer I used didn’t fit into my home office (i.e. desk in the living room). The apps I tried were all way too feature busy as though they felt compelled to be more than a timer. I fell out of the habit of using the technique. I decided I needed to pick it up again and looked at my old apps, and alternatives, and decided, instead to whip one up myself in Go. In about 75 minutes (or three timers :-) I had gotimer:
It’s nothing to brag about, it just counts down a duration in the current terminal session:
$ gotimer -time 25m00s
But it was easy in Go to:
- Minimally TDD
- Produce understandable, readable, formatted, Linted code
- Drop into CI/CD
- Produce a small, self-contained binary
In a land of agile sprints, I can see why some would view Golang as king.