Recent Posts

See also posts by tag or search with DuckDuckGo:

Django: check version support with norwegianblue

Django projects end up slotting into a bunch of software release cycles: Django itself, Python, database servers, cache servers, and more. It can be hard for us developers to keep track of all of them, with their different support policies and end-of-life dates, and running an unsupported version means missing out on important security or bug fixes.

Read more...

Django: set up its test suite with uv

When contributing to Django, you’ll want to run its test suite to check your changes. The official contributing docs cover setup in Running the unit tests, using a virtual environment and pip. Here’s an alternative guide using uv.

Read more...

Zsh: set aside a command with “Escape Q” / push-line

Do you ever do this? You carefully type out a command, like this pytest one:

Read more...

Zsh: tab complete glob qualifiers

I’ve written a few posts on Zsh’s glob qualifiers recently, covering:

Read more...

Django: serve apple-app-site-association and assetlinks.json

If your site has companion Apple or Android apps, you probably want links to your site to open in those apps, when installed. Both platforms support this, with Apple calling the feature Universal Links and Android calling it App Links.

Read more...

Django: serve a security.txt file

When a security researcher finds a vulnerability in your site, they need a way to tell you about it. Without a clear contact, they may resort to guessing at addresses like security@<yourdomain>, messaging random folks on social media, or give up. And of course, in the worst case, they might just publish the details, leaving you to find out when attackers do.

Read more...

Zsh: sort globs in natural order with the (n) glob qualifier

Globs sort filenames character by character, so numbered files often come out in a surprising order, with 10 before 2. Zsh has a neat fix for this: the n glob qualifier, which applies a “natural” sort, treating any run of digits as a number rather than a string of characters.

Read more...

Software Engineering: join my meetup in Lisbon, 8th October

I previously announced my Python optimization workshop in Lisbon, on 10th October (which still has a few places). I am now pleased to add a Python/Django meetup on the Thursday before.

Read more...

Zsh: find the largest files with the (OL) glob qualifier

Got a directory that you want to tidy up bloat from? Whether you’re trying to find bad build artifacts in your work repository or clear out old cat videos from your home directory, Zsh’s (OL) glob qualifier can help you find the largest files.

Read more...

macOS: use caffeinate to keep your computer on

If you’re starting a long job on your Apple Macintosh Computer and wandering off for a coffee, the machine may go to sleep before it finishes due to inactivity. To prevent that from happening, also give your computer a boost with the caffeinate command, a macOS built-in since 2012 (OS X Mountain Lion).

Read more...

Python: join my optimization workshop in Lisbon, 10th October

I’m running a workshop in Lisbon next month, and you’re invited!

Read more...

Django: serve the change password well-known URL

When a password manager detects that a user’s password has been leaked or reused, it can prompt them to change it, but the password change URL varies by site. The web’s answer to such discovery problems is the reserved /.well-known/ URL namespace (RFC 8615), home to machine-readable files and endpoints like security.txt. A Well-Known URL for Changing Passwords is the web specification that uses this namespace to fix password page discovery. It reserves the URL path /.well-known/change-password to redirect to your actual change password page, wherever that lives.

Read more...

Django: introducing django-mcpz, for making MCP servers

I made another package! Say hello to django-mcpz, for building Model Context Protocol (MCP) servers in your Django project.

Read more...

Zsh: manipulate filenames with modifiers like :r (root) and :e (extension)

Zsh modifiers are a family of suffixes that transform words as they’re expanded. Several of them are dedicated to slicing up filenames, replacing fiddly calls to dirname, basename, and friends. Let’s take a look at them now!

Read more...

Django: django-upgrade 1.32.0 out now, with 44 AI-assisted bug fixes

django-upgrade is my tool for automatically upgrading your project code for new Django versions. It rewrites your Python files to fix deprecations and adopt some new features, taking a chunk of the monotony out of upgrading between Django versions.

Read more...

Python: use re.prefixmatch() instead of re.match() from Python 3.15

Take this validation function:

Read more...

Python: fix SyntaxWarning: invalid octal escape sequence

Take this code:

Read more...

Python: fix TypeError: NamedTuple() got an unexpected keyword argument

Take this code, defining a small NamedTuple with a keyword argument per field:

Read more...

Python: introducing emojet, a fast emoji lookup library

New package just landed!

Read more...

Python: tprof 1.3.0: now with less overhead

Back in January, I introduced tprof, a targeting profiler for Python 3.12+ that measures the time spent in specific functions, rather than your whole program. As a reminder, here’s the basic usage, specifying a target function with -t and a script to run:

Read more...

Django: introducing django-msgspec

It’s another day, another new package day here. Say hello to django-msgspec, a package of drop-in replacements for Django and Django REST Framework (DRF) components backed by msgspec.

Read more...

Git: my git stash -p optimization in Git 2.55

I got another commit merged in Git 2.55 (2026-06-29), yay! The release note reads:

Read more...

Git: list files at a given commit with ls-tree

To list all files in your repository as they were at a given commit, use git ls-tree with its -r and --name-only options:

Read more...

Zsh: select files with arbitrary code in (e) or + glob qualifiers

Zsh glob qualifiers can select files by many built-in attributes: type, size, modification time, and more. But when no built-in qualifier fits, you can bring in the e or + qualifiers to run arbitrary code, making globs a fully programmable file filter. With great power comes great responsibility!

Read more...

Git: exclude commits by an author in git log with --perl-regexp

git log has an --author option to limit the output to commits from matching authors:

Read more...