Alex Chan
alexwlchan.net
Alex Chan
@alexwlchan.net
Reposted by Alex Chan
Cleaning up messy dates in JSON: alexwlchan.net/2025/messy-d...

I’ve been cleaning up some messy data, and it includes timestamps written by a variety of humans and machines, which don’t use a consistent format.

I wrote a Python script to help me clean things up.
November 17, 2025 at 8:54 AM
Cleaning up messy dates in JSON: alexwlchan.net/2025/messy-d...

I’ve been cleaning up some messy data, and it includes timestamps written by a variety of humans and machines, which don’t use a consistent format.

I wrote a Python script to help me clean things up.
November 17, 2025 at 8:54 AM
Detecting AV1-encoded videos with Python: alexwlchan.net/2025/detecti...

I wrote a Python test to find videos that are encoded with AV1, so I can convert them to a codec my iPhone can play.
November 8, 2025 at 11:16 PM
Why can’t my iPhone play that video? alexwlchan.net/2025/av1-on-...

I wrote about a recent issue playing a video on my iPhone, the AV1 codec that caused the problem, and some web APIs I learnt while debugging.
Why can’t my iPhone play that video?
The answer involves the AV1 video codec, Apple's chips, and several new web APIs I learnt along the way.
alexwlchan.net
October 28, 2025 at 10:24 AM
Doing my own syntax highlighting (finally): alexwlchan.net/2025/syntax-...

I’ve redesigned the syntax highlighting on my blog to use a smaller colour palette, so I wrote a bit about what I’ve changed, how it works, and why I think it’s better.
Doing my own syntax highlighting (finally)
I've redesigned my syntax highlighting scheme to use a smaller colour palette. Here's what I've changed, how it works, and why I think it's better.
alexwlchan.net
October 22, 2025 at 5:31 PM
Creating a personal wrapper around yt-dlp: alexwlchan.net/2025/yt-dlp-...

I’ve written a new script which calls yt-dlp with my preferred options, so I don’t have to copy my configuration across different projects.
October 7, 2025 at 7:56 AM
@jonnelledge.bsky.social Spotted in St Pancras Waterstones 👀
October 3, 2025 at 5:23 PM
@anildash.com I thought of you as I read this article; it’s a UK version of an idea I know you’ve had: takes.jamesomalley.co.uk/p/starmer-co...

(Unless I’m misremembering, in which case sorry!)
Starmer shouldn't give a conference speech – he should give an Apple-style keynote
The format is tired and it is time to think different.
takes.jamesomalley.co.uk
October 3, 2025 at 3:57 PM
Linking to text fragments with a bookmarklet: alexwlchan.net/2025/text-fr...

I’ve written a bookmarklet that lets me link to specific text on a web page.
September 15, 2025 at 5:49 AM
@garius.bsky.social I vaguely remember reading one of your threads where you said somebody like “so-and-so had no experience, and by the end of the night, nobody who witnessed their actions would believe it” – but I’m struggling to find it.

Any chance you remember what I’m talking about?
September 10, 2025 at 3:33 PM
Reposted by Alex Chan
Resizing images in Rust – now with EXIF orientation support: alexwlchan.net/2025/create-...

I wrote about a new version of Rust’s image crate, which adds support for EXIF orientation. Now I can resize images without mangling their rotation. 🥳
Resizing images in Rust – now with EXIF orientation support
A new version of Rust's image crate has support for EXIF orientation, which allows me to resize images without mangling their rotation.
alexwlchan.net
September 8, 2025 at 10:49 PM
Resizing images in Rust – now with EXIF orientation support: alexwlchan.net/2025/create-...

I wrote about a new version of Rust’s image crate, which adds support for EXIF orientation. Now I can resize images without mangling their rotation. 🥳
Resizing images in Rust – now with EXIF orientation support
A new version of Rust's image crate has support for EXIF orientation, which allows me to resize images without mangling their rotation.
alexwlchan.net
September 8, 2025 at 10:49 PM
On a lighter note, I did some digging around the history of Morse code: alexwlchan.net/til/2025/aro...

* The @ symbol was added in 2004
* It’s probably the first symbol since WWII
* It has a delightful name in French
* Punctuation in Morse code has some surprising other omissions
August 28, 2025 at 10:28 PM
Using vcrpy to test HTTP interactions in Python: alexwlchan.net/2025/testing...

How I record HTTP requests to get fast, reliable, and consistent tests, and the patterns I use in a production codebase. 📼
Using vcrpy to test HTTP interactions in Python
How I record HTTP requests to get fast, reliable, and consistent tests, and the patterns I use in a production codebase.
alexwlchan.net
August 28, 2025 at 9:43 PM
Reposted by Alex Chan
Create space-saving clones on macOS with Python: alexwlchan.net/2025/cloning...

I talk a bit about what space-saving clones are, and why they’re important, then describe two ways to create them in Python:

1. Shelling out to `cp` with subprocess, or
2. Making a syscall using `ctypes`
Create space-saving clones on macOS with Python
You can shell out to `cp -c` using `subprocess`, or you can make a `clonefile()` syscall using the `ctypes` library.
alexwlchan.net
August 3, 2025 at 2:55 PM
Create space-saving clones on macOS with Python: alexwlchan.net/2025/cloning...

I talk a bit about what space-saving clones are, and why they’re important, then describe two ways to create them in Python:

1. Shelling out to `cp` with subprocess, or
2. Making a syscall using `ctypes`
Create space-saving clones on macOS with Python
You can shell out to `cp -c` using `subprocess`, or you can make a `clonefile()` syscall using the `ctypes` library.
alexwlchan.net
August 3, 2025 at 2:55 PM
Slipstitch, Queer Craft, and community spaces: alexwlchan.net/2025/slipsti...

I wrote about the closing of my favourite yarn shop, what the fortnightly crafting meet-up meant to me, and why I’m a bit sad at how many spaces like this are disappearing.
Slipstitch, Queer Craft, and community spaces
Remembering Slipstitch, a queer-friendly yarn shop and the fortnightly crafting meet-ups that were a highlight of my week.
alexwlchan.net
July 30, 2025 at 9:32 AM
A bit of personal news: today was my last day at the Flickr Foundation. I’m very proud of what I did there, but now it’s time for something new – with a break first!

More here: alexwlchan.net/2025/leaving...
July 25, 2025 at 8:18 PM
I was unpacking new laundry pods this evening, and I saw a scary warning:

“If swallowed immediately contact a POISON CENTER/doctor.”

which led me down a rather interesting (if morbid!) rabbit hole about poison centres, something I’ve not come across in the UK: alexwlchan.net/til/2025/poi...
July 5, 2025 at 12:00 AM
Reposted by Alex Chan
Recreating a bird animation: alexwlchan.net/2025/swift-b...

I learnt a bunch about animation on the web by reading the Swift.org source code, like:

✨ Using a dash pattern to draw partial paths
✨ HTML5 Canvas and globalCompositeOperation
✨ Anime.js
✨ MutationObserver
✨ prefers-reduce-motion: reduce
June 11, 2025 at 2:23 PM
Recreating a bird animation: alexwlchan.net/2025/swift-b...

I learnt a bunch about animation on the web by reading the Swift.org source code, like:

✨ Using a dash pattern to draw partial paths
✨ HTML5 Canvas and globalCompositeOperation
✨ Anime.js
✨ MutationObserver
✨ prefers-reduce-motion: reduce
June 11, 2025 at 2:23 PM
@anildash.com Since you keep talking about “better AI critique”, you might like this article by Chelsea Troy: chelseatroy.com/2025/05/14/t...

It felt like a really thoughtful approach to helping students understand the limitations of genAI, better than a blanket ban or unconditional acceptance.
The Homework is the Cheat Code: GenAI Policy in my Computer Science Graduate Classroom
I started teaching at the University of Chicago six years ago. Back then, in the spring of 2019, students had not undergone the trauma of a centennial pandemic. They had so far learned in person; I…
chelseatroy.com
June 3, 2025 at 5:43 AM
Reposted by Alex Chan
To close my bookmarks series on a lighter note, I wrote about some of my favourite websites: alexwlchan.net/2025/my-favo...

Pages that change randomly, that mirror the real world, or even follow the moon and the sun, plus my all-time favourite website design. 🔖
June 2, 2025 at 8:29 AM
Reposted by Alex Chan
What I learnt about making websites by reading two thousand web pages: alexwlchan.net/2025/learnin...

When I built my web archive by hand, I saw how other people make websites. I wrote about what I learnt – writing thoughtful HTML, new-to-me features of CSS, and some quirks and relics of the web. 🔖
What I learnt about making websites by reading two thousand web pages
How to write thoughtful HTML, new-to-me features of CSS, and some quirks and relics I found while building my personal web archive
alexwlchan.net
May 26, 2025 at 10:05 AM
Reposted by Alex Chan
Building a personal archive of the web, the slow way: alexwlchan.net/2025/persona...

I wrote about how I created a personal web archive of all my bookmarks, the tradeoff between manual and automated archiving, and what I learnt about preserving the web. 🔖
Building a personal archive of the web, the slow way
How I built a web archive by hand, the tradeoffs between manual and automated archiving, and what I learnt about preserving the web.
alexwlchan.net
May 19, 2025 at 7:08 AM