Example dashboard

Various statistics from my blog.

Owned by simonw, visibility: Public

Entries

3279

SQL query
select 'Entries' as label, count(*) as big_number from blog_entry

Blogmarks

8315

SQL query
select 'Blogmarks' as label, count(*) as big_number from blog_blogmark

Quotations

1354

SQL query
select 'Quotations' as label, count(*) as big_number from blog_quotation

Chart of number of entries per month over time

SQL query
select '<h2>Chart of number of entries per month over time</h2>' as html
SQL query
select to_char(date_trunc('month', created), 'YYYY-MM') as bar_label,
count(*) as bar_quantity from blog_entry group by bar_label order by count(*) desc

Ten most recent blogmarks (of 8315 total)

SQL query
select '## Ten most recent blogmarks (of ' || count(*) || ' total)' as markdown from blog_blogmark
SQL query
select link_title, link_url, commentary, created from blog_blogmark order by created desc limit 10

10 rows

link_title link_url commentary created
Introducing Mistral Small 4 https://mistral.ai/news/mistral-small-4 Big new release from Mistral today (despite the name) - a new Apache 2 licensed 119B parameter (Mixture-of-Experts, 6B active) model which they describe like this: > Mistral Small 4 is the first Mistral model to unify the capabilities of our flagship models, Magistral for reasoning, Pixtral for multimodal, and Devstral for agentic coding, into a single, versatile model. It supports `reasoning_effort="none"` or `reasoning_effort="high"`, with the latter providing "equivalent verbosity to previous Magistral models". The new model is [242GB on Hugging Face](https://huggingface.co/mistralai/Mistral-Small-4-119B-2603/tree/main). I [tried it out](https://gist.github.com/simonw/3dec228577559f15f26204a3cc550583) via the Mistral API using [llm-mistral](https://github.com/simonw/llm-mistral): llm install llm-mistral llm mistral refresh llm -m mistral/mistral-small-2603 "Generate an SVG of a pelican riding a bicycle" ![The bicycle is upside down and mangled and the pelican is a series of grey curves with a triangular beak.](https://static.simonwillison.net/static/2026/mistral-small-4.png) I couldn't find a way to set the reasoning effort in their [API documentation](https://docs.mistral.ai/api/endpoint/chat#operation-chat_completion_v1_chat_completions_post), so hopefully that's a feature which will land soon. Also from Mistral today and fitting their -stral naming convention is [Leanstral](https://mistral.ai/news/leanstral), an open weight model that is specifically tuned to help output the [Lean 4](https://lean-lang.org/) formally verifiable coding language. I haven't explored Lean at all so I have no way to credibly evaluate this, but it's interesting to see them target one specific language in this way. 2026-03-16 23:41:17+00:00
Use subagents and custom agents in Codex https://developers.openai.com/codex/subagents Subagents were announced in general availability today for OpenAI Codex, after several weeks of preview behind a feature flag. They're very similar to the Claude Code implementation, with default subagents for "explorer", "worker" and "default". It's unclear to me what the difference between "worker" and "default" is but based on their CSV example I think "worker" is intended for running large numbers of small tasks in parallel. Codex also lets you define custom agents as TOML files in `~/.codex/agents/`. These can have custom instructions and be assigned to use specific models - including `gpt-5.3-codex-spark` if you want [some raw speed](https://simonwillison.net/2026/Feb/12/codex-spark/). They can then be referenced by name, as demonstrated by this example prompt from the documentation: > `Investigate why the settings modal fails to save. Have browser_debugger reproduce it, code_mapper trace the responsible code path, and ui_fixer implement the smallest fix once the failure mode is clear.` The subagents pattern is widely supported in coding agents now. Here's documentation across a number of different platforms: - [OpenAI Codex subagents](https://developers.openai.com/codex/subagents/) - [Claude Code subagents](https://code.claude.com/docs/en/sub-agents) - [Gemini CLI subagents](https://geminicli.com/docs/core/subagents/) (experimental) - [Mistral Vibe subagents](https://docs.mistral.ai/mistral-vibe/agents-skills#agent-selection) - [OpenCode agents](https://opencode.ai/docs/agents/) - [Subagents in Visual Studio Code](https://code.visualstudio.com/docs/copilot/agents/subagents) - [Cursor Subagents](https://cursor.com/docs/subagents) 2026-03-16 23:03:56+00:00
Coding agents for data analysis https://simonw.github.io/nicar-2026-coding-agents/ Here's the handout I prepared for my NICAR 2026 workshop "Coding agents for data analysis" - a three hour session aimed at data journalists demonstrating ways that tools like Claude Code and OpenAI Codex can be used to explore, analyze and clean data. Here's the table of contents: > - [Coding agents](https://simonw.github.io/nicar-2026-coding-agents/coding-agents.html) > - [Warmup: ChatGPT and Claude](https://simonw.github.io/nicar-2026-coding-agents/warmup.html) > - [Setup Claude Code and Codex](https://simonw.github.io/nicar-2026-coding-agents/setup.html) > - [Asking questions against a database](https://simonw.github.io/nicar-2026-coding-agents/asking-questions.html) > - [Exploring data with agents](https://simonw.github.io/nicar-2026-coding-agents/exploring-data.html) > - [Cleaning data: decoding neighborhood codes](https://simonw.github.io/nicar-2026-coding-agents/cleaning-trees.html) > - [Creating visualizations with agents](https://simonw.github.io/nicar-2026-coding-agents/visualizations.html) > - [Scraping data with agents](https://simonw.github.io/nicar-2026-coding-agents/scraping.html) I ran the workshop using GitHub Codespaces and OpenAI Codex, since it was easy (and inexpensive) to distribute a budget-restricted API key for Codex that attendees could use during the class. Participants ended up burning $23 of Codex tokens. The exercises all used Python and SQLite and some of them used Datasette. One highlight of the workshop was when we started [running Datasette](https://simonw.github.io/nicar-2026-coding-agents/visualizations.html#javascript-visualizations) such that it served static content from a `viz/` folder, then had Claude Code start vibe coding new interactive visualizations directly in that folder. Here's a heat map it created for my trees database using Leaflet and [Leaflet.heat](https://github.com/Leaflet/Leaflet.heat), [source code here](https://gist.github.com/simonw/985ae2a6a3cd3df3fd375eb58dabea0f). ![Screenshot of a "Trees SQL Map" web application with the heading "Trees SQL Map" and subheading "Run a query and render all returned points as a heat map. The default query targets roughly 200,000 trees." Below is an input field containing "/trees/-/query.json", a "Run Query" button, and a SQL query editor with the text "SELECT cast(Latitude AS float) AS latitude, cast(Longitude AS float) AS longitude, CASE WHEN DBH IS NULL OR DBH = '' THEN 0.3 WHEN cast(DBH AS float) <= 0 THEN 0.3 WHEN cast(DBH AS float) >= 80 THEN 1.0" (query is truncated). A status message reads "Loaded 1,000 rows and plotted 1,000 points as heat map." Below is a Leaflet/OpenStreetMap interactive map of San Francisco showing a heat map overlay of tree locations, with blue/green clusters concentrated in areas like the Richmond District, Sunset District, and other neighborhoods. Map includes zoom controls and a "Leaflet | © OpenStreetMap contributors" attribution.](https://static.simonwillison.net/static/2026/tree-sql-map.jpg) I designed the handout to also be useful for people who weren't able to attend the session in person. As is usually the case, material aimed at data journalists is equally applicable to anyone else with data to explore. 2026-03-16 20:12:32+00:00
1M context is now generally available for Opus 4.6 and Sonnet 4.6 https://claude.com/blog/1m-context-ga Here's what surprised me: > Standard pricing now applies across the full 1M window for both models, with no long-context premium. OpenAI and Gemini both [charge more](https://www.llm-prices.com/#sel=gemini-3-1-pro-preview-200k%2Cgpt-5.4-272k%2Cgemini-3-1-pro-preview%2Cgpt-5.4) for prompts where the token count goes above a certain point - 200,000 for Gemini 3.1 Pro and 272,000 for GPT-5.4. 2026-03-13 18:29:13+00:00
Shopify/liquid: Performance: 53% faster parse+render, 61% fewer allocations https://github.com/Shopify/liquid/pull/2056 PR from Shopify CEO Tobias Lütke against Liquid, Shopify's open source Ruby template engine that was somewhat inspired by Django when Tobi first created it [back in 2005](https://simonwillison.net/2005/Nov/6/liquid/). Tobi found dozens of new performance micro-optimizations using a variant of [autoresearch](https://github.com/karpathy/autoresearch), Andrej Karpathy's new system for having a coding agent run hundreds of semi-autonomous experiments to find new effective techniques for training [nanochat](https://github.com/karpathy/nanochat). Tobi's implementation started two days ago with this [autoresearch.md](https://github.com/Shopify/liquid/blob/2543fdc1a101f555db208fb0deeb2e3bf1ae9e36/auto/autoresearch.md) prompt file and an [autoresearch.sh](https://github.com/Shopify/liquid/blob/2543fdc1a101f555db208fb0deeb2e3bf1ae9e36/auto/autoresearch.sh) script for the agent to run to execute the test suite and report on benchmark scores. The PR now lists [93 commits](https://github.com/Shopify/liquid/pull/2056/commits) from around 120 automated experiments. The PR description lists what worked in detail - some examples: > - **Replaced StringScanner tokenizer with `String#byteindex`.** Single-byte `byteindex` searching is ~40% faster than regex-based `skip_until`. This alone reduced parse time by ~12%. > - **Pure-byte `parse_tag_token`.** Eliminated the costly `StringScanner#string=` reset that was called for every `{% %}` token (878 times). Manual byte scanning for tag name + markup extraction is faster than resetting and re-scanning via StringScanner. [...] > - **Cached small integer `to_s`.** Pre-computed frozen strings for 0-999 avoid 267 `Integer#to_s` allocations per render. This all added up to a 53% improvement on benchmarks - truly impressive for a codebase that's been tweaked by hundreds of contributors over 20 years. I think this illustrates a number of interesting ideas: - Having a robust test suite - in this case 974 unit tests - is a *massive unlock* for working with coding agents. This kind of research effort would not be possible without first having a tried and tested suite of tests. - The autoresearch pattern - where an agent brainstorms a multitude of potential improvements and then experiments with them one at a time - is really effective. - If you provide an agent with a benchmarking script "make it faster" becomes an actionable goal. - CEOs can code again! Tobi has always been more hands-on than most, but this is a much more significant contribution than anyone would expect from the leader of a company with 7,500+ employees. I've seen this pattern play out a lot over the past few months: coding agents make it feasible for people in high-interruption roles to productively work with code again. Here's Tobi's [GitHub contribution graph](https://github.com/tobi) for the past year, showing a significant uptick following that [November 2025 inflection point](https://simonwillison.net/tags/november-2025-inflection/) when coding agents got really good. ![1,658 contributions in the last year - scattered lightly through Jun, Aug, Sep, Oct and Nov and then picking up significantly in Dec, Jan, and Feb.](https://static.simonwillison.net/static/2026/tobi-contribs.jpg) He used [Pi](https://github.com/badlogic/pi-mono) as the coding agent and released a new [pi-autoresearch](https://github.com/davebcn87/pi-autoresearch) plugin in collaboration with David Cortés, which maintains state in an `autoresearch.jsonl` file [like this one](https://github.com/Shopify/liquid/blob/3182b7c1b3758b0f5fe2d0fcc71a48bbcb11c946/autoresearch.jsonl). 2026-03-13 03:44:34+00:00
MALUS - Clean Room as a Service https://malus.sh/ Brutal satire on the whole vibe-porting license washing thing ([previously](https://simonwillison.net/2026/Mar/5/chardet/)): > Finally, liberation from open source license obligations. > > Our proprietary AI robots independently recreate any open source project from scratch. The result? **Legally distinct code** with corporate-friendly licensing. No attribution. No copyleft. No problems.. I admit it took me a moment to confirm that this was a joke. Just too on-the-nose. 2026-03-12 20:08:55+00:00
Coding After Coders: The End of Computer Programming as We Know It https://www.nytimes.com/2026/03/12/magazine/ai-coding-programming-jobs-claude-chatgpt.html?unlocked_article_code=1.SlA.DBan.wbQDi-hptjj6 Epic piece on AI-assisted development by Clive Thompson for the New York Times Magazine, who spoke to more than 70 software developers from companies like Google, Amazon, Microsoft, Apple, plus other individuals including Anil Dash, Thomas Ptacek, Steve Yegge, and myself. I think the piece accurately and clearly captures what's going on in our industry right now in terms appropriate for a wider audience. I talked to Clive a few weeks ago. Here's the quote from me that made it into the piece. > Given A.I.’s penchant to hallucinate, it might seem reckless to let agents push code out into the real world. But software developers point out that coding has a unique quality: They can tether their A.I.s to reality, because they can demand the agents test the code to see if it runs correctly. “I feel like programmers have it easy,” says Simon Willison, a tech entrepreneur and an influential blogger about how to code using A.I. “If you’re a lawyer, you’re screwed, right?” There’s no way to automatically check a legal brief written by A.I. for hallucinations — other than face total humiliation in court. The piece does raise the question of what this means for the future of our chosen line of work, but the general attitude from the developers interviewed was optimistic - there's even a mention of the possibility that the Jevons paradox might increase demand overall. One critical voice came from an Apple engineer: > A few programmers did say that they lamented the demise of hand-crafting their work. “I believe that it can be fun and fulfilling and engaging, and having the computer do it for you strips you of that,” one Apple engineer told me. (He asked to remain unnamed so he wouldn’t get in trouble for criticizing Apple’s embrace of A.I.) That request to remain anonymous is a sharp reminder that corporate dynamics may be suppressing an unknown number of voices on this topic. 2026-03-12 19:23:44+00:00
Sorting algorithms https://tools.simonwillison.net/sort-algorithms Today in animated explanations built using Claude: I've always been a fan of animated demonstrations of sorting algorithms so I decided to spin some up on my phone using Claude Artifacts, then added Python's timsort algorithm, then a feature to run them all at once. Here's the [full sequence of prompts](https://claude.ai/share/2c09f6f7-57ed-47eb-af2e-fc39ddc4c39f): > Interactive animated demos of the most common sorting algorithms This gave me bubble sort, selection sort, insertion sort, merge sort, quick sort, and heap sort. > Add timsort, look up details in a clone of python/cpython from GitHub Let's add Python's [Timsort](https://en.wikipedia.org/wiki/Timsort)! Regular Claude chat can clone repos from GitHub these days. In the transcript you can see it clone the repo and then consult [Objects/listsort.txt](https://github.com/python/cpython/blob/d19de375a204c74ab5f3a28ec42335bae139033d/Objects/listsort.txt) and [Objects/listobject.c](https://github.com/python/cpython/blob/d19de375a204c74ab5f3a28ec42335bae139033d/Objects/listobject.c). (I should note that when I asked GPT-5.4 Thinking to review Claude's implementation [it picked holes in it](https://chatgpt.com/share/69b1fc93-f360-8006-b8b7-22c3da639367) and said the code "is a simplified, Timsort-inspired adaptive mergesort".) > I don't like the dark color scheme on the buttons, do better > > Also add a "run all" button which shows smaller animated charts for every algorithm at once in a grid and runs them all at the same time It came up with a color scheme I liked better, "do better" is a fun prompt, and now the "Run all" button produces this effect: ![Animated sorting algorithm race visualization titled "All algorithms racing" with controls for SIZE (50) and SPEED (100), Stop and Shuffle buttons, and a "Back to single" button. A legend shows Comparing (pink), Swapping (orange), Pivot (red), and Sorted (purple) indicators. Seven algorithms race simultaneously in card panels: Bubble sort (Sorting… — Comparisons: 312, Swaps: 250), Selection sort (Sorting… — Comparisons: 550, Swaps: 12), Insertion sort (Sorting… — Comparisons: 295, Swaps: 266), Merge sort (#3 — Comparisons: 225, Swaps: 225), Quick sort (#2 — Comparisons: 212, Swaps: 103), Heap sort (Sorting… — Comparisons: 358, Swaps: 203), and Timsort (#1 — Comparisons: 215, Swaps: 332). Finished algorithms (Timsort, Quick sort, Merge sort) display fully sorted purple bar charts and are highlighted with purple borders.](https://static.simonwillison.net/static/2026/sorts-32-colors-lossy.gif) 2026-03-11 22:58:06+00:00
Production query plans without production data https://boringsql.com/posts/portable-stats/ Radim Marek describes the new [`pg_restore_relation_stats()` and `pg_restore_attribute_stats()` functions](https://www.postgresql.org/docs/current/functions-admin.html#FUNCTIONS-ADMIN-STATSMOD) that were introduced [in PostgreSQL 18](https://www.postgresql.org/docs/current/release-18.html) in September 2025. The PostgreSQL query planner makes use of internal statistics to help it decide how to best execute a query. These statistics often differ between production data and development environments, which means the query plans used in production may not be replicable in development. PostgreSQL's new features now let you copy those statistics down to your development environment, allowing you to simulate the plans for production workloads without needing to copy in all of that data first. I found this illustrative example useful: SELECT pg_restore_attribute_stats( 'schemaname', 'public', 'relname', 'test_orders', 'attname', 'status', 'inherited', false::boolean, 'null_frac', 0.0::real, 'avg_width', 9::integer, 'n_distinct', 5::real, 'most_common_vals', '{delivered,shipped,cancelled,pending,returned}'::text, 'most_common_freqs', '{0.95,0.015,0.015,0.015,0.005}'::real[] ); This simulates statistics for a `status` column that is 95% `delivered`. Based on these statistics PostgreSQL can decide to use an index for `status = 'shipped'` but to instead perform a full table scan for `status = 'delivered'`. These statistics are pretty small. Radim says: > Statistics dumps are tiny. A database with hundreds of tables and thousands of columns produces a statistics dump under 1MB. The production data might be hundreds of GB. The statistics that describe it fit in a text file. I posted on the SQLite user forum asking if SQLite could offer a similar feature and D. Richard Hipp promptly replied [that it has one already](https://sqlite.org/forum/forumpost/480c5cb8a3898346): > All of the data statistics used by the query planner in SQLite are available in the [sqlite_stat1 table](https://sqlite.org/fileformat.html#the_sqlite_stat1_table) (or also in the [sqlite_stat4 table](https://sqlite.org/fileformat.html#the_sqlite_stat4_table) if you happen to have compiled with SQLITE_ENABLE_STAT4). That table is writable. You can inject whatever alternative statistics you like. > > This approach to controlling the query planner is mentioned in the documentation: > <https://sqlite.org/optoverview.html#manual_control_of_query_plans_using_sqlite_stat_tables>. > > See also <https://sqlite.org/lang_analyze.html#fixed_results_of_analyze>. > > The ".fullschema" command in the CLI outputs both the schema and the content of the sqlite_statN tables, exactly for the reasons outlined above - so that we can reproduce query problems for testing without have to load multi-terabyte database files. 2026-03-09 15:05:15+00:00
Codex for Open Source https://developers.openai.com/codex/community/codex-for-oss Anthropic announced six months of free Claude Max for maintainers of popular open source projects (5,000+ stars or 1M+ NPM downloads) [on 27th February](https://simonwillison.net/2026/Feb/27/claude-max-oss-six-months/). Now OpenAI have launched their comparable offer: six months of ChatGPT Pro (same $200/month price as Claude Max) with Codex and "conditional access to Codex Security" for core maintainers. Unlike Anthropic they don't hint at the exact metrics they care about, but the [application form](https://openai.com/form/codex-for-oss/) does ask for "information such as GitHub stars, monthly downloads, or why the project is important to the ecosystem." 2026-03-07 18:13:39+00:00
Copy and export data

Duration: 5.13ms