On Bloat
I recently got sent the slides for a talk titled On Bloat by Rob Pike, that can be found here. I don’t know the origin of the talk or what the intention was and only have the slides to go by.
The presentation makes the superficial observation that hardware has become significantly faster since the first mainframes yet software does not feel like it has utilized those gains well. Computers don’t boot instantly. Logging into your bank has some noticeable latency, etc.
Think Before Typing
One of the primary skills I try to impart to people that I mentor is to "think before you type". This is obviously not a new idea but I suspect, with the proliferation of LLMs to write code, that stopping to think will be a rarer skill in software engineering.
An analogy I use is that coding is like getting from A to B. You don’t start going in a direction until you know which direction you need to go. You need to understand where you want to be before even any automation can help you.
Match Tag/Query Pattern
This week I implemented a pattern I find myself reaching to quite often. I call it the Match Set/Query Pattern.
The pattern is simple and requires two elements:
-
Associating a piece of data with a Match Set. The match set describes the data, usually key-value, like a database. Maybe for a person you have
first_name = John
,last_name = Adams
,occupation = President
. -
Defining a small Match Query language for performing queries on the match set. Something like
first_name = John or occupation = Farmer
.
Design Needs More Brutalism
I was trying to use the mobile Google Authenticator app today and I couldn’t read the entire name of the last code I have installed because of the stupid floating "+" button.
The reality is, I sort of know which codes I have installed so I knew which one it was but it struck me: someone thought it was a good design system to have something that obscures the data the user is trying to look at. The Gmail app is another offender, here. The button to create a new email is floating over the list of email’s I’m looking at and obscuring the subject line. I have to scroll my email list in order to read it.
Discord
I created a Discord server. To join follow the link below.
In Defense of -target
Warning
|
Martin Atkins wrote a comment on reddit going into detail about how and
when -target can get you into sticky situations. I have added it to the
bottom of this post and linked out.
|
I’ve been, rightly, downvoted in r/terraform for recommending using -target in production. I say "rightly" because I know it’s a controversial suggestion and I’ve just sort of dropped it like a bomb without defending my position. So here is my defense.
As Configuration
Mitchell Hashimoto post As Code this week reflecting on what "as code" means to him. Different from the popular interpretation of being literal code, his view is that the "code" in "as code" is a 'system of principles or rules", like a "code of ethics". The poor guy has probably been the target of angry emails for a decade.
My experience in the Infrastructure-as-Code world has been that a lot of people
do take the "as code" a little too literally. Usually it’s being strict about
workflows, like dogmatically insisting we should do apply-after-merge
because
that’s closer to the workflow for application code. While I don’t 100% buy
Mitchell’s post, Terraform is clearly trying to make infrastructure management
more like a programming experience, I agree with the sentiment.
Is the Unix Philosophy Still Taught in School?
The Unix Philosophy defines a culture of how to write tooling in the Unix world. At its core, the Unix Philosophy is about designing tools that work together. A consequence is that there must be some rules or convention such that programs can communicate. The power of the Unix Philosophy is that it lets us both automate our workflows and also build more sophisticated and powerful solutions by combining tools. The most common conventions in the Unix world are:
retry: My Favorite API
I like an API that captures a problem and expresses it concisely. I imagine this is how mathematicians feel when they create a beautiful proof. I’ve always enjoyed a good API but it wasn’t until I worked with one of my best friends, who has a background in type systems, that I really started to appreciate what it means to create a good API.
I have a bunch of APIs I like but probably my favorite is retry
, which I’ve
implemented in several languages.
Siren Call of SQLite on the Server
At Terrateam, we are big fans of Fly.io. The service is hosted there and it’s served us well. Just deploy your TOML file, get your infrastructure, do something else with the rest of your day.
One of the interesting sides of Fly is that they invest heavily in server-side SQLite. They’ve written a number of blog posts on how they enable server-side SQLite:
-
I’m All-In on Server-Side SQLite - Ben Johnson, the author of BoltDB, joins Fly to work on Litestream, a SQLite replication solution.
-
Introducing LiteFS - The introduction of LiteFS, which is a FUSE file system designed to replicate SQLite transactions over the network.
-
LiteFS Cloud: Distributed SQLite with Managed Backups - Introducing backups and restores for LiteFS.