There are multiple ways to deal with non-application dependencies (i.e. “tools” that your project needs). 

 go tool 

 As of Go 1.24 (Feb 2025) 

 To add a new tool: 

 go get -tool golang.org/x/lint/golint
go get -tool github.com/mgechev/revive@latest
 

 To run the tool: 

 go tool golint -h
go tool golang.org/x/lint/golint…
If you work on muliple Go projects, you’ll often find they require
different Go versions. So how do you handle switching between Go versions? 

 You can’t rely on your package manager as it might only provide the latest
version of Go (such as is the case when using Homebrew on macOS) or it might
not provide all prior Go versions (maybe only a subset). Then you have…
Goroutines 

 The go keyword is used to start a goroutine. 

 A goroutine is a lightweight, managed thread used by the Go runtime to run
functions concurrently. 

 Unlike OS threads, which have a fixed stack size (often around 1MB), goroutines
start with a very small stack, around 2KB, and can grow or shrink dynamically as
needed. This makes it possible to run…
In the below Go file we use bitwise operators to manipulate individual flags (on/off switches) in a single integer, where each bit position represents a different status. 

 First we’ll look at the code, and then we’ll explain how it works: 

 package main

import (
 "fmt"
 "strings"
)

// Define bit flags as constants, where each status is…
So you’ve heard about computing at the edge, and you’ve heard that Fastly 
let’s you run JavaScript, Go, Rust and any other language that compiles to
Wasm at the edge… well, let’s take a look and while we’re at it let’s try and
understand how caching works there too. 

 Getting started 

 OK, first thing you’re going to…
The following code doesn’t do what you might expect: 

 package main

import "fmt"

func main() {
 var i *impl

 fmt.Println("i == nil:", i == nil)
 what(i)
}

type impl struct{}

func (i *impl) do() {}

func what(i interface{ do() }) {
 fmt.Println("i == nil:", i == nil)
}
 

 If you expected the what…
Summary 

 In this post I cover what CI/CD means and how you can achieve it across multiple
different environments (e.g. dev, stage, prod) using the GitHub Actions
platform. The infrastructure is managed using Terraform and the state is
coordinated using Terraform Cloud. 

 I detail specific issues I experienced while implementing CI/CD for a…
Introduction 

 In the rapidly evolving landscape of software development, creating robust and user-friendly APIs has become essential. One tool that has gained immense popularity for designing, documenting, and testing APIs is OpenAPI. 

 In this comprehensive guide, we’ll explore why OpenAPI is so important, how to write an OpenAPI document, and the key sections you need to…
You have an API and you want your customers to be able to use that API via Terraform . In this post I’m going to explain how you can write your own Terraform provider to enable your customers to integrate your API into their “infrastructure as code” pipeline. 

 You don’t need an API to be able to follow along, nor am I going to make you write one as part of the…
Introduction 

 This is the second edition to “New Laptop Configuration” . 

 Backup 

 When moving laptops I will temporarily backup my existing GPG and SSH keys (encrypted) to an external data storage device. 

 We start by making a directory to hold the files temporarily: 

 mkdir /tmp/keys
 

 Next I start backing up my GPG data:…
Installing Go 

 All versions of Go are available to download here: https://go.dev/dl/ 

 The installation directory will be: /usr/local/go . 

 Once you have Go installed, you can then use the go command to either install go based tools/binaries or other versions of Go. 

 💡 TIP Additionally, you can automate the install via a terminal using the following shell…
UPDATE November 2022 

 Not long after I wrote this post I had switched from VimScript to using Lua and also making large sets of changes and tweaks to my configuration. The source of truth is: 

 https://github.com/integralist/nvim (which is a submodule within https://github.com/integralist/dotfiles ) 

 This post is being kept for posterity, but ultimately I would…
I’ve been around the houses on this problem long enough, and after many years of trying various tricks and having them fail I decided to document an actual working solution. 

 
 Install a terminal that has good colour support (e.g. Alacritty ) 
 Install a better Vim (i.e. Neovim ) † 
 

 ℹ️ INFO † This should still work with standard Vim, but actually Neovim has…
I don’t know who needs to hear this but: 
 I love my developer tools . 

 Core 

 
 Package Manager : Homebrew 
 Terminal : Ghostty 
 Code Editor : Neovim 
 

 History 

 
 Used stock macOS Terminal.app with tmux 
for 10+ years. 
 I tried iTerm2 ,
 Kitty , Alacritty ,
 WesTerm but none really fit well for me. 
…
This is my own personal style guide for Go. 

 Reference Materials 

 The following reference materials are my ‘go to’ whenever I’m unsure of something (they’re mostly official resources). 

 
 Project structure 
 Effective Go 
 Code Review Comments 
 What’s in a name? 
 Commit messages 
 Comments 
 Slice Gotchas…
💬 CITE GitHub Actions makes it easy to automate all your software workflows, now with world-class CI/CD. Build, test, and deploy your code right from GitHub. 

 I’ve been using GitHub Actions a lot recently and I’ve found it to be immensely flexible and feature rich. I think it’s well worth your time learning how to run your CI/CD pipelines via GitHub Actions, and in…
I see a lot of posts on Vim ‘tips and tricks’ and decided I’d have a go at putting together my own list of things that don’t typically see the light of day, but are super powerful and useful to know about. 

 ❗ IMPORTANT I want people to realise that they don’t need super complex Vim configurations with lots of third-party plugins, and this entire post is…
I’ve been learning Rust recently. This will probably be my third (lazy) attempt to learn the language. The reason I’ve failed previously is simply because I had no reason to learn it. 

 Other than the memory safety aspects, which I like a lot, I don’t actually like the design of the language at all (but that’s a conversation for another day). 

 This time…
I’m going to walk you through how to understand reflection in Go using the reflect package. We’ll do this by looking at an open-source package I created called go-flags that utilizes reflection heavily . 

 The use of reflection is often frowned upon because it side steps the ‘compile time’ type safety we get in Go. So I’ll also explain how we can still ensure…
When writing software you will inevitably need to choose an external code library to assist you with some specific feature or behaviour. 

 You’re also likely to discover that there are many tools available that claim to solve the same problem. So how do you choose which one to use? 

 You should carefully compare the value of each individual tool that is under consideration,…
What is Rate Limiting? 

 Rate Limiting is a technique used to control the rate of requests received. 

 It exists to help online services to stay up and running even when clients of the service are issuing lots of requests. 

 Think of an API such as the GitHub API . If they didn’t rate limit their clients, then it’s very possible a single client could consume…
Introduction 

 There are many version control systems, but git is undoubtedly the most popular, and regularly used, thanks to online social platforms such as GitHub and GitLab . 

 Yet, it is a tool that is still vastly misunderstood and feared. In this post I aim to take a look at some of the internal moving parts of git, primarily what’s inside the .git directory (inc the…
Introduction 

 In this post I wanted to discuss a relatively simple, but important topic: Context Managers. I want to cover the what, the why and the how. 

 Summary 

 
 Content Managers abstract away ‘clean-up’ logic. 
 Define a class with __enter__ / __exit__ methods. 
 The __enter__ method is similar to a try block. 
 The __exit__ method is…
In this post I’m going to be talking about what a generator is and how it compares to a coroutine, but to understand these two concepts (generators and coroutines) we’ll need to take a step back and understand the underlying concept of an Iterator. 

 Each section leads onto the next, so it’s best to read this post in the order the sections are defined. Unless…
Introduction 

 I was confused by the Python tool tox for a long time, and was unsure what it was really used for considering lots of different Python packages appeared to rely on tox’s configuration file (e.g. tox.ini ). 

 In this post I’m going to briefly explain what the tox tool is, and what a tox.ini configuration file looks like and why that configuration file…
Introduction 

 This blog post aims to demonstrate the most practical way to install multiple versions of Python, and of setting up ‘virtual environments’ for macOS userso 

 We’ll also dig into how to manage our project dependencies (e.g. we’ll be discussing the classic Pip and requirements.txt format) + our approach for avoiding newer tools such as Poetry…
This is a quick guide to Python’s asyncio module and is based on Python
version 3.8. 

 Introduction 

 So let’s start by addressing the elephant in the room: there are many modules
provided by the Python standard library for handling
asynchronous/concurrent/multiprocess code… 

 
 _thread 
 threading 
 multiprocessing 
…
I found myself recently trying to recall specific details of how slices work when needing to do something that meant I wanted to not mutate the underlying array data structure of the slice I was working with. 

 Now the reason for why I wanted to do that isn’t important. What’s motivating this write-up is my want for a good reference document (not saying the official go blog…
Privacy is becoming more and more important in our modern world. We’re constantly tracked and having our movements sold to advertisers. 

 Even more so our privacy becomes a necessity if we find ourselves doing things that could get us arrested (or even killed), such as being a journalist or a whistleblower. 

 I am lucky enough to not suffer from such necessity, but wherever…
Introduction 

 Caching is hard. Let’s try and understand it a little better. 

 ℹ️ INFO some sections are purposefully brief. I’m not aiming to be a specification document. 

 Caching at multiple layers 

 Caching can occur at both a ‘client’ level and a ‘cache proxy’ level. 

 Consider the following request flow…
Introduction 

 I’m an engineer with a new laptop, which requires setting up with various
development tools and configuration. This post is my attempt to capture and
document my process for getting a new dev environment set-up. 

 I used to try and automate a lot of this with bash scripts, but realised over
time that things go out of date quite quickly (e.g. OS…
Introduction 

 There are times where you might be working from a particular git branch and need to quickly jump over to a different branch to do some urgent work. 

 Typically you would need to first git stash anything you were working on (as it’s unlikely to be in a state where it can be committed), and then you’d have to leave your current branch to create a new…
In this post I’ll be demonstrating a few common algorithms using the Python language. I’m only covering a very small subset of popular algorithms because otherwise this would become a long and diluted list. 

 Instead I’m going to focus specifically on algorithms that I find useful and are important to know and understand: 

 
 Sorting 

 
 Merge…
Introduction 

 I was asked on twitter recently about how I am able to be successful and impactful at an organization as a remote worker. What follows is a run down of how I work remotely, and how it has changed over the last seven years. 

 This is not a “rules for how you should do remote working” but more so a single perspective on the problem of remote working and…
Introduction 

 Mocking resources when writing tests in Python can be confusing if you’re unfamiliar with doing such things. In this post I am going to cover various aspects of mocking code, which will hopefully be a useful resource for those who are a bit stuck. 

 ℹ️ INFO in the code examples I’m using pytest , but for the most part that shouldn’t matter.…
Introduction 

 This post includes a condensed version of the information gleened from the excellent interactivepython.org section on algorithm analysis. I strongly recommend you read that if you require more detailed information. 

 The purpose of this post is simply to restructure and simplify the principles offered so I can use it as a quick reference for future practice.…
Introduction 

 In this post we’re going to review some different algorithmic time complexities. Let me begin by clarifying, when I say ‘algorithm’ I mean: ‘logic written in code’ and when I say ‘operation’ I mean: ‘a unit of code was evaluated’, and that operation could be something as simple as x + y . 

 Asymptotic Analysis…
In this post we will be looking briefly at, and at a high-level, the various data types and data structures used in designing software systems, and from which specific types of algorithms can subsequently be built upon and optimized for. 

 There are many data structures, and even the ones that are covered here have many nuances that make it impossible to cover every possible detail. But…
Introduction 

 This post is going to cover a few tools and features I plan on using when writing Python code in 2019. 

 💡 TIP † read my post “ Python Management and Project Dependencies ”. 

 Type Hints and Static Analysis 

 Some languages are weakly typed (JavaScript), some are strongly typed (Python) and some are statically typed (Go, Rust). Being…
Introduction 

 This post will explain how to set-up and configure the various tooling necessary in order to be able to write cross-compatible modern (ES2015+) JavaScript code. 

 💡 TIP if you’re unsure of what ‘modern’ JavaScript looks like, then I’ll refer you to these compatibility tables . 

 The tools we’ll be using: 

 
…
You’re a software engineer with many years of technical experience, and you’ve decided you want to kickstart the process of working towards becoming an ‘Engineering Manager’. 

 So what do you need to know? Let’s discuss… 

 Roles 

 As a software engineer you have a few different paths available to you for career progression: 

…
Introduction 

 This post will explain a little bit about a particular type of interview: an architecture interview. It’ll breakdown what it is, why using whiteboards isn’t necessarily a bad thing to use in an interview context, as well as understanding a bit about what it is we’re looking for from a particular candidate (in this post the information will be related to…
💡 TIP for those short on time: here’s the Post-Mortem Template 

 What is a post-mortem? 

 When you have a service outage, or any form of unexpected service disruption, you first resolve the issue and then proceed to discuss what happened, why and how. 

 The process of discussion is referred to as a ‘post-mortem’. 

 How do we make post-mortems…
So this post is a long time coming. It has been pushed to the forefront by the fact that BuzzFeed recently held its annual ‘Hack Week’, and riding on the wind of a massive success I’ve had with my hack project this past week… 

 💬 CITE “Mark has casually saved the company $60k a year by letting us break away from a commercial dependency without losing any…
This post is going to explain the importance of interfaces, and the concept of programming to abstractions (using the Go programming language), by way of a simple example. 

 While treading what might seem like familiar ground to some readers, this is a fundamental skill to understand because it enables you to design more flexible and maintable services. 

 Interfaces in Go…
It seems most people are either talking about “monolith applications” or “micro services”. But recently I’ve noticed yet another new buzzword bubbling up across the internet: “mini services”. 

 It’s worth mentioning that this isn’t a post about which pattern is the most appropriate to use, as they’re all appropriate to use, when…
Introduction 

 In this post I would like to introduce you to the AWS
Cognito service, and to explain its various
moving pieces and how they fit together. 

 If you’re interested in a very high-level view of what I was working on, then
 this architecture diagram should give you the basic
idea. 

 Effectively I co-designed and implemented a new…
What is a 1:1 ? 

 A 1:1 (“one to one”) is a meeting between a manager and a ‘report’. 

 What is a ‘report’ ? 

 A ‘report’ is a member of staff of which the manager is responsible for. Specifically the manager is responsible for that person’s happiness at the company and their career progression. 

 How…
💡 TIP Related information: Project Planning . 
Includes specific documents needed and also an example matrix
spreadsheet . 

 Introduction 

 If you’re a technical lead (aka engineering lead, lead developer, etc), then there comes a time where you’ll be put in charge of a project. 

 You may also already be quite familiar with the process (read: red…