Transitioning from Rails -> Go for a (relatively) Simple API part 2

In my last post I talked about how it's getting harder to find Rails programmers as well as the initial replacements I had come up with for our re-implementation of our API.

In this post I'm going to talk about my experience in switching to an entirely different ecosystem and what was surprisingly good as well as a few recommendations based on my full time development in Go over the last few months.

After literal years of just using ViM is there anything better than it for Go?

It's not a secret that I'm a vim junky. I love the ability to edit from anywhere via mosh and the fact that even though most of the time it can't provide advanced functionality like JetBrains' IntelliSense I can get by with a few things:

  • snippets (SnipMate)
  • ctags (for going to symbols from anywhere)

Those two things by themselves take vim from being a text editor to something more sublime-text like in the terminal which is all most people need (imho).

Very quickly though I found vim-go which provides a LOT of IDE-like functionality, so instead of just having a "smart" editor all of a sudden I have special commands such as :GoImports and :GoFillStruct which auto-import any new packages and fill in fields from structs respectively. Those two features are amazing by themselves, but I also enjoy the fact that it runs :GoFmt on save, so much like an IDE my code is always formatted. :GoMetaLinter also runs golangci-lint on save as a linter which is also handy.

I'm not going to spend this entire blog post going over how great vim-go is but it has amazing documentation - so go check it out if you want to try developing Go with vim and have a great plugin.

ViM is great...but how do the other IDE offerings fare?

Now jus because I use vim pretty often for development doesn't mean I exclusively use it for work, admittedly most of the time I live in VSCode. I've also used JetBrains GoLand for a bit - but I despise the fact that even though those IDEs provide a metric boatload of functionality, they use a ton of RAM and have no remote-editing feature (other than Projector, but it sucks right now).

VSCode on the other hand has one killer feature: editing over SSH. This basically emulates the ability of vim+tmux except it also brings in the goodies that vscode includes like language server integration. The coolest part about it though is that when you start up a "remote" session even the integrated vscode terminal (runing on your local machine) is actually an ssh terminal, so it is a seamless environment on the remote machine with minimal lag (since it isn't streaming the entire application screen over http like Projector).

VSCode has all of the features I use:

  • filling structs
  • linting
  • debugging
  • argument type info when typing methods
  • goto symbol anywhere in the workspace

and it only uses ~300-500 MB of RAM total, whereas GoLand will balloon to 2GB basically instantly. It also just feels quicker to me, but ymmv.

TL; DR: when switching to Go at work I ended up trying to use ViM for it which worked out well, but I usually use VSCode when I can because of the fact that it supports editing over SSH and it's much lighter than GoLand

Jacob Lindgren

Jacob Lindgren

Nebraska, USA