Design task at work. Would be so sweet to junk what we have at the moment, which is a rat’s nest of dodgy code and weird behaviours, with something new. Unfortunately, the deadline is tight so I think I’ll need to keep what’s already working. Also, there’s the second system syndrome to be aware of.

It’s great that MacOS comes with virtual machine support out of the box for Apple Silicon Macs. Makes this sort of notarisation testing so easy to do now. I’m using VirtualBuddy to create and manage these VMs, which is a really nice app.

Success! Managed to get a Go app built, signed, and notarised all from within a GitHub Action. It even cross-compiles to ARM, which is something considering that it’s using SDL. Here’s the test app being downloaded and launched in a VM (ignore the black window, the interesting part is the title).

For reasons that are “totally” coincidental to the news of the day, I had a quick check to see how much the domain Y would cost:

Screenshot of Porkbun prices for Y.co. Domains Y.inc for $3057.15, Y.xyz for $54583.41, and Y.pro for $2729.65 are available.

Hmm, might be a bit much for a joke domain. πŸ˜ƒ

Apple, please improve the error messaging of your code signing tools. Simply saying “specified item is not found” without saying what “item” is is borderline user hostile. You are not giving them the information they need to solve the problem. They’re left high and dry, which is not good.

To anyone who needs to know this: if codesign is throwing the error The specified item could not be found in the keychain, but you can see the certificate that you’re trying to sign with, just check that that certificate has the associated private key as well. The “item” not found might be that.

Spent most of the weekend going down various rabbit holes to get a Go application signed and notarised as a MacOS app. I’m trying to do this in a way that would make this easy to automate using GitHub Actions. This means things like no implicit access to the system keychain: I want to make a temporary keychain, add my secret stuff to it, then delete it once signing and notarisation is done.

It also means no XCode GUI either: command line stuff only. Not that I had much hope of using XCode here anyway, since this is a Go application.

But that’s fine, preferable even. I’ve never liked all the manual steps needed to get code signing work with XCode. What are you going to do when you change systems? Would you remember all the steps you took several years ago, when you last setup developer certificates?

So this is why I’m trying to get it working with the terminal. But it’s not easy. Lots of esoteric commands that I need to learn and be made aware of. Just hope it’s not a huge waste of time.

A really nice quality of life improvement you can make in Terminal.app: map Option-Backspace to ^W (Control-W, or \027) so that pressing it in the shell will delete one word to the left, like most other MacOS apps:

Key mapping preference pane within Terminal, with a new key mapping with the delete key and option modifier sends control W as text

Finished reading: Anything You Want by Derek Sivers πŸ“š

An intriguing book. I’ve never used CD Baby but I did hear of it, and it was interesting reading how Derek approached building it. Kind of good to hear that it was as unconventional as you would imagine a “tech startup” to be. Good read.

I have an Android phone so Apple Maps is a non-starter right now. But one thing that makes me consider Apple Maps is Google’s insistence of pushing bike and scooter shares when I ask for walking directions to somewhere. This just reeks of commercialism. Oh, and you can’t turn this “feature” off. πŸ˜’

John Gruber in his article about Llama 2:

Second, I’m glad to see Facebook drop their awkward β€œLLaMA” letter-casing style.

Reminds me of when I once worked at a company that sold a product called β€œProject MeNtOR”. The capitalisation was important: it was the only way in which the name could be trademarked. I didn’t have much to do with that product but I feel sorry for those that had to write the name in emails or marketing copy, or even the product itself (it was a delivery process, which means lots of binders with documentation). Hope they had a keyboard macro handy.

Closed my Plausible account and have gone all in with Tinylytics by Vincent. Not because Plausible was a bad service. Far from it. But Tinylytics gives me what I need, plus the additional good vibes of using something a fellow Micro.blogger built and released.

Nothing kills momentum on a task with a tight deadline quite like being ask to do admin stuff like “produce an estimate”. Now you’re scheduling meetings, going through tasks, setting story-points, etc. Argh! I mean, I understand why: we’ve all got someone to report to (unless you own the business). But all this effort sucks up the time that we could use to actually do the work.

Found some really nice things about Netlify today.

I learnt that you can write server-side functions in Go. I knew that JavaScript functions were supported but I had no idea that Go was a possibility. This excites me as Go is my favourite backend language.

From my testing it looks like the build will use a go.mod file for dependencies if one exists in the project root directory (i.e. the repository directory), so you can include third-party packages. Embeds also seem to work as well.

The functions are executed using AWS Lambda. You can use aws-lambda-go-api-proxy if you prefer to use http.Handler from the standard library:

func helloHandler(w http.ResponseWriter, r *http.Request) {
    w.WriteHeader(http.StatusOK)
    w.Write([]byte("Hello world"))
}

func main() {
    adapter := httpadapter.New(http.HandlerFunc(helloHandler))
    lambda.Start(adapter.ProxyWithContext)
}

I also learnt that you can protect individual sites with a password, so if I ever want to deploy something for myself, I don’t have to roll my own authentication. This is a paid feature, but you know what, Netlify has been pretty good at hosting my other sites for free it’s probably worth signing up for a pro account.

Thinking about Manton’s post about bookmark tags reminds me of a bit of UI I built for that admin tool I worked on way back when. It was in a section where the user would manage a set of file extensions associated with meteorology products1 that should be backed up for operational purposes.

It looks something like this:

Wireframe of dialog, with two fields. The top field a text field with the label file extensions, and the bottom three radio buttons: add to existing file extensions, remove from existing file extensions, and set to existing file extensions.

It will appear when the user has selected a bunch of products from a list, and clicked a button labelled “File Extensions”. The user can enter as many file extensions in the text field as they wished, separated by commas. The operation radio button determines how these will be merged with the product’s original set of file extensions. They’d either be added to the set, removed from the set, or the set will be replaced with the extensions entered here. Pretty basic stuff.

And yeah, it’s by no means a revolutionary bit of UI, and it didn’t do anything groundbreaking. In fact, I’m not sure if it was even used. I did write about it in the help docs, but who reads the manual anyway? πŸ˜‰

And yet, I remember being pretty glad after building this. I guess because the alternative would’ve been not to make it possible to manage file extensions in bulk at all. Working with software tools today where you can’t do anything in bulk drives me up the wall, and adding the ability to do so here felt like a bit of a statement.


  1. Examples of products included observations, forecasts, radar images, etc. ↩︎

Lava Stream

Another random hack today, but this one sort of developed over the week.

It all started last Monday. I was doing an exploratory task around single-sign on. I read Scripting News that morning, and I was thinking about the style of writing Dave Winer has adopted for his blog: short notes made across the day, sort of like a running commentary on what he’s working on and what his thinking. I wondered if this would work for my job: having a way to write your thoughts down, even if they’re rough, so you can build atop them. Also works when you need to look back on what you were thinking or working on later on.

I’ve got an Obsidian vault for my work notes, and I do use the Daily Notes feature quite a bit, but it’s not conducive to the type of running-commentary style of journaling I wanted to see. There is this hosted solution, called Memos, which could work. It’s a bit like a Twitter-like blogging platform but with the ability to keep them private.

So that Monday I deployed an instance using Pikapod, and used it for my work. I did the job, in that I had a place to jot notes down as they came to me. But despite how well the app feels, it did have some shortcomings.

The first is the whole split-brain problem with having two places to write notes: where should I put a thought? Really they should go in Obsidian, as that’s where all my other notes are currently. And although I trust Pikapod and Memos to be relatively secure, notes about what I do for work really shouldn’t be on an external server. This became evident on Tuesday, when I wrote this note in Memos:

Something similar to what this is, except each note goes into the daily note of Obsidian. Here’s how it will work:

  • Press a global hot key to show a markdown notepad
  • Enter a note, much like this one.
  • It will be written to the Obsidian daily notes, under the “Notes” header

Nothing happened Wednesday, but Thursday I decided to explore this idea a bit. So I whipped up something in XCode to try it out. Here’s what I’ve got so far:

The main window of the project, with a text field at the top, the date in the middle, and a series of notes with timestamps on the bottom.

The way it works is you enter a note in the top pane (which is just a plain text editor) and press Cmd+Enter to save it. It will appear in the bottom pane and will be written to the daily note in your Obsidian vault.

An Obsidian Daily Note with the same notes that appear in the main window written out under a Notes header

The notes are written to Obsidian in HTML. At the moment you also need to write the notes in HTML, but I’m hoping to support Markdown. It would be nice just to write the notes out as Markdown in Obsidian as well, but I want some way to delineate each note, and HTML seems like the best way to do so. Each note is basically an article tag with a date-stamp:

<article>
  <time datetime="2023-07-13T01:45:57Z">[11:45:57 am]</time>
  This is a pretty stupid app, but might be useful. Will save me the need
  to run that notes service.
</article>

But sadly Obsidian doesn’t parse Markdown content within HTML tags. That’s understandable, I guess, but it would be nice if this changed.

Anyway, we’ll see how this works. I’m calling this little hack Lava Stream at the moment, as an allusion to the geological meaning of Obsidian. And it’s meant to be a way to be an easy way of capturing thoughts, like a stream, of thoughts, into Obsidian… (get it?)

Like most Random Hacks here, I’m not sure how long I’ll use it for1, or whether it’ll go beyond the pile of awful, crappy code it currently is, not to mention the ugly styling. I’ll spend more time working on it if I continue to see value in it. That’s not a given, but I think it shows promise. I’ve been thinking about something like this for a while, but the concern of storing work-related things on another server seemed like the wrong thing to do. Having a means of writing this way, with using Obsidian as the data store, seems like a pretty good way of doing this.


  1. I am still using that Lisp-based Evans wrapper I mentioned last week. ↩︎

Oof, took me an extra hour to get into work due to train issues. At least I got a walk out of it. I feel for these poor souls, stuck on the train until the problem gets fixed.

People on a stationary train on a bridge.

Amazing how time just grinds almost to a halt when you’re stuck on a train because of signal failure.

I met someone I used to work with at the supermarket today. I’m terrible with names, and it’s been more than a decade since I’ve seen her, so I couldn’t remember her name at the time. I recalled something from my memory just now and a LinkedIn search confirmed I got it right. Little victories today.

Oh great, now I need to upgrade my Gradle plugin just because I want to debug my app instead of just run it. How do people make forward progress in Flutter apps if they spend all their time upgrading things in their toolchain or replacing working code because they need to use a different package?