I’ve always enjoyed the concept of Go (perhaps as a result of being a C/C++ diehard prior to discovering Go): the performance, the clarity, the explicitness, the type system, the formatter. I get that it’s maybe not the “best” at any of those things but it’s pretty good at all of them which counts for something.

But in the pre-LLM days, I felt like Ruby (and Rails) was the easiest language to move quickly in. Most of my personal life scripts (e.g. finance helpers) or apps, for example, are in Ruby. It reads well, it is (perhaps overly) flexible, it is easy to flow in.

For the past few personal/side projects I’ve built I’ve leaned towards Go. Partially because I’m not writing much code by hand for these, and so typing all the error handling no longer bothers me (I actually have alt-enter setup to insert if err != nil { return err } in emacs when in go-mode…).

I’ve learned (or re-learned/remembered) a few interesting things.

One, deploys are so fast. The time from hitting deploy to it being live is like 2-3 seconds (a big difference from the webpack/front-end pipeline that seems to take forever to get something live). This makes the “should I release this” determination almost free, no longer “eh let me wait for the next branch to merge”. I can deploy via the CLI with ready-deploy and it’s live a couple seconds later.

The second is that it’s fast! There’s a time and place for SPA/react apps, and I’ve had projects where I’m glad I went down that route. But for normal interactions, the server-side rendered page loading in 30ms feels equally “responsive” as frontend. And HTMX is a nice way to sprinkle those interactions on top. I’m really digging the “power x simplicity” curve here.

I also have learned a few new things. I’ve used embed.FS before for assets, but one cool pattern that Claude suggested was to embed a runner into the primary binary. So for example, we build the backupOK runner and the backupOK web app and embeds the runner into the web app so that you can download it at backupok.co/download/runner. This means that deploys are in “lockstep” versus pushing this manually to a CDN or other asset file. (Obviously you could commit this or build it in the asset pipeline in JS or Ruby too, but something about embedding it just feels more natural. It’s an asset, but not in the traditional sense.)

Strangely (or perhaps as a result of “when all you have is a hammer everything looks like a nail”), I’ve had this “app” plus “runner”/“daemon” split on 4 different projects I’ve worked on in the past 3 months.

Shameless related plug: ready.dev is perfect for this use-case. You can deploy the app in one project as normal, create an API key scoped to just the “my-app-runners” project, create a base image that installs the daemon/runner, then use the API from the web app to spawn runners and inject the config in (e.g. with a callback URL or one-time keys etc). It’s just:

  curl -X PUT https://ready.dev/api/resources/my-app-runners/runner123 \
    -H "Authorization: Token $API_KEY" \
    -H "Content-Type: application/json" \
    -d '{
      "resource": {
        "resource_type": "manual_instance",
        "instance_config": {
          "base_image": "my-runner-base",
          "cpu": 2, "memory": 2.0, "storage": 10,
          "injected_files": [
            {
              "path": "/srv/config.json",
              "content": "{\"postback_key\": \"12345\"}"
            }
          ]
        }
      }
    }'

The pattern of having a base image with a systemd unit that auto-launches and watches for config changes works really well for all “run and respond” things. The PUT is idempotent so updating or changing it uses the same command.

This makes a “VM per user” pattern (which is increasingly important with agents and handling user data safely) incredibly easy. And now, apparently, I can’t stop hitting this nail…