Notes on software engineering

Archive / page 4

61–80 of 546 posts, newest first.

  1. 2025
  2. Installing Selenium for Python on macOS with ChromeDriver

    I needed to run Selenium on macOS for the first time today. Here's how I got it working. Install the chromedriver binary If you have homebrew This is by far the easiest option: brew install…

    2 min read
  3. Packaging a Python CLI tool for Homebrew

    I finally figured out how to package Datasette for installation with Homebrew. My package was accepted into Homebrew core, which means you can now install it like this: brew install datasette Prior to…

    2 min read
  4. struct endianness in Python

    TIL the Python standard library struct module defaults to interpreting binary strings using the endianness of your machine. Which means that this code: Behaves differently on big-endian v.s.

    1 min read
  5. Using tree-sitter with Python

    tree-sitter is a "parser generator tool and an incremental parsing library". It has a very good reputation these days.

    1 min read
  6. Identifying column combination patterns in a SQLite table

    Given a large, heterogeneous table I wanted to identify patterns in the rows in terms of which columns were not null.

    1 min read
  7. Using macOS stickies to display a workshop link on the screen

    When giving a workshop it's often useful to have a URL to the workshop materials visible on screen at all times. I use a bit.ly link for these.

    1 min read
  8. Automatically maintaining Homebrew formulas using GitHub Actions

    I previously wrote about Packaging a Python CLI tool for Homebrew. I've now figured out a pattern for automatically updating those formulas over time, using GitHub Actions.

    3 min read
  9. Finding CSV files that start with a BOM using ripgrep

    For sqlite-utils issue 250 I needed to locate some test CSV files that start with a UTF-8 BOM. Here's how I did that using ripgrep: The option means the search spans multiple lines - I only want to…

    1 min read
  10. Reformatting text with Copilot

    I wanted to write alt text for the following screenshot (of this page), so I could include it in this post on Mastodon.

    1 min read
  11. Snapshot testing with Syrupy

    I'm a big fan of snapshot testing - writing tests where you compare the output of some function to a previously saved version, and can re-generate that version from scratch any time something changes.

    2 min read
  12. Asserting a dictionary is a subset of another dictionary

    Take for example an API endpoint that returns something like this: I want to efficiently assert against the second two keys, but I don't want to hard-code the SQLite version into my test in case it…

    1 min read
  13. Creating a tiled zoomable image with OpenSeadragon and vips

    The San Francisco Microscopical Society has some extremely high resolution scanned images - one of them is a 1.67GB PNG file with a 25,088 × 17,283 pixel resolution.

    1 min read
  14. Testing a Click app with streaming input

    For sqlite-utils 364 I needed to write a test for a Click app which dealt with input streamed to standard input.

    1 min read
  15. Converting ORF raw files to JPEG on macOS

    One of our cameras takes raw photos in ORF format, which I believe stands for "Olympus Raw Format". Here's a recipe I found for converting them to JPEG on macOS: The result is a directory containing a…

    1 min read
  16. Finding the SQLite version used by Web SQL in Chrome

    Google Chrome still includes support for Web SQL, the long since abandoned proposed standard for shipping a SQL engine in browser JavaScript.

    1 min read
  17. Running Varnish on Fly

    The goal: run Varnish in a Fly container as a caching proxy in front of another Fly application. I ended up switching to Cloudflare for running a Varnish-style cache in front of my Fly application…

    1 min read
  18. actions/setup-python caching for setup.py projects

    I used to use a combination of and in all of my Python GitHub Actions projects in order to install Python dependencies via a cache, rather than hitting PyPI to download copies every time.

    1 min read
  19. Open external links in an Electron app using the system browser

    For Datasette.app I wanted to ensure that links to external URLs would open in the system browser. This recipe works: The event fires before any in-browser navigations, which means they can be…

    1 min read
  20. Ignoring errors in a section of a Bash script

    For simonw/museums 32 I wanted to have certain lines in my Bash script ignore any errors: lines that used to add columns and configure FTS, but that might fail with an error if the column already…

    1 min read
  21. Compiling and running sqlite3-rsync

    Today I heard about the sqlite3-rsync command, currently available in a branch in the SQLite code repository.

    1 min read