Simon Willison’s Weblog

Subscribe

January 2021

69 posts: 7 entries, 9 links, 4 quotes, 49 beats

Jan. 1, 2021

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

Jan. 3, 2021

Weeknotes: A flurry of not-quite-finished features

My Christmas present to myself this year was to allow myself to spend a week working on stuff I found interesting, rather than sticking to the most important things. This may have been a mistake: it’s left me with a flurry of interesting but not-quite-finished features.

[... 2,249 words]

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

sqlite-utils 3.2 (via) As discussed in my weeknotes yesterday, this is the release of sqlite-utils that adds the new “cached table counts via triggers” mechanism.

# 9:25 pm / projects, sqlite, sqlite-utils

Jan. 4, 2021

hooks-in-a-nutshell.js (via) Neat, heavily annotated implementation of React-style hooks in pure JavaScript, really useful for understanding how they work.

# 6:36 pm / javascript, react

TIL Packaging a Python app as a standalone binary with PyInstaller — [PyInstaller](https://www.pyinstaller.org/) can take a Python script and bundle it up as a standalone executable for macOS, Linux and apparently Windows too (I've not tried it on Windows yet).

Jan. 5, 2021

Everything You Always Wanted To Know About GitHub (But Were Afraid To Ask) (via) ClickHouse by Yandex is an open source column-oriented data warehouse, designed to run analytical queries against TBs of data. They've loaded the full GitHub Archive of events since 2011 into a public instance, which is a great way of both exploring GitHub activity and trying out ClickHouse. Here's a query I just ran that shows number of watch events per year, for example:

SELECT toYear(created_at) as yyyy, count()
FROM github_events
WHERE event_type = 'WatchEvent' group by yyyy

# 1:02 am / analytics, github, sql, big-data, clickhouse

Generally, product-aligned teams deliver better products more rapidly. Again, Conway’s Law is inescapable; if delivering a new feature requires several teams to coordinate, you’ll struggle compared to an org where a single team can execute on a new feature.

Jacob Kaplan-Moss

# 4:33 pm / jacob-kaplan-moss, management

Release datasette-css-properties 0.1 — Experimental Datasette output plugin using CSS properties

DALL·E: Creating Images from Text (via) “DALL·E is a 12-billion parameter version of GPT-3 trained to generate images from text descriptions, using a dataset of text–image pairs.”. The examples in this paper are astonishing—“an illustration of a baby daikon radish in a tutu walking a dog” generates exactly that.

# 8:31 pm / machine-learning, ai, openai, dalle, generative-ai

Jan. 6, 2021

Release datasette-export-notebook 0.1 — Datasette plugin providing instructions for exporting data to Jupyter or Observable

brumm.af/shadows (via) I did not know this trick: by defining multiple box-shadow values as a comma separated list you can create much more finely tuned shadow effects. This tool by Philipp Brumm provides a very smart UI for designing shadows.

# 4:12 pm / css, design

When you know something it is almost impossible to imagine what it is like not to know that thing. This is the curse of knowledge, and it is the root of countless misunderstandings and inefficiencies. Smart people who are comfortable with complexity can be especially prone to it!

If you don’t guard against the curse of knowledge it has the potential to obfuscate all forms of communication, including code. The more specialized your work, the greater the risk that you will communicate in ways that are incomprehensible to the uninitiated.

Joel Goldberg

# 7:43 pm / teaching

Jan. 7, 2021

Custom Properties as State. Fascinating thought experiment by Chris Coyier: since CSS custom properties can be defined in an external stylesheet, we can APIs that return stylesheets defining dynamically server-side generated CSS values for things like time-of-day colour schemes or even strings that can be inserted using ::after { content: var(--my-property).

This gave me a very eccentric idea for a Datasette plugin...

# 7:39 pm / apis, css, css-custom-properties

datasette-css-properties (via) My new Datasette plugin defines a “.css” output format which returns the data from the query as a valid CSS stylesheet defining custom properties for each returned column. This means you can build a page using just HTML and CSS that consumes API data from Datasette, no JavaScript required! Whether this is a good idea or not is left as an exercise for the reader.

# 7:42 pm / css, projects, datasette, css-custom-properties

Release datasette-css-properties 0.1.1 — Experimental Datasette output plugin using CSS properties
Release datasette-css-properties 0.2 — Experimental Datasette output plugin using CSS properties

APIs from CSS without JavaScript: the datasette-css-properties plugin

Visit APIs from CSS without JavaScript: the datasette-css-properties plugin

I built a new Datasette plugin called datasette-css-properties. It’s very, very weird—it adds a .css output extension to Datasette which outputs the result of a SQL query using CSS custom property format. This means you can display the results of database queries using pure CSS and HTML, no JavaScript required!

[... 891 words]

Jan. 9, 2021

Release datasette-export-notebook 0.1.1 — Datasette plugin providing instructions for exporting data to Jupyter or Observable

Jan. 10, 2021

Weeknotes: datasette-export-notebook, PyInstaller packaged Datasette, CBSAs

Visit Weeknotes: datasette-export-notebook, PyInstaller packaged Datasette, CBSAs

What a terrible week. I’ve found it hard to concentrate on anything substantial. In a mostly futile attempt to distract myself from doomscrolling I’ve mainly been building some experimental output plugins, fiddling with PyInstaller and messing around with shapefiles.

[... 732 words]

Jan. 11, 2021

Release datasette-export-notebook 0.2 — Datasette plugin providing instructions for exporting data to Jupyter or Observable

Jan. 12, 2021

Culture is the Behavior You Reward and Punish (via) Jocelyn Goldfein describes an intriguing exercise for discovering your company culture: imagine a new hire asking for advice on what makes people successful there, and use that to review what behavior is rewarded and discouraged.

# 6:09 am

TIL Identifying column combination patterns in a SQLite table — Given a large, heterogeneous table I wanted to identify patterns in the rows in terms of which columns were not null.
Release sqlite-utils 3.2.1 — Python CLI utility and library for manipulating SQLite databases

Jan. 14, 2021

Release markdown-to-sqlite 0.2 — CLI tool for loading markdown files into a SQLite database

Jan. 16, 2021

TIL Recovering data from AWS Lightsail using EC2 — I ran into problems with my AWS Lightsail instance: it exceeded the CPU burst quota for too long and was suspended, and I couldn't figure out how to un-suspend it.

Jan. 17, 2021

Weeknotes: Still pretty distracted

Not a lot to report this week. U.S. politics continues to make it extremely difficult to focus on anything substantial.

[... 727 words]

TIL Bulk fetching repository details with the GitHub GraphQL API — I wanted to be able to fetch details of a list of different repositories from the GitHub GraphQL API by name in a single operation.

Jan. 18, 2021

Release sqlite-utils 3.3 — Python CLI utility and library for manipulating SQLite databases
Release swarm-to-sqlite 0.3.3 — Create a SQLite database containing your checkin history from Foursquare Swarm

2021 » January

MTWTFSS
    123
45678910
11121314151617
18192021222324
25262728293031