All tagged Go

Slow, flaky, and failing

Thou shalt not suffer a flaky test to live, because it’s annoying, counterproductive, and dangerous: one day it might fail for real, and you won’t notice. Here’s what to do.

Rust vs Go in 2025

Which is a better choice, Rust or Go? Which language should you choose for your next project, and why? How do the two compare in areas like performance, simplicity, safety, features, scale, and concurrency?

Constraints in Go

Freedom is nothing without constraints, and Go’s generics gives us a powerful way to build polymorphic types and functions constrained by type sets. Let’s geek out.

Generic types in Go

What kind of idiot would carry a package for someone when they've absolutely no idea what's inside it? Well, generic types in Go are exactly like that, only in a good way.

Programming is fun

I was a guest on the Cup o’ Go podcast recently, talking with Shay Nehmad and Jonathan Hall about writing and teaching Go. Here’s a transcript of our chat.

Encrypting with AES

AES is an amazing, state-of-the-art encryption system, and it’s built right in to Go as part of the standard library. It’s also incredibly easy to use. Let’s see how!

Iterators in Go

Iterators in Go are a neat way to write “lazy loops”, where we never generate more results than we actually use. Let’s see what that would look like in Go programs, and what new facilities it gives us in the standard library.

Shameless green

Building software is easy when we’re guided by tests, because we can start with quick-and-dirty solutions, without worrying about whether the code is elegant and readable—yet. Let’s see how to use the TDD technique called “Shameless Green”.

Implementing AES in Go

The AES cipher is complicated in principle, but the code isn’t all that scary in practice. Let’s take a look at the implementation in the Go standard library. Even I can understand it!

Test names should be sentences

Tests communicate a lot of information, to readers, other developers, and even our future selves. Well-written tests focus on a single unit of behaviour that can be described in a brief sentence, and we can use that sentence as the name of the test.

Programming with confidence

There’s an easy, pleasant, and reliable way to build software in Go, guided by tests. Let’s find out what it’s like to program with confidence, in the first part of this TDD tutorial series.

Type parameters in Go

Now that generics have come to Go, let's take a look at the new syntax for type parameters. We’ll find out why we need type parameters, how we write them, and how we can use them to create generic functions in Go.

Generics in Go

Generics what now? This friendly, down-to-earth tutorial series explains how Go’s generic functions and types work, why we need them, and where we can use them.