Notes on software engineering

Archive / page 27

521–540 of 547 posts, newest first.

  1. 2023
  2. git bisect

    I fixed two bugs in Datasette using - a tool which lets you run an automated binary search against a commit log to find the source of a bug.

    1 min read
  3. Tracking SQLite table history using a JSON audit log

    Today I decided to try a slightly different approach, using JSON to store changes to a table in an audit log.

    3 min read
  4. Very basic tsc usage

    I guess I have to learn TypeScript now. Here's how I got started in as few steps as possible, with the help of Get Started With Typescript in 2019 by Robert Cooper.

    2 min read
  5. Defining setup.py dependencies using a URL

    For sqlite-utils issue 464 I implemented a fix to a tiny bug in a dependency in my own fork on GitHub.

    1 min read
  6. Decorators with optional arguments

    sqlite-utils provides a decorator for registering custom Python functions that looks like this: I wanted to add an optional deterministic=True parameter to the decorator.

    1 min read
  7. Ordered group_concat() in SQLite

    I was trying to use to glue together some column values into a stiched together Markdown document. My first attempt looked like this: This attempt didn't work, because the order of the elements…

    1 min read
  8. Dump out all GitHub Actions context

    Useful for seeing what's available for conditions (see context and expression syntax). I copied this example action from here and deployed it here. Here's an example run.

    1 min read
  9. Building a specific version of SQLite with pysqlite on macOS/Linux

    I wanted the ability to test my Python software against specific version of SQLite on macOS. I found a way to do that using pysqlite3.

    1 min read
  10. Querying newline-delimited JSON logs using AWS Athena

    I've been writing my Fly logs to S3 in newline-delimited JSON format using the recipe described in Writing Fly logs to S3. I recently needed to run a search against those logs.

    2 min read
  11. Set environment variables for all steps in a GitHub Action

    From this example I learned that you can set environment variables such that they will be available in ALL jobs once at the top of a workflow: I had previously been using this much more verbose…

    1 min read
  12. Using uv to develop Python command-line applications

    I finally figured out a process that works for me for hacking on Python CLI utilities using uv to manage my development environment, thanks to a little bit of help from Charlie Marsh.

    3 min read
  13. A tip for debugging pytest-httpx

    I use pytest-httpx in a bunch of my projects. Occasionally I run into test failures like this one, which can sometimes be really hard to figure out: Today I figured out a pattern for investigating…

    1 min read
  14. Using pytest and Playwright to test a JavaScript web application

    I wrote the tests using playwright-pytest, which lets you write tests in Python using Microsoft's Playwright browser automation library.

    2 min read
  15. A simple Python implementation of the ReAct pattern for LLMs

    A popular nightmare scenario for AI is giving it access to tools, so it can make API calls and execute its own code and generally break free of the constraints of its initial environment.

    1 min read
  16. Comparing two training datasets using sqlite-utils

    WizardLM is "an Instruction-following LLM Using Evol-Instruct". It's a fine-tuned model on top of Meta's LLaMA.

    3 min read
  17. Preventing double form submissions with JavaScript

    I needed this for VIAL issue 722. I decided to disable form submissions for two seconds after they are submitted, to protect against accidental double submissions without risk of unexpected issues…

    1 min read
  18. Writing tests for the ASGI lifespan protocol with HTTPX

    Uvicorn silently ignores exceptions that occur during startup against the ASGI lifespan protocol - see starlette/issues/486.

    1 min read
  19. Configuring auto-update for an Electron app

    This is almost really simple. I used electron/update-electron-app for it, the instructions for which are: - Add it to with - Make sure your field in that file points to your GitHub repository - Use…

    1 min read
  20. Running LLaMA 7B and 13B on a 64GB M2 MacBook Pro with llama.cpp

    Facebook's LLaMA is a "collection of foundation language models ranging from 7B to 65B parameters", released on February 24th 2023. It claims to be small enough to run on consumer hardware.

    4 min read
  21. Converting no-decimal-point latitudes and longitudes using jq

    I had some data with weird co-ordinates in it: Note the and in there. I know that this data refers to somewhere in Houston, and a few people on Twitter pointed out that it's actually really simple…

    1 min read