“It should be noted that no ethically-trained software engineer would ever consent to write a DestroyBaghdad procedure. Basic professional ethics would instead require him to write a DestroyCity procedure, to which Baghdad could be given as a parameter.” — Nathaniel Borenstein, 1992

Way back in 2013, I wrote Google Go: The Good, the Bad, and the Meh, which means I now have more than the job-recruiting-required “at least five years of experience” using Go. But I don’t want to write about that. I want to write a little about a baker’s dozen of the many small tools I’ve written in Go to scratch personal itches since then.

Most of these programs were the result of some passing enthusiasm, now mostly forgotten. They tend to be work-adjacent but not actually part of my direct job responsibilities. (That is to say, I was never asked to write any of these by a boss, and probably my bosses would see them as a waste of time if they knew about them.) Some of them I use a lot, and others I wrote and then forgot about completely. Mostly though, they’re just fun to write and satisfying to look back on.

Status: Pretty much complete. The only thing I can think to add would be a way of passing arbitrary headers to use to it, but at that point, it would become a curl clone.

Usage: I use this all the time.

Satisfaction: This is one of my favorite tools. It doesn’t do something I couldn’t do by either using curl or looking at the network inspector in my browser, but it is significantly easier to use and read, and that’s enough to make me keep using it.

Origin: I had some ugly JSON and I was tired of Googling for a good online formatter.

Status: Complete.

Usage: Up until now, I’ve been using this any time I have to deal with fresh JSON, so that I could get a sense of its structure, but I think I may switch to gron for exploring new data sources in the future.

Origin: I was working with an Enterprise Organization that required us to create passwords with exactly 8 characters, containing uppercase, lowercase, and digits (no symbols!). And of course we had to replace the passwords every three months.

Status: I would like to release a companion tool for correct-horse-battery-staple–style passwords, but I don’t have any plans to work on it.

Usage: I still use it for, e.g., creating MySQL account passwords (but with more than 8 characters and with symbols).

Satisfaction: This was fun to work on, and I learned something about making web apps in Go and modern vanilla JavaScript.

Description: A timer that defaults to one pomodoro unit with a fancy ASCII art counter.

Origin: I was in a meeting thinking about how I should start doing pomodoro to be more productive, and then I sank all my time into this instead.

Status: I wish it could count down to a specific time instead of only for a specified duration, but I never came up with a good way to write out target times on the command line.

Usage: I used to use this all the time for brewing coffee, but now I only use this to remind myself to jump on calls in 15 minutes. I think I’ve used it to do approximately 6 pomodoro units since I wrote it.

Satisfaction: I feel like I learned a lot about how writing composable GUI framework is very easy in systems that aren’t HTML+CSS.

Description: An endless honeypot of Markov chain text to waste the time of spambots.

Origin: I wanted to play with writing an HTTP handler where the data source was unbounded.

Status: Live on heroku (but I’m not linking to it because you shouldn’t connect to it since it will crash your browser if you leave it open too long).

Usage: I actually do use this at work. I tell bots looking for wp-login.php to go to Heffalump on Heroku instead. It doesn’t do anything to slow the bots down, but it makes me feel good.

Satisfaction: I’m sad that this has so many Github stars. This project isn’t actually serious, and no one should use it, but it’s the most popular thing I’ve written.

I’ve actually written more than that, but these are the ones I wanted to write about.

So, what’s the moral of all this? The moral is that it’s fun and easy to write a command line tool in Go. Even if only you use it, and even if there’s already another way to do the basically same thing, you will learn something and have fun writing your own tool. Just dive in, open godoc.org and start writing a thin wrapper around some existing functionality so that it meets your needs and maybe you will learn something along the way.