RSSAmplifier

Blog

Jonathan's Blog

Recent content on Jonathan's Blog

jonathan-frere.comRSS feed ↗19 posts

Latest posts

Pushing and Pulling: Three Reactivity Algorithms

It’s looking like I’m going to need to build a reactive engine for work, so I’m going to prepare for that by writing down what I know about them. I want to look at three ways of building reactive engines: push reactivity, pull reactivity, and the hybrid push/pull combination that is used in a bunch of web frameworks. The Problem Statement The simplest way to visualise reactivity,…

Additional Thoughts about the Command Pattern

A couple of weeks ago, I wrote a post on my employer’s blog titled Undo, Redo, and the Command Pattern , which I ended up quite pleased with. Here, I wanted to add a couple of additional thoughts based on some of the discussions and things I’ve read since writing that post. Firstly, undo/redo isn’t the only use for the command pattern! This is something I wish I’d made more…

Storing Unwise Amounts of Data in JavaScript Bigints

This is a short note to document storing data in JS’s bigint type. I tried this out in a project recently, and it’s not obviously a terrible idea, as long as you take into account all the caveats that make it only useful for very specific cases. Why This is a performance 1 thing. In the project where I was exploring this, we had a large amount of objects representing configuration…

This Overly Long Variable Name Could Have Been a Comment

Here’s a belief I’ve held for a while but only recently been able to put into words: explanatory comments are often easier to understand than explanatory variable or function names. Consider a complicated expression with multiple sub-expressions. This expression is going to be difficult for the next person reading this code to decipher; we should make it easier for them. There are a…

Side Effects in SolidJS

If you’re used to React, you’re probably used to using useEffect to run side-effectful code, such as integrating with third-party libraries or setting up MutationObserver s 1 . SolidJS also has createEffect , which works very similarly to useEffect , but it also has some other functions, and I’ve noticed that people getting started with SolidJS often aren’t sure which function to use for any given…

Bunny Updates

A bit over a month ago, I switched my blog over to BunnyCDN . I wanted to update that post when the trial period was up, but I ended up being busy, so here’s an update from a month and change in. Pricing First, a note on the free trial. The trial period lasts 14 days, and during this period I was given $20 of “trial credit” that expired as soon as the trial was over. I could have earned more…

Accessing Fastify Sessions via tRPC Websockets

This is a quick post to point out a potential issue that might catch you out with using Fastify’s sessions mechanism alongside tRPC’s websockets transport, and how I’ve fixed it in my projects. The problem happens with an application that looks something like this: const app = Fastify (); app . register ( ws ); app . register ( fastifyCookie ); app . register ( fastifySession , {…

Switching to BunnyCDN in Less Than 2 Hours

Update, 2025-04-16: I wrote a follow-up post after about a month of usage, and you can read that here . Given some recent, uh, instability in US politics, and given that everyone likes an underdog, I’ve been looking at European alternatives to my current hosting situation, which is Cloudflare. After looking through european-alternatives.eu , and reading some opinions on Bluesky, I figured…

Why are Jujutsu's ID Prefixes So Short?

Jujutsu is a relatively new version control system that is designed around working directly with commit-like objects called “changes” 1 . Each change has an ID, and these IDs are important because they’re the main way of referring to different changes 2 . To make referencing these IDs a bit easier, Jujutsu often shows ID prefixes rather than the whole ID when displaying commits (such as in the jj…

Helix: Why (And How) I Use It

I’ve come to accept that I’m just a sucker for shiny nerd things. I use Rust, despite never having had a professional reason to use it in my life. I switched to Linux in my student years and I’ve never looked back since, even though it constantly breaks and I can’t get my Bluetooth headphones to connect. I have a split keyboard with home row mods set up because I read some random blog posts and it…

Surprising Programmer Tools #53: The Sudoku

During the Pandemic, I found the YouTube channel Cracking the Cryptic , which is run by two champion puzzlers, Simon and Mark, who solve various logic puzzles, focusing mainly on variant sudoku. Variant sudoku adds additional rules to a normal sudoku grid — for example killer sudoku, where all the numbers in a certain marked area need to add up to a certain number. As you add more rules, they…

10 Years of Programming

As of the beginning of September, I’ve been programming “with purpose” for a decade. Before then it was just a hobby — something I could do in my room while burying my head in the sand about the Physics degree I was failing at the time. But that summer, I realised maybe if I was choosing to spend all my free time coding, maybe it was worth trying to pursue that as a career instead.

Adding Discussions to my Blog

I enjoy reading other people’s blog posts, but I often enjoy reading the comments more. The post itself becomes a jumping-off point for further discussion, where people can add critique, additional supporting evidence, or their own alternative explanations. Or just get side-tracked by one specific line in the article and start a whole flame-war about it. But having your own comment section…

Why Test?

Why do you write tests? I’ve been thinking about this question a lot recently. I’ve been trying to motivate some teammates that tests are worth writing. But I’m going to convince them of that, I need to be able to answer that question for myself, right? Tests sometimes get portrayed as one of the chores of software development. As a new developer, that’s how I saw tests for a long…

New Disposable APIs in Javascript

Javascript’s new “Explicit Resource Management” proposal adds the using statement, a way to automatically close resources after you’ve finished using them. But as part of the same proposal, a number of other APIs have been added that make using even more useful. I couldn’t find a lot of documentation out there when I was trying to figure out how these APIs work, so this article is a…

I (Re)designed My Blog

I’ve updated my blog. And of course, the first thing any self-respecting developer blogs about with a new blog design is that redesign itself. This is that post. Design I confess: I am not a designer. This may be obvious. But I enjoy learning about design through practice, in much the same way that a child enjoys learning about cooking by making mud pies. In practical terms, I sketched something…

How I Do Dependency Injection With Closures

You can also find an edited and updated version of this post that I wrote for my employer’s blog here . A discussion came up on Reddit recently about DI, where I mentioned that one way that I’ve done DI recently for web frameworks that don’t naturally support it to using closures. Someone asked for an example, so I figured I’d explain what that looks like and where it might…

Wait, Rust Has Effects?

This post is a reply to Without Boat’s article “Patterns & Abstractions” . I originally started it as a reply on Reddit, and then I just kept on writing, so now it’s a blog post. Please read that post first (and probably the other posts linked there), but for the sake of discourse, I’ll also summarise what I got out of it: There are right now a few different proposals for the idea of…

Book Review: A Philosophy of Software Design

This review is largely in response to the article “ It’s probably time to stop recommending Clean Code ”, and the ensuing Reddit discussion . A lot of really interesting points were brought up, but the big question that the author themself wasn’t able to answer was: “What should we recommend instead?” I believe the book we should be recommending is A Philosophy…