Intellij IDEA: Run goimports on file save

goimports is a Go tool to remove unused and add missing imports. It also formats your code the same as go fmt. This is one solution for running goimports when saving *.go files in Intellij IDEA. If you have a better way (not involving snark about emacs), please comment. Assumptions You have goimports installed. If not, install with: go get code.google.com/p/go.tools/cmd/goimports You’re probably using the golang plugin. That plugin isn’t necessary for this goimports-on-save business, but if you’re using Intellij to write Go code then you might as well use the plugin, too. Big Picture Create a shell script to run goimports against … Continue reading Intellij IDEA: Run goimports on file save

Ice Ice Baby

In Defense of Silly Programs

To learn a  programming language, you must either Write a compiler for language Write programs in the language A handful of canonical first-programs have risen in the past few years. TODO lists and Blog Engines are popular because they’re easy enough to start and difficult enough to cover a non-trivial swath of a language’s ecosystem such as documentation, packages/modules, build systems, package manager, support network, and so forth. They also generally require integration with a database, which at least in most OO languages can lead to understanding at least one major framework and consequently that framework’s abstractions, typically ORM-y, for … Continue reading In Defense of Silly Programs

2013 in Review; What’s Coming in 2014

Preview New job, sold 2 houses, attended some conferences, read a lot, learning banjo, learning Go, excited for 2014, preparing for 2015. Be kind. New Year, New Job In January 2013, I made a decision that folks close to me thought was at best questionable, at worst just plain stupid and foolishly risky, and to one, made me a communist-slash-terrorist-slash-socialist-slash-anti-American: I left a fulfilling, stable job, working with a fantastic team, to take a temporary 2-year stint working for the U.S. Government. Why? I believe in the organization’s mission and want to contribute to software, systems, and teams that protect American … Continue reading 2013 in Review; What’s Coming in 2014