Simon Willison’s Weblog

Subscribe

January 2022

50 posts: 7 entries, 14 links, 3 quotes, 26 beats

Jan. 19, 2022

TIL Helper function for pagination using AWS boto3 — I noticed that a lot of my boto3 code in [s3-credentials](https://github.com/simonw/s3-credentials) looked like this:

Jan. 20, 2022

How to Add a Favicon to Your Django Site (via) Adam Johnson did the research on the best way to handle favicons - Safari still doesn't handle SVG icons so the best solution today is a PNG served from the /favicon.ico path. This article inspired me to finally add a proper favicon to Datasette.

# 7:03 am / django, favicons, adam-johnson

TIL Pixel editing a favicon with Pixelmator — I wanted to [add a favicon](https://github.com/simonw/datasette/issues/1603) to Datasette, using a PNG image served from `/favicon.ico` as suggested in [this article by Adam Johnson](https://adamj.eu/tech/2022/01/18/how-to-add-a-favicon-to-your-django-site/).
TIL Promoting the stable version of the documentation using rel=canonical — I was thinking about documentation SEO today. Like many projects, Datasette offers multiple versions of the documentation:
TIL Linking from /latest/ to /stable/ on Read The Docs — [Read The Docs](https://readthedocs.org/) has a handy feature where documentation for older versions will automatically link to the latest release, for example [on this page](https://docs.datasette.io/en/0.56/spatialite.html):

Jan. 21, 2022

Release datasette 0.60.1 — An open source multi-tool for exploring and publishing data

Roblox Return to Service 10/28-10/31 2021 (via) A particularly good example of a public postmortem on an outage. Roblox was down for 72 hours last year, as a result of an extremely complex set of circumstances which took a lot of effort to uncover. It’s interesting to think through what kind of monitoring you would need to have in place to help identify the root cause of this kind of issue.

# 4:41 pm / ops, observability, postmortem

TIL Using the undocumented Fly GraphQL API — [Fly](https://fly.io/) has a GraphQL API which is used by some of their own tools - I found it while [browsing around their code](https://github.com/superfly/flyctl/blob/603b0adccf5416188eabaa7dc73f9c0ec88fa6ca/api/resource_volumes.go#L5-L40) on GitHub.

Jan. 25, 2022

Observable Plot Cheatsheets (via) Beautiful new set of cheatsheets by Mike Freeman for the Observable Plot charting library. This is really top notch documentation—the cheatsheets are available as printable PDFs but the real value here is in the interactive versions of them, which include Observable-powered sliders to tweak the different examples and copy out the resulting generated code.

# 10:12 pm / visualization, observable, observable-plot

Release s3-credentials 0.10 — A tool for creating credentials for accessing S3 buckets

Weeknotes: python_requires, documentation SEO

Visit Weeknotes: python_requires, documentation SEO

Fixed Datasette on Python 3.6 for the last time. Worked on documentation infrastructure improvements. Spent some time with Fly Volumes.

[... 1,497 words]

Jan. 26, 2022

Release sqlite-utils 3.22.1 — Python CLI utility and library for manipulating SQLite databases
TIL Opt-in integration tests with pytest --integration — For both [s3-credentials](https://github.com/simonw/s3-credentials) and [datasette-publish-fly](https://github.com/simonw/datasette-publish-fly) I have a need for real-world integration tests that actually interact with the underlying APIs (AWS or Fly) to create and destroy resources on those platforms.

Jan. 27, 2022

Two reasons Kubernetes is so complex (via) I like how this article proposes that Kubernetes isn’t trying to be a tool for deploying containers—it’s more like an operating system for a cluster of machines, responsible for the same kind of goals as a regular operating system such as resource sharing and portability. And since everything is built as control loops which attempt to modify actual state to fit the declarative desired state, errors can occur asynchronously seconds or even minutes after the desired state has been updated.

# 6:25 pm / kubernetes

Consistent with the practices outlined in SP 800-63B, agencies must remove password policies that require special characters and regular password rotation from all systems within one year of the issuance of this memorandum. These requirements have long been known to lead to weaker passwords in real-world use and should not be employed by the Federal Government.

Memo: Moving the U.S. Government Toward Zero Trust Cybersecurity Principles

# 7:18 pm / government, passwords, security

The baseline for web development in 2022 (via) “TL;DR:The baseline for web development in 2022 is: low-spec Android devices in terms of performance, Safari from two years before in terms of Web Standards, and 4G in terms of networks. The web in general is not answering those needs properly, especially in terms of performance where factors such as an over-dependence on JavaScript are hindering our sites’ performance.”

# 8:09 pm / alex-russell, web-performance

Jan. 30, 2022

Black 22.1.0 (via) Black, the uncompromising code formatter for Python, has had its first stable non-beta release after almost four years of releases. I adopted Black a few years ago for all of my projects and I wouldn’t release Python code without it now—the productivity boost I get from not spending even a second thinking about code formatting and indentation is huge.

I know Django has been holding off on adopting it until a stable release was announced, so hopefully that will happen soon.

# 1:23 am / django, python, lukasz-langa, black

Mypyc (via) Spotted this in the Black release notes: “Black is now compiled with mypyc for an overall 2x speed-up”. Mypyc is a tool that compiles Python modules (written in a subset of Python) to C extensions—similar to Cython but using just Python syntax, taking advantage of type annotations to perform type checking and type inference. It’s part of the mypy type checking project, which has been using it since 2019 to gain a 4x performance improvement over regular Python.

# 1:31 am / c, performance, python, mypy

A CGo-free port of SQLite. Fascinating Go version of SQLite, which uses Go code that has been translated from the original SQLite C using ccgo, a package by the same author which “translates cc ASTs to Go source code”. It claims to pass the full public SQLite test suite, which is very impressive.

# 10:25 pm / compilers, go, sqlite

Jan. 31, 2022

Writing better release notes

Release notes are an important part of the open source process. I’ve been thinking about these a lot recently, and I’ve assembled some thoughts on how to do a better job with them.

[... 918 words]

2022 » January

MTWTFSS
     12
3456789
10111213141516
17181920212223
24252627282930
31