One temptation of shell scripting is reusing other people's code

Designing Pythonic library APIs

Principles I've found useful for designing good Python library APIs, including structure, naming, error handling, and type annotations.

A retrospective on my thesis about language niches, fifteen years later

Writing a Go fuzz target

Let’s continue our exploration of fuzz testing in Go with a look at how to write a fuzz target for a (nearly) realistic function. This time we’ll try to detect a common kind of bug involving a confusion between runes and bytes.

Writing a Go fuzz target

Let’s continue our exploration of fuzz testing in Go with a look at how to write a fuzz target for a (nearly) realistic function. This time we’ll try to detect a common kind of bug involving a confusion between runes and bytes.

Plugins case study: Envoy WASM extensions

Envoy is a configurable proxy that serves a prominent role in modern cloud-native projects; for example, it's used in many k8s deployments to provide inter-service communication (through Istio). In this post, I'd like to describe Envoy's extension mechanism as a case study of usi...

Introducing `openapi-sorbet`, a command-line tool for generating Sorbet types from OpenAPI

For a couple of the Ruby on Rails applications I work on at work, we use Sorbet for type checking. Late last year we were integrating a JSON Schema based Lambda with the Rails application, so needed to create models to interact with it. I started hacking on a command-line tool to...

Getting a `--version` flag for Cobra CLIs in Go

In my post Getting a --version flag for Cobra CLIs in Go, built with GoReleaser I wanted to add a --version flag to my Go command-line tools. However, I noted that this solution only works when using GoReleaser, and doesn't work when built from source. Fortunately this week Carla...

That people produce HTML with string templates is telling us something

How to include Git version information in Go

TL;DR: Just import github.com/carlmjohnson/versioninfo and use versioninfo.Revision to automatically include a Git hash in your Go application. Curious how it works? Want to make your own version info package? Read on. In previous blog posts, I’ve written about how you can inc...