Go (golang) is a programming language created by Google to solve the problem of exponential development effort needed to build large, backend systems.

It is a superb alternative for mainstream languages in any kind of Cloud Development. Currently often chosen as a replacement for Python or Node.js due lower costs (lower memory footprint, shorter execution times) in Microservices/Event-Driven Architecture/gRPC. But also shines in Serverless (where Java/C# runtime frameworks take their toil).

Characteristics of Go

  • Based on the “Unix Philosophy”
  • Promotes: simplicity, readability over cleverness, explicit over implicit (no magic)
  • Solid foundation: Static Typing, compilation to native code (very fast), Garbage Collector
  • Promotes one, idiomatic way of coding (so each codebase looks familiar; completely opposite to e.g. JavaScript or Scala)
  • Composition over inheritance (literally; by embedding types)
  • Don’t try to mimic mainstream languages in Go! There are no classes, and Go seems to be closer to Data-Oriented Programming than to OOP

Why

  • Saving money. In Cloud you pay for memory⨯time. Go requires less of both
  • Other languages are getting too bloated. Java’s spec has grown up to 750 pages, C#’s up to 517 pages. While Go’s language spec is only 50 pages long.
  • Yet it turned out that clever language features and syntax sugar make it harder, not easier to maintain large codebases in the long run. (Think about it next time you see C#’s { get; set; } = default! idiom or the [NotNullWhen] attribute")

Adopted by

  • Google (used on a massive scale), Microsoft (some internal Azure components), Facebook, CloudFlare, Paypal, Dropbox, Uber,… Allegro
  • Stackoverflow survey shows 13% popularity level (a figure from 2023). In several years it surpassed all functional languages
  • Known in DevOps world for years: Docker, Kubernetes, Terraform, Prometheus, K6 are pure Go projects
  • Khan Academy migrated their platform (1M lines of code) from Python to Go (and although Go is much more verbose, codebase size increased only by 15%)

Preferred usage

  • Backends, microservices, APIs, serverless, cloud native - Go is often called “the language of the cloud”
  • CLIs, DevOps tools (tools compiled to a single executable, no runtime needed)

My proposed learning guide

Level 0

Level 1

Level 2

Level 3

Level 4 - intermediate stuff

Level 5

Level 6

How to learn

Remember an old programming community wisdom - learning how to program or picking up a new language is best done by doing small projects - not by reading or doing tutorials alone. Think up a tool, a game or a service and code it in Go - looking up missing elements as you go (no pun intended).

I hope my guide - suggested first steps - will point you to materials worth digging into.

Call to action

Learn Go.


Andrzej Nowik/2024.04.02v1.2
.