Skip to main content

Learning Go

Niche and Khan Academy use Go for their backend services, so I’ve been “reading” Go since 2019. But as I progress in my career, I’m realizing that it would be useful to understand Go at a deeper level, and even write some Go code when the need arises.

For the past few weeks I’ve been going through Go by Example, a “hands-on introduction to Go using annotated example programs”, and logging my progress here: seanmcp/go-by-example.

So far, I am enjoying the experience. Go by Example is well designed: the examples are clear and the concepts build upon each other well. And the development environment setup for Go is straightforward:

  1. install Go,
  2. write .go files in your editor of choice, and
  3. run programs from the command line.

I’ve been using VS Code with the official Go extension, and it’s been great — even on an older laptop.

My favorite features so far:

  • The built-in formatter: it’s nice to not have to think about how your code should be formatted.
  • Generating executables: I’ve played around with Deno’s compiler for this, but Go’s feels more mature.
  • Simple syntax: you don’t need to remember a lot of syntax to write Go code.

My not-so-favorites:

  • Conventions are too terse: you can name things whatever you want, but reading through examples with 1-3 letter variables gets old. timer.C is not explicit.
  • The name Go: it’s too common a word for a programming language, which makes searching online for challenging. Using “golang” tends to work, but even the title of this article might confuse people.

The negatives aside, I’m looking forward to continuing this journey. If you have any recommendations or resources, please let me know!