Notes on software engineering

Archive / page 8

141–160 of 547 posts, newest first.

  1. 2025
  2. Convert git log output to JSON using jq

    I just spent way too long messing around with ChatGPT (transcript here) trying to figure this out. After much iteration, here's a recipe that works (mostly written by me at this point): The output…

    1 min read
  3. Using sphinx.ext.extlinks for issue links

    Datasette's release notes are formatted using Sphinx. Almost every bullet point links to the corresponding GitHub issue, so they were full of lines that look like this: I noticed that the aspw…

    1 min read
  4. Debugging a Click application using pdb

    This tip is for when you are working on a Python command-line application that runs using that program's name, as opposed to typing .

    1 min read
  5. Wider tooltip areas for Observable Plot

    In this Observable notebook I'm plotting a line on a chart, but I want to provide tooltips showing the exact value at any point on the line.

    1 min read
  6. Trying out SQLite extensions on macOS

    Alex Garcia has been building some really cool new custom extensions for SQLite, working in C and Go. So far he's released two: - sqlite-lines, written in C, which adds and table-valued functions, for…

    2 min read
  7. Outputting JSON with reduced floating point precision

    datasette-leaflet-geojson outputs GeoJSON geometries in HTML pages in a way that can be picked up by JavaScript and used to plot a Leaflet map.

    1 min read
  8. Publishing a Docker container for Microsoft Edit to the GitHub Container Registry

    Microsoft recently released Edit, a new terminal text editor written in Rust. It's pretty nice - it's reminiscent of but with a retro MS DOS feel. I wanted to run it on my Apple Silicon Mac.

    2 min read
  9. Wildcard DNS and SSL on Fly

    Fly makes it surprisingly easy to configure wildcard DNS, such that is served by a single Fly application (which can include multiple instances in multiple regions with global load-balancing).

    2 min read
  10. Ensure labels exist in a GitHub repository

    I wanted to ensure that when this template repository was used to create a new repo that repo would have a specific set of labels.

    1 min read
  11. Running OCR against a PDF file with AWS Textract

    Textract is the AWS OCR API. It's very good - I've fed it hand-written notes from the 1890s and it read them better than I could.

    2 min read
  12. Geocoding from Python on macOS using pyobjc-framework-CoreLocation

    Rhet Turnbull shared this short script for looking up the named timezone for a given location from Python on macOS using and the framework. It uses the package and pyobjc-framework-CoreLocation.

    1 min read
  13. Using DuckDB in Python to access Parquet data

    Did a quick experiment with DuckDB today, inspired by the bmschmidt/hathi-binary repo. That repo includes 3GB of data in 68 parquet files. Those files are 45MB each.

    1 min read
  14. Combined release notes from GitHub with jq and paginate-json

    Matt Holt asked: Is there a tool that uses the GitHub API to generate a doc with all release notes from a repo?

    2 min read
  15. Conditionally creating directories in cookiecutter

    I wanted my datasette-plugin cookiecutter template to create empty and directories if the user replied to the and prompts.

    1 min read
  16. Using VCR and pytest with pytest-recording

    pytest-recording is a neat pytest plugin that makes it easy to use the VCR library, which helps write tests against HTTP resources by automatically capturing responses and baking them into a YAML file…

    1 min read
  17. Installing flash-attn without compiling it

    If you ever run into instructions that tell you to do this: Do not try to do this . It is a trap. For some reason attempting to install this runs a compilation process which can take multiple hours .

    1 min read
  18. Tech Blogs and Podcasts

    TIL: ================= - Today I Learnt, by David Winterbottom - Sam Searles-Bryant - Federico Marani - Josh Branchaud - Simon Willison - Jake Worth - Hashrocket - Thoughtbot

    1 min read
  19. Using GPT-3 to figure out jq recipes

    I like jq, but I always have to think pretty hard about how to construct the right syntax for it. I wanted to sum up the total number of comments in JSON that looks like this (truncated example): The…

    1 min read
  20. Using pprint() to print dictionaries while preserving their key order

    While parsing a CSV file using today I noticed the following surprising result: This output the following: I had expected to preserve the order of keys from the CSV file, since Python has defaulted to…

    1 min read
  21. Build the official Python documentation locally

    First, checkout the cpython repo: $ git clone git@github.com:python/cpython cd into the directory: $ cd cpython/Doc To get a virtual environment with Sphinx and other required tools, run like this: $…

    1 min read