🔗 Pika

Seeing this makes me want to try it. I think I have a problem: I want to try all of the blogging CMSes. But I have no need for it now, so I’ll just keep a link to it here for later.

Github Actions, Default Token Permissions, And Publishing Binaries

Looks like Github’s locked down the access rights of the GITHUB_TOKEN recently. This is the token that’s available to all Github actions by default.

After taking a GoReleaser config file from an old project and using it in a new one, I encountered this error when GoReleaser tried to publish the binaries as part of a Github Release:

failed to publish artifacts:
could not release:
PATCH https://api.github.com/repos/lmika/<project>/releases/139475588:
403 Resource not accessible by integration []

After a quick search, I found this Github issue which seemed to cover the same problem. It looks like the way to resolve this is to explicitly add the content: write permission to the Github Actions YAML file:

name: Create Release

on:
  push:
    tags:
      - 'v*'

# Add this section
permissions:
  contents: write
  
jobs:
  build:
    runs-on: ubuntu-latest

And sure enough, after adding the permissions section, Goreleaser was able to publish the binaries once again.

There’s a bunch of other permissions that might be helpful for other things, should you need it.

In lieu of sharing my Vision Pro review, let me share with you my Visual Ear Worms list.

So apparently I can’t even look at the album cover of “Tubular Bells 2” without having it play in my head.

Defense contractors should lean in to what they do in their recruitment ads. None of this “explore growth opportunities” fluff. Go with something like “Love blowing stuff up? We’ve got the job for you!”

It takes me longer to come up with half-baked tools for writing Jira tickets than to just write the Jira tickets. I still think of making them though. Because I just can’t stand writing Jira tickets in Jira.

Learnt two things about the Vision Pro buying experience from a colleague today:

  1. You’ll need an iPhone. Guess that rules me out (well, that plus I’m not in the US)
  2. The thing that scans your face is actually an App Clip, which is the only case I’ve heard of one being used in a non-demo way.

More YouTube watching this evening. These three videos about scam Chrome plugins were amusing and, I guess, a good argument for human curation of these “marketplaces”. Kinda pains me to say that. I wish it wasn’t so. 📺

Thoughts on The Failure of Microsoft Bob

Watching a YouTube video about Microsoft Bob left me wondering if one of the reasons why Bob failed was that it assumed that users, who may have been intimidated by a GUI when they first encountered one, would be intimidated for ever. That their level of skill will always remain one in which the GUI was scary and unusable, and their only success in using a computer is through applications like Bob.

That might be true for some, but I believe that such cases are a fewer representation of the userbase as a whole. If someone’s serious about getting the most out of their computer, even back then when the GUI was brand new, I can’t see how they wouldn’t naturally skill up, or at least want to.

I think that’s why I’m bothered by GUIs that sacrifice functionality in leau of “simplicity.” It might be helpful at the start, but pretty soon people would grow comfortable using your UI, and will hit against the artificial capabilities of the application sooner than you expect.

Not that I’m saying that all UIs should be as complex as Logic Pro for no reason: if the domain is simple, then keep it simple. But when deciding on the balance between simplicity and capability, perhaps have trust in your users’ abilities. If they’re motivated (and your UI design is decent) I’m sure they’ll be able to master something a little more complex.

At least, that’s what this non-UI designer believes.

Build Indicators

AKA: Das Blinkenlights

Date: 2017 — now

Status: Steady Green

I sometimes envy those that work in hardware. To be able to build something that one can hold and touch. It’s something you really cannot do with software. And yeah, I dabbled a little with Arduino, setting up sketches that would run on prebuilt shields, but I never went beyond the point of building something that, however trivial or crappy, I could call my own.

Except for this one time.

And I admit that this thing is pretty trivial and crappy: little more than some controllable LEDs. But the ultimate irony is that it turned out to be quite useful for a bunch of software projects. 

The Hardware

The build indicator light shield, on top of an Arduino.

I built this Arduino shield a while ago, probably something like 2013. It’s really not that complicated: just a bunch of LEDs wired up in series to a bunch of resistors atop an Arduino prototyping shield. The LEDs can be divided up into two groups of three, with each group having a red, amber, and green LED, arrange much like two sets of traffic lights. I’m using the analogue pins of the Arduino, making it possible to dim the LEDs (well, “dimmed”: the analogue pins are little more than a square pulse with an adjustable duty cycle).

Build indicator shield beside a rather dusty Arduino Duemilanove.
The underside of the shield, show the connection between the resistors and the LEDs.

I can’t remember why I built this shield originally: it might had something to do with train signals, or maybe they were intended as indicators right out of the box. But after briefly using them for their original purpose, it sat on my desk for a while before I started using them as indicator lights. Their first use was for some tool that would monitor the download and transcode of videos. This would take between 45–60 minutes, and it was good to be able to start the job, leave the room, and get the current progress without having to wake the screen while I pass by the door. The red LED will slowly pulse while the download was in progress, then the yellow LED will start flashing when transcoding begins. Once everything is done, the green LED will be lit (or the red LED, which will indicate an error). The Arduino sketch had a bunch of predefined patterns, encoded as strings. Each character would indicate an intensity, with “a” being the brightness, and “z” being the dimmest (I believe the space or dot meant “off”). Each LED could be set to a different pattern, which was done via commands sent over the RS-232 connection. I think the code driving this connection was baked into the download-and-transcode tool itself. The Arduino would reset whenever the RS-232 connection is formed, and just letting it do this when the tool started up meant that I didn’t need to worry about connection state (it didn’t make the code portable though).

Watching Webpack

Eventually this tool fell out of use, and for the long time this board sat in my drawer. Projects came and went, until one came along with a problem that was perfect for this device. I was working on a HTML web-app and I was switching between the code and a web-browser, while Webpack was watching for changes. Because I only had a single screen, the terminal was always out of sight — behind either the code editor or the web-browser — and the version of Webpack I was using would stop watching when it encountered an error (a Go application was serving the files, and Webpack was simply deploying the bundle assets to a public folder, so even though Webpack would stop working, the actual web-server will continue running). Not seeing these errors, I’d fall into the trap into thinking that I was changing things, and getting confused as to why I wasn’t seeing them in the browser. I could go for a minute or two like this before I found out that Webpack died because of an earlier error and my changes were not getting deployed at all. So I dug this device out, built a very simple Go CLI tool and daemon that would talk to it, and hacked it into the Webpack config. When a Webpack build started, it would light up the amber LED. If the build was successful, the green LED would light up; if not, the red LED would.

The green LED lit, indicating that the last build was successful.
The amber LED, indicating a build in progress.
The red LED, indicating a failed build.

This proved to be super useful, and took out the guesswork of knowing when a change was deployed. As long as the green LED was lit, it’s good to go, but as soon as amber becomes red, I know I’ll have to check for errors and get it green once more.

The sketch and daemon software is a lot simpler than what this device used to do. Now, instead of individual patterns of intensity, the daemon — which is itself controlled by a CLI tool — would communicate to the device using a very simple protocol that would either turn LEDs on or off. Some of the protocol details, taken from the Arduino sketch, are included below:

/*
 * ledstatus - simple led indicators
 * 
 * SERIAL FORMAT
 * 
 * Commands take the form:  <cmd> <pars>... NL.  Any more than
 * 8 bytes (1 command, 7 parameters) will be ignored.
 * 
 * Responses from the device will take the form: <status> <par>... NL
 * 
 */

// Commands
\#define CMD_NOP       0x0
\#define CMD_PING      'p'   // a ping, which should simply respond with RES_OK
\#define CMD_TURN_ON   'o'   // 'o' <addr>   :: turn on the leds at these addresses
\#define CMD_TURN_OFF  'f'   // 'f' <addr>   :: turn off the leds at these addresses

// Response
\#define RES_OK        '1'

\#define PIN_ADDR_G1   (1 << 0)
\#define PIN_ADDR_Y1   (1 << 1)
\#define PIN_ADDR_R1   (1 << 2)
\#define PIN_ADDR_G2   (1 << 3)
\#define PIN_ADDR_Y2   (1 << 4)
\#define PIN_ADDR_R2   (1 << 5)

But in a way the simplicity actually helps here. Because it’s now a command and daemon, I could use it in anything else where I’d like to show progress without having to see the screen. Just now, for example, I’m working on a Go project that uses Air to rebuild and restart whenever I change a template. The cycle is slightly longer than a simple Webpack run, and I tend to reload the browser window too soon. So waiting for this device to go  from amber to green cuts down on these early reloads.

The ledstatus command line tool. It would communicate with the daemon via gRPC bound to a local TCP port.

So thats the Build Indicators. The project is steady, and I have no desire to do anything significant, like modify the hardware. But if I were to work on it again, I think I’d like it to add variable intensity back, and extend the command language to let the user upload customer patterns. But for the moment, it’s doing it’s job just fine.

You don’t need to be an iOS developer to get the “build it, and see what happens” experience. Just get a CloudFormation stack with a DynamoDB table and GSI. Oh, you want to add a new attribute to an index, or change an index’s projection? Well, just do it and see what happens (it’ll probably fail).

I removed the paper wasp nest this morning. Surprisingly, doing nothing didn’t solve the problem. The nest was growing and was impeding my ability to hang out my washing. So it had to go. Good thing it was on a leaf, which made it easy to remove it once the wasps themselves were dealt with.

Bocce in a nearby park this afternoon. A bit sunny but otherwise a really nice day for it. Also had a spectator for a few minutes:

A juvenile magpie on a dirt track.

Chris Coyer writes about companies always asking about our experience:

In a way, it’s hard to blame companies because they honestly want to know and, in the best-case scenario, actually use what they get to make things better. But it’s oh-so-overwhelming. Just constantly about every single little thing.

This annoys me too, particuarily for software I have to use. I’m constantly getting ask how my Slack Huddle went. But to Slack’s credit, theirs are reasonably nonintrusive. Less so is the one from Docker, which throws up a feedback modal just when I’m about to do something in their console.

Reading Manton’s post this morning reminds of one the projects I worked on. It was a Java GUI app called CBL that we would deploy to Windows machines of our customers. It would constantly crash and whenever it did, it was impossible to get the stack-trace. I added a class which would show the stack-trace to the user, so they could copy and paste it to support. I could’ve named it anything but I chose the name “CBLMessageOfDeath”.

It’s not nearly as creative as “vetos” but, much like Manton, it made me smile whenever I had to work with it. And compared to alternative names like “ErrorDialog”, it did a better job of being more interesting and memorable. It’d had to, or I wouldn’t remember it after a decade and a half.

Working on one of the admin sections of the project I was alluding to yesterday. Here’s a screencast of how it’s looking so far.

The styling and layout is not quite final. I’m focusing more on functionality, and getting layout and whitespace looking good always takes time. But compared to how it looked before I started working on it this morning, I think it’s a good start.

🔗 The amazing helicopter on Mars, Ingenuity, will fly no more

Ingenuity has been an incrediable achievement. The engineers at NASA should be so proud of themselves. It’s sad to see this chopper grounded now, but seeing it fly for as long as it did has been a joy. Bravo!

It’s a bit frustrating that iOS treats all apps as if they’re info-scraping, money-grabbing, third-class citizens. How many times do I have to grant clipboard access to NetNewsWire before they realise that yes, I actually trust the app developer?

Why I Use a Mac

Why do I use a Mac?

Because I can’t get anything I need to get done on an iPad.

Because I can’t type to save myself on a phone screen.

Because music software doesn’t exist on Linux.

Because the Bash shell doesn’t exist on Windows (well, it didn’t when I stopped using it).

That’s why I use a Mac.

I’ve been bouncing around projects recently but last week I’ve settled on one that I’ve been really excited about. This is reboot five of this idea, but I think this time it’ll work because I’m not building it for myself, at least not entirely. Anyway, more to say when I have something to show.