State of the Thing, Spring 2022

The sun rises higher in the sky, the air warms, and I say to myself, “I'll go for a run.” On that run I remember I haven't exercised in over four months. That's probably why I've felt restless some nights and deflated some days.

On one of the restless nights I say to myself, “I haven't built anything in over a year.” That's not strictly true, I've been building relationships, a team. But I haven't written code in a long time.

The lack you feel from not building does not announce itself. It shows up as weariness and a little angst.

The curse of growing older is that you remember the peaks long after you've descended from them. The biggest hurdle, with exercising, with coding, is to just get out there and do it, even though you won't be performing at your highest level. “I have all this other stuff to do and I don't have time to make anything cool,” says your out-of-shape mind.

A morning when I run at all is a good morning. Same goes for programming.

So I sat down to write a program that prints out how many pull requests per engineer we've shipped in the last two weeks. A very pointy-haired-boss kind of program.

Most all of my time went to getting what I wanted from APIs. You have to figure out how to authenticate. Which library should I use? Can I connect? Oh good, is there an example that matches what I want to do? No? Okay, let me look at the source to see what parameters I can pass into this function that might do what I want.

By the end, I had four or five tabs open per API. Finding the right tab, copying the right code, and remembering what I had already tried presented the biggest cognitive load. Seeing function signatures floating next to the code helped some, but not to the point where I could stay entirely in the editor.

Basically I had to brute-force my way to working code. I've done this hundreds of times over the years. Enough to not want to bother (which leads to restlessness and angst), but also enough to know how to do it, when to stop pulling on a thread. Navigating this world is much, much harder if you're just starting out. How do you even know if you're making progress?

The code I write these days is also brutal. I don't care about duplicating small snippets. If I need to remember what some value is I'll assign it to a variable with a boringly descriptive name. Iterating over every element in a data structure sure beats spending time on clever traversals.

Taking the ungainly ways people actually write code and speeding them up is where the action's at.

N.B. Do not ask me why counting pull requests in private repositories means you have to grant the GitHub personal access token an OAuth scope to manipulate any of your repositories!