Simon Willison’s Weblog

Subscribe

July 2022

73 posts: 4 entries, 25 links, 2 quotes, 42 beats

July 13, 2022

Bringing page transitions to the web (via) Jake Archibald’s 13 minute Google I/O talk demonstrating the page transitions API that’s now available in Chrome Canary. This is a fascinating piece of API design—it works by effectively creating a static image screenshot of the before and after states of the transition, then letting you define CSS animations that animate a transition between the two static images. By default the screenshot encompasses the full viewport, but you can instead define multiple elements within the page and apply separate transitions to them. It’s only available for SPAs right now but the final design should include support for multi-page applications as well—which means transitions with no JavaScript needed at all!

# 4:26 pm / css, javascript, google-io, jake-archibald, view-transitions

TIL Testing Electron apps with Playwright and GitHub Actions — Yesterday [I figured out (issue 133)](https://github.com/simonw/datasette-app/issues/133) how to use Playwright to run tests against my Electron app, and then execute those tests in CI using GitHub Actions, for my [datasett-app](https://github.com/simonw/datasette-app) repo for my [Datasette Desktop](https://datasette.io/desktop) macOS application.

July 14, 2022

TIL Freezing requirements with pip-tools — I tried [pip-tools](https://github.com/jazzband/pip-tools) for the first time today to pin the requirements for the [natbat/pillarpointstewards](https://github.com/natbat/pillarpointstewards) Django app.

The DALL·E 2 Prompt Book (via) This is effectively DALL-E: The Missing Manual: an 81 page PDF book that goes into exhaustive detail about how to get the most out of DALL-E through creative prompt design.

# 11:26 pm / ai, openai, dalle, prompt-engineering, generative-ai

July 15, 2022

Datasette Discord community (via) I started a Discord chat community for Datasette. 57 people have joined up already!

# 3:17 am / datasette, discord

Release sqlite-utils 3.28 — Python CLI utility and library for manipulating SQLite databases

July 18, 2022

Release datasette 0.62a1 — An open source multi-tool for exploring and publishing data
Release datasette-sentry 0.2a0 — Datasette plugin for configuring Sentry
Release datasette-graphql 2.1.1 — Datasette plugin providing an automatic GraphQL API for your SQLite databases

July 19, 2022

Release s3-ocr 0.5 — Tools for running OCR against files stored in S3

Soft Deletion Probably Isn’t Worth It. Brandur argues that soft deletion—where you delete records by populating a “is_deleted” or “deleted_at” column in your table—isn’t worth the additional complexity and risk it adds to other database queries. Instead, he suggests having a separate deleted records table which records the deleted data in a JSON blob—allowing you to review and recover it manually if necessary, and giving you an easy way to expire deleted records that have exceeded your retention policy.

# 8:40 pm / databases, brandur-leach

July 20, 2022

The Checkered Flag Diagram for visualizing SQL joins. I really like this alternative to Venn diagrams for showing the difference between different types of SQL join (left join, right join, cross join etc).

# 1:16 pm / sql

Visual Studio Code: Development Process (via) A detailed description of the development process used by VS Code: a 6-12 month high level roadmap, then month long iterations that each result in a new version that is shipped to users. Includes details of how the four weeks of each iteration are spent too.

# 4:34 pm / microsoft, software-engineering, vs-code

Weeknotes: Datasette, sqlite-utils, Datasette Desktop

A flurry of releases this week, including a new Datasette alpha and a fixed Datasette Desktop.

[... 1,113 words]

How John Wiseman tracks worldwide GPS interference (via) Part of the ADS-B signals broadcast by commercial aircraft include a measure of GPS accuracy. By collecting global data every day, John is able to generate a map of areas that are experiencing higher than expected GPS interference, which generally corresponds to military jamming technology. He sometimes posts the resulting maps on Twitter—he just picked up increasing jamming activity around Moscow.

# 11:45 pm / gps, john-wiseman

July 22, 2022

Promise Maps. Egbert Teeselink describes a neat JavaScript caching pattern: instead of caching key:value cache key:promise-that-resolves-to-value—doing this gives you dog piling prevention for free, because the first lookup of a value trigers the computation to fetch it while subsequent lookups wait on the same promise to resolve—or resolve instantly if the computation has completed.

# 3:52 pm / dogpile, javascript

Release datasette-insert 0.8 — Datasette plugin for inserting and updating data

July 23, 2022

Release datasette-publish-vercel 0.14.1 — Datasette plugin for publishing data using Vercel

July 24, 2022

TIL Using pytest and Playwright to test a JavaScript web application — I [decided to add](https://github.com/simonw/datasette-lite/issues/35) automated tests to my [Datasette Lite](https://simonwillison.net/2022/May/4/datasette-lite/) project. Datasette Lite bundles my Datasette Python web application as a client-side application running inside WebAssembly using Pyodide.

I discovered a while ago that all those errors and bugs that only appear when you demo something to an audience also magically appear when you record yourself demoing it to nobody. Maybe narrating a feature to a pretend audience takes the blinders off enough that you notice little mistakes you wouldn't have otherwise.

karaterobot

# 8:59 pm / testing

You should take more screenshots (via) Alex Chan suggests saving screenshots of your work, since they may well last a lot longer than the projects themselves. I try to do that these days but I have SO many projects from the past that I didn’t capture in this way, and that I really regret not keeping a better visual record of.

# 9:03 pm / archiving

Sqitch tutorial for SQLite (via) Sqitch is an interesting implementation of database migrations: it’s a command-line tool written in Perl with an interface similar to Git, providing commands to create, run, revert and track migration scripts. The scripts the selves are written as SQL in whichever database engine you are using. The tutorial for SQLite gives a good idea as to how the whole system works.

# 11:44 pm / databases, migrations, sqlite

July 25, 2022

TIL Deploying a redbean app to Fly — [redbean](https://redbean.dev/) is a fascinating project - it provides a web server in a self-contained executable which you can add assets (or dynamic Lua code) to just by zipping them into the same binary package.

Reduce Friction. Outstanding essay on software engineering friction and development team productivity by C J Silverio: it explains the concept of “friction” (and gives great definitions of “process”, “ceremony” and “formality” in the process) as it applies to software engineering, lays out the challenges involved in getting organizations to commit to reducing it and then provides actionable advice on how to get consensus and where to invest your efforts in order to make things better.

# 10:25 pm / software-engineering, management

July 26, 2022

viewport-preview (via) I built a tiny tool which lets you preview a URL in a bunch of different common browser viewport widths, using iframes.

# 12 am / css, iframes, mobile, projects, testing

Cosmopolitan: Compiling Python. Cosmopolitan is Justine Tunney’s “build-once run-anywhere C library”—part of the αcτµαlly pδrταblε εxεcµταblε effort, which produces wildly clever binary executable files that work on multiple different platforms, and is the secret sauce behind redbean. I hadn’t realized this was happening but there’s an active project to get Python to work as this format, producing a new way of running Python applications as standalone executables, only these ones have the potential to run unmodified on Windows, Linux and macOS.

# 8:43 pm / python, redbean, cosmopolitan, justine-tunney

July 27, 2022

SQLite Internals: Pages & B-trees (via) Ben Johnson provides a delightfully clear introduction to SQLite internals, describing the binary format used to store rows on disk and how SQLite uses 4KB pages for both row storage and for the b-trees used to look up records.

# 2:57 pm / algorithms, databases, sqlite, ben-johnson

Fastest way to turn HTML into text in Python (via) A light benchmark of the new-to-me selectolax Python library shows it performing extremely well for tasks such as extracting just the text from an HTML string, after first manipulating the DOM. selectolax is a Python binding over the Modest and Lexbor HTML parsing engines, which are written in no-outside-dependency C.

# 5:55 pm / html, python

TIL Testing things in Fedora using Docker — I got [a report](https://twitter.com/peterjanes/status/1552407491819884544) of a bug with my [s3-ocr tool](https://simonwillison.net/2022/Jun/30/s3-ocr/) running on Fedora.

July 28, 2022

Release sqlite-fts4 1.0.2 — Custom Python functions for working with SQLite FTS4

2022 » July

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031