Notes on software engineering

Archive / page 5

81–100 of 550 posts, newest first.

  1. 2025
  2. 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
  3. 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
  4. 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
  5. 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
  6. Assigning a custom subdomain to a Fly app

    I deployed an app to Fly and decided to point a custom subdomain to it. My fly app is https://datasette-apache-proxy-demo.fly.dev/ I wanted the URL to be…

    1 min read
  7. Efficiently copying a file

    TLDR: Use I'm writing a Datasette plugin that handles an uploaded file, borrowing the Starlette mechanism for handling file uploads, documented here.

    1 min read
  8. Mocking a Textract LimitExceededException with boto

    For s3-ocr issue 21 I needed to write a test that simulates what happens when Amazon Textract returns a "LimitExceededException".

    1 min read
  9. Compiling to WASM with llvm on macOS

    howto-wasm-minimal by Zalka Ernő (my fork here) is a neat demo of a minimal WASM module. It uses C++ to define functions for simple image manipulation including blurring an image, compiles it to WASM…

    1 min read
  10. My Professional Journey and Passions

    admin only: false Introduction Hello! I’m Farshid Ashouri, Head of Data Engineering at JPMorgan Chase, with over 20 years of experience designing and operating large-scale distributed systems across…

    2 min read
  11. Auto-formatting YAML files with yamlfmt

    I decided to see if there was an equivalent of Black or Prettier for YAML files. I found yamlfmt from Google. Update : It turns out Prettier can format YAML too.

    2 min read
  12. Bundling Python inside an Electron app

    I used python-build-standalone for this, which provides a version of Python that is designed for easy of bundling - it's also used by PyOxidize.

    1 min read
  13. Format code examples in documentation with blacken-docs

    I decided to enforce that all code examples in the Datasette documentation be formatted using Black. Here's issue 1718 where I researched the options for doing this. I found the blacken-docs tool.

    1 min read
  14. Upgrading a Heroku PostgreSQL database with pg:copy

    Figured this out in https://github.com/simonw/simonwillisonblog/issues/132 - I was running PostgreSQL 9.x and I wanted 11.x in order to use the new option in Django 3.1.

    1 min read
  15. Using llama-cpp-python grammars to generate JSON

    llama.cpp recently added the ability to control the output of any model using a grammar. This is an incredibly powerful technique for working with a Large Language Model.

    3 min read
  16. Redirecting a whole domain with Cloudflare

    I had to run this site on for 24 hours due to a domain registration mistake I made. Once I got working again I wanted to permanently redirect the URLs on the temporary site to their equivalent on the…

    1 min read
  17. Customizing my zsh prompt

    I got fed up of the default macOS prompt: farshid@farshid-freebsd % Mainly because I like copying and pasting terminal examples into GitHub issues.

    1 min read
  18. Fixing "compinit: insecure directories" error

    Every time I opened a terminal on my new Mac running Catalina with zsh I got the following annoying error: Based on a tip in https://github.com/zsh-users/zsh-completions/issues/680 I fixed it by doing…

    1 min read
  19. Embedding JavaScript in a Jupyter notebook

    I recently found out modern browsers include a JavaScript API for creating public/private keys for cryptography.

    1 min read
  20. Using io.BufferedReader to peek against a non-peekable stream

    When building the –sniff option for (which attempts to detect the correct CSV delimiter and quote character by looking at the first 2048 bytes of a CSV file) I had the need to peek ahead in an…

    1 min read
  21. axe-core and shot-scraper for accessibility audits

    I just watched a talk by Pamela Fox at North Bay Python on Automated accessibility audits. The video should be up within 24 hours.

    1 min read