There’s also this series of videos by the same creator that goes in depth on how the Super Mario Bros. levels are encoded in ROM. This is even more fascinating, as they had very little memory to work with, and had to make some significant trade-offs, like allowing Mario to go left. πŸ“Ί

If anyone’s interested in how levels in Super Mario Bros. 2 are encoded in the ROM, I can recommend this video by Retro Game Mechanics. It goes for about 100 minutes so it’s quite in depth. πŸ“Ί

Just blindly accepting permission dialogs whenever MacOS throws them at me, like some bad arcade game. Was this your intention, Apple?

Overheard this exchange just now at the cafe:

Customer: How ya’ feeling?

Barista: Feeling cold.

Customer: Well at least that’s something. If ya’ don’t feel the cold it means you’re dead.

Had a lot more weight to me than I think the customer originally intended.

Mother’s Day in full bloom over here. πŸ’

A shopfront is adorned with a vibrant display of flowers and plants in pots, buckets, and bouquets.

Rubberducking: More On Mocking

Mocking in unit tests can be problematic due to the growing complexity of service methods with multiple dependencies, leading to increased maintenance challenges. But the root cause may not be the mocks themselves.

πŸ”— NY Mag: Rampant AI Cheating Is Ruining Education Alarmingly Fast

Two thoughts on this. The first is that I think these kids are doing a disservice to themselves. I’m not someone who’s going to say β€œdon’t use AI ever,” but the only way I can really understanding something is working through it, either by writing it myself or spending lots of time on it. I find this even in my job: it’s hard for me to know of the existence of some feature in a library I haven’t touched myself, much less how to use it correctly. Offloading your thinking to AI may work when you’re plowing through boring coding tasks, but when it comes to designing something new, or working through a Sev-1, it helps to know the system your working on like the back of your hand.

Second thought: TikTok is like some sort of wraith, sucking the lifeblood of all who touches it, and needs to die in fire.

Via: Sharp Tech

How and when did “double click” become a phrase meaning to focus on or get into the details of a topic? Just heard it being used on a podcast for the second time in as many weeks.

If Apple think the recent App Store ruling is taking away their right to monetise their IP, then Apple needs to explain what the $US 99.00 developer fee is for. They’re probably shooting their videos for WWDC right now. Maybe have one going through each line item of a theoretical “developer fee invoice” and explain what the fee is, and what IP rights the fee is covering.

When hiring a senior software engineer, it’s probably less useful to know whether they could code up a sorting algorithm versus knowing whether they can work out what time it is in UTC in their head. πŸ˜€

Ooh, I lost my temper when I was under the pump and MacOS decided to stop everything and throw up this modal, asking if I permit Terminal to access files from other apps.

Auto-generated description: A pop-up notification requests permission for Terminal to access data from other apps, offering options to Don't Allow or Allow.

Of course I do, Apple! I’m not using the terminal to amuse myself. I’m trying to get shit done, and your insistent whining is getting in my way! 😑

Seeing these river tour boats moored like this reminds me of the UK, and all the narrowboats in the canals.

Boats are docked along a river beside a row of buildings with trees and outdoor seating.

Devlog: Blogging Tools β€” Ideas For Stills For A Podcast Clips Feature

I recently discovered that Pocketcasts for Android have changed their clip feature. It still exists, but instead of producing a video which you could share on the socials, it produces a link to play the clip from the Pocketcasts web player. Understandable to some degree: it always took a little bit of time to make these videos. But hardly a suitable solution for sharing clips of private podcasts: one could just listen to the entire episode from the site. Not to mention relying on a dependent service for as long as those links (or the original podcast) is around.

So… um, yeah, I’m wondering if I could building something for myself that could replicate this.

I’m thinking of another module for Blogging Tools. I was already using this tool to crop the clip videos that came from Pocketcasts so it was already in my workflow. It also has ffmpeg bundled in the deployable artefact, meaning that I could use to produce video. Nothing fancy: I’m thinking of a still showing the show title, episode title, and artwork, with the audio track playing. I pretty confident that ffmpeg can handle such tasks.

I decided to start with the fun part: making the stills. I started with using Draw2D to provide a very simple frame where I could place the artwork and render the text. I just started with primary colours so I could get the layout looking good:

Auto-generated description: A date, episode title, and show name are displayed alongside an image of ocean waves against rocks in a colorful border.

I’m using Roboto Semi-bold for the title font, and Oswald Regular for the date. I do like the look of Oswald, the narrower style contrasts nicely with the neutral Roboto. Draw2D provides methods for measuring text sizes, which I’m using to power the text wrapping layout algorithm (it’s pretty dumb. It basically adds words to a line until it can’t fit the available space)

The layout I got nailed down yesterday evening. This evening I focused on colour.

I want the frame to be interesting and close to the prominent colours that come from the artwork. I found this library which returns the dominant colours of an image using K-means clustering. I’ll be honest: I haven’t looked at how this actually works. But I tried the library out with some random artwork from Lorem Picsum, and I was quite happy with the colours it was returning. After adding this library1 to calculate the contract for the text colour, plus a slight shadow, and the stills started looking pretty good:

Auto-generated description: Six rectangular cards each feature a different background image with the date 14 April 2020, text A pretty long episode title, and My test show.

I then tried some real podcast artwork, starting with ATP. And that’s where things started going off the rails a little:

Auto-generated description: Four color variations of a promotional card design featuring a logo with rainbow stripes, a date of 14 April 2020, and text stating A pretty long episode title and My test show.

The library returns the colours in order of frequency, and I was using the first colour as the border and the second as the card background. But I’m guessing since the ATP logo has so few actual colour, the K-means algorithm was finding those of equal prominence and returning them in a random order. Since the first and second are of equal prominence, the results were a little garish and completely random.

To reduce the effects of this, I finished the evening by trying a variation where the card background was simply a shade of the border. That still produced random results, but at least the colour choices were a little more harmonious:

Auto-generated description: A series of four visually distinct cards display a logo, date, episode title, and show subtitle, each set against different colored backgrounds.

I’m not sure what I want to do here. I’ll need to explore the library a little, just to see whether it’s possible to reduce the amount of randomness. Might be that I go with the shaded approach and just keep it random: having some variety could make things interesting.

Of course, I’m still doing the easy and fun part. How the UI for making the clip will look is going to be a challenge. More on that in the future if I decide to keep working on this. And if not, at least I’ve got these nice looking stills.


  1. The annoying thing about this library is that it doesn’t use Go’s standard Color type, nor does it describe the limits of each component. So for anyone using this library: the range for R, G, and B go from 0 to 255, and A goes from 0 to 1. ↩︎

Ah, CSV files. They’re a little painful to work with, but they truly are the unsung heroes of ad-hoc scripts written in haste.

Listening to all the recent platform talk on Stratechery has been fascinating, if not a little melancholy. We may never see another mainstream platform be as truly open as Windows, MacOS, or the Web is right now.

What ever happen to Power Nap on MacOS? Is that still a thing? I’ve been asked when I’d like to install updates for about a week now. Yet despite choosing “later tonight” every time, nothing’s been happening. I could choose to install them now, but I thought deferring them to a time when I’m not using my computer was the point of this feature.

Argh! Someone has discovered my secret of where the best place to stand on an A-class tram is (it’s at the back, beside the back door).

It’s easy to get a irrational sense of how scalable a particular database technology can be. Take my experience with PostgreSQL. I use it all the time, but I have it in my head that it shouldn’t be used for “large” amounts of data. I get a little nervous when a table goes beyond 100,000 rows, for example.

But just today, I discovered a table that had 47 million rows of time-series data, and PostgreSQL seems to handle this table just fine. There are a few caviets: it’s a database with significant resources backing it, it only sees a few commits per second, and the queries that are not optimised for that table’s indices can take a few seconds. But PostgreSQL seems far from being under load. CPU usage is low (around 3%), and the disk queue depth is zero.

I guess my point is that PostgreSQL continues to be awesome and I really shouldn’t underestimate how well it can handle we we throw at it.

Ah! I think I know why I keep asking for a bagel with lettuce, tomato, and cheese instead of ham, tomato, and cheese. It’s because I always said “lettuce, tomato, and cheese” when ordering sandwiches back when I was working in the CBD. Wow, talk about old habits dying hard.

πŸ”¨ GSAP

Another JavaScript animation library. Has some interesting features that might be pertinent for a project I’ve been toying with in my mind.