How Golang Interfaces Work

Interfaces are a tool that allows you to define the behavior of objects and in Golang, interfaces are no different (except that they work on structs instead of “objects”). However, Go has some strange features for interfaces that users from other languages might not expect. Let’s take it slow and start by defining an interface […]

Golang: What is a receiver function?

Classes aren’t really a thing in go, so you cant have instance methods (like Java or similar), however, you may have noticed some functions in Go that appear to be instance methods. These are Go’s receiver functions. The way they work is quite simple. If you have a struct like so: You could write a […]

Posted in GoTagged

Generating HTML from a List in Elm

Elm is a fantastic language for building web applications. It provides a rich DSL for writing HTML that functions in a similar way to JSX (but still quite different). Overall, I enjoy writing it, however, I often forget how to generate HTML from a list of data in Elm. Indeed, the problem is not that […]

Prompt the user for a rune at the terminal in Go

I’ve been spending a lot of my spare time working on a Go project called Deckard. It’s a command line interface (or CLI) for handling database schema changes. Recently, I found myself wanting to prompt the user for a rune before running a command in that CLI. Why would I do this? Deckard handles schema […]

Posted in GoTagged

Your application should not be responsible for Database Migrations.

A herd of animals migrating

Classic database/schema migration patterns are a nightmare for modern systems. As Software Engineers push for a more distributed ecosystem, one is tempted to ask: “Why should the code that manages one system, live with the application code of another system?” “But Brad, this is really convenient”. I agree that it is really convenient when you’re […]

What Is Gradle Scan?

Newly budding plants

A Gradle scan is a build scan that provides insights into how your build ran and why it did what it did. Once you’ve generated a scan, you can share that with other members of your team (or anyone who may help diagnose issues) via a URL. Here’s a sample scan! Creating a Gradle Scan […]