Notes on software engineering

Archive / page 14

261–280 of 550 posts, newest first.

  1. 2024
  2. __init_subclass__

    David Beazley on Twitter said: I think 95% of the problems once solved by a metaclass can be solved by instead This inspired me to finally learn how to use it!

    1 min read
  3. Social media cards generated with shot-scraper

    My TIL website has social media card images to make links shared from it look slightly more interesting when shared on sites like Mastodon and Twitter.

    3 min read
  4. The simplest recursive CTE

    I found this really simple recursive CTE useful for ensuring I understood how to write recursive CTEs. This query returns five rows from a single column - from 0 to 4.

    1 min read
  5. Calculating embeddings with gtr-t5-large in Python

    I've long wanted to run some kind of large language model on my own computer. Now that I have a M2 MacBook Pro I'm even more keen to find interesting ways to keep all of those CPU cores busy.

    4 min read
  6. Back-dating Git commits based on file modification dates

    https://www.w3.org/History/1991-WWW-NeXT/Implementation/ It's served up as a browseable Apache directory listing, but that's not the most delightful way to browse code - clicking a link to a file…

    2 min read
  7. GitHub Actions, Issues and Pages to build a daily planner

    I'm trying a new thing: a private daily planner, where each day I note down my goals for the day and make notes on my progress towards them as the day progresses.

    1 min read
  8. Making HTTP calls using IPv6

    Tiny TIL today: I learned how to make an HTTP call to an IPv6 address. The trick is to enclose the address in the URL in square braces: http:// 2a09:8280:1::1:2741 Here's that working as a request to…

    1 min read
  9. Updating stable docs in ReadTheDocs without pushing a release

    I use ReadTheDocs for several of my projects. It's fantastic: among other things, it makes it easy to publish the documentation for my latest branch at and the documentation for my latest release at…

    7 min read
  10. Working around the size limit for nodeValue in the DOM

    TIL that in the DOM has a size limit! I had a table cell element containing HTML-escaped JSON and I was doing this: This was breaking on larger JSON strings.

    1 min read
  11. KNN queries with SpatiaLite

    The latest version of SpatiaLite adds KNN support, which makes it easy to efficiently answer the question "what are the X closest records to this point".

    1 min read
  12. Pointing a custom subdomain at Read the Docs

    I host the documentation for Datasette on Read the Docs. Until today it lived at https://datasette.readthedocs.io/ but today I moved it to a custom subdomain, https://docs.datasette.io/ Most of this…

    1 min read
  13. The location of the pip cache directory

    uses a cache to avoid downloading packages again: The command can be used to find the location of that cache on your system: Wheels are cached in - in a nested set of folders based on a hash, for…

    1 min read
  14. Upgrading Homebrew and avoiding the failed to verify attestation error

    I managed to get my Homebrew installation back into shape today. The first problem I was having is that it complained that macOS Sequoia was unsupported: It turns out I was on an older Homebrew…

    1 min read
  15. Using recursive CTEs to explore hierarchical Twitter threads

    This TIL adapted from a Gist I put together in 2019, before I started tracking TILs here. My twitter-to-sqlite tool produced a SQLite table with an column that referenced another tweet ID, for…

    1 min read
  16. A script to capture frames from a QuickTime video

    I was putting together some notes for a talk I gave, and I wanted an efficient way to create screenshots of specific moments in a video of that talk.

    2 min read
  17. pytest coverage with context

    This tweet from \@Mariatta tipped me off to the ability to measure "contexts" when running coverage - as a way to tell which tests exercise which specific lines of code.

    1 min read
  18. Transferring a GitHub issue from a private to a public repository

    I have my own private repository where I sometimes create research threads. Occasionally I want to transfer these to a public repository to publish their contents.

    1 min read
  19. Grabbing a transcript of a short snippet of a YouTube video with MacWhisper

    I use the MacWhisper macOS desktop app to run Whisper. It's a very pleasant GUI wrapper around the Whisper transcription model.

    1 min read
  20. SQLite VACUUM: database or disk is full

    I was trying to run against a large SQLite database file ( 7GB) using and I got this error: sqlite3.OperationalError: database or disk is full The volume that the database lived in was 20GB in size…

    1 min read
  21. Browsing your local git checkout of homebrew-core

    The homebrew-core repository contains all of the default formulas for Homebrew. It's a huge repo, and if you browse it through the GitHub web interface you can run into errors like this one…

    1 min read