惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
爱范儿
爱范儿
Martin Fowler
Martin Fowler
T
The Blog of Author Tim Ferriss
B
Blog RSS Feed
博客园 - 聂微东
G
GRAHAM CLULEY
Engineering at Meta
Engineering at Meta
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
WordPress大学
WordPress大学
Scott Helme
Scott Helme
AI
AI
S
Security Affairs
T
Threat Research - Cisco Blogs
M
MIT News - Artificial intelligence
T
Troy Hunt's Blog
H
Hackread – Cybersecurity News, Data Breaches, AI and More
人人都是产品经理
人人都是产品经理
AWS News Blog
AWS News Blog
T
Threatpost
Cyberwarzone
Cyberwarzone
www.infosecurity-magazine.com
www.infosecurity-magazine.com
U
Unit 42
V
Vulnerabilities – Threatpost
J
Java Code Geeks
博客园 - Franky
月光博客
月光博客
Blog — PlanetScale
Blog — PlanetScale
NISL@THU
NISL@THU
D
Docker
小众软件
小众软件
N
News and Events Feed by Topic
Microsoft Security Blog
Microsoft Security Blog
Y
Y Combinator Blog
A
Arctic Wolf
D
DataBreaches.Net
云风的 BLOG
云风的 BLOG
Forbes - Security
Forbes - Security
量子位
PCI Perspectives
PCI Perspectives
美团技术团队
K
KPMG report finds enterprise disconnect between AI and its ROI | CIO
I
InfoQ
Security Archives - TechRepublic
Security Archives - TechRepublic
有赞技术团队
有赞技术团队
腾讯CDC
P
Proofpoint News Feed
S
Security @ Cisco Blogs
G
Google Developers Blog
C
Cisco Blogs

jonno.nz

Ukraine’s Drone Advantage Is an Engineering Loop — jonno.nz Prove the Machine Wrong — jonno.nz Your Show HN dies in 7 hours — jonno.nz The Fastest Repealers in the West — jonno.nz Six Years, $228 Million, Zero Metres of Track The holes that kill you are the ones you never tested What Happens When a Worm Drives Claude? The Laws of Human Nature Conscious Minimalism The dent and the crater I Built a Read-Later Chrome Extension Because Pocket Died Product market fit isn't a stage, it's a gauntlet Change management Three Ways to Look at Time What an hour of your attention is worth Teaching a Neural Network to Watch Crime Like Video Open-Source Agent That Teaches Claude Code Your Architecture OpenHealth – Chat with Apple Health Data, Anywhere Claude Code Can Now Spawn Copies of Itself in Isolated VMs The Future of Security Is an Open-Source Model That Detects and Acts on Threats I Spent 29 Hours Debugging iptables to Boot VMs in 4 Seconds Can You Beat Last Month? Claude Code Running Claude Code in 4-Second Disposable VMs Stealing NanoClaw Patterns for Web Apps and SaaS What if your browser built the UI for you? — jonno.nz What the Data Actually Shows How I Built an SMS Gateway with a $20 Android Phone
I Parsed Every Law New Zealand Has Ever Passed — jonno.nz
John Gregoriadis · 2026-07-05 · via jonno.nz

The research notes said New Zealand's legislation XML records its amendment history in machine-readable attributes. I built my first parser against those attributes. They do not exist.

Not "exist but renamed". Not "exist in some files". Zero occurrences, in any of 38,064 files, in either version of the official schema. The real history lives in little <history-note> blocks of nearly plain English: dates written out like "2 July 2001", the amending act named by title only, no identifier of any kind, like a Parliament that never expected anyone to check. Day one of the build, and the map I'd been handed described a country that wasn't there.

Some scope before we go on. New Zealand publishes its whole statute book as open data, free of copyright: every public act and every regulation made under one, 15,306 works in all. Strictly, that's every law the official archive still publishes rather than every law ever passed, so the title is doing what titles do, and now you know. Parsed out, those works yield 241,456 amendment events: every recorded edit to every act and regulation, what it did, which act did it, and when. The oldest is dated 5 October 1872. The newest landed in June 2026. Nobody had turned any of this into a churn metric before, which is how a weekend curiosity became the project.

What counts as "a change"

Findings later. Caveats first, because on this dataset the caveats are half the findings.

One event in my graph is one provision-level operation: a single section, subsection, heading or defined term inserted, repealed, substituted or amended. That sounds like a clean unit. Three things ruin it.

Big numbers are usually one act, not many decisions. The busiest day in the statute book's history is 28 October 2021, with 4,619 recorded changes, and 4,283 of them came from a single statute, the Secondary Legislation Act 2021, a mass administrative reclassification. The Income Tax Act's worst year (1,544 changes in 2009) was about 79% one omnibus tax bill. Whenever you see "amended X times", read it as "X operations, mostly from a handful of acts", never "X separate choices".

Changes arrive on a timetable. Since 2008, a quarter of every change to New Zealand law took effect on just four days of the year: 1 January, 1 April, 1 July or 1 October. 1 July alone carries 15,864. Commencement dates are a drafting convention, not evidence of haste, but it means any "three edits every two days" cadence you compute is an average over a process that actually moves in quarterly bursts.

Even "amended N times" depends on a convention you have to pick. Is a repealed subsection an amendment? By the convention my tracker publishes (insertions, substitutions and textual amendments), the Income Tax Act 2007 has 11,577 recorded amendments, the most in the country. Count every operation including the provisions repealed or revoked out of it and you get 14,294. Both numbers are defensible. Neither is wrong. You just have to pick one, say so, and never mix them, and most public claims about "how often law changes" do not tell you which one they picked.

That last one bit me in miniature. The Water Services Entities Act was amended 832 times in August 2023 by its own authors. Or 820 times, if you exclude the twelve provisions that were repealed rather than rewritten. The tracker now says "recorded changes" instead of "amendments" specifically to stop the two conventions colliding in one sentence.

Mirror first, ask questions later

The bulk XML archive lives on the old legislation website, the one that got replaced in March and now carries a polite notice that it will be switched off "when the new website is performing well". The new site has no bulk archive. Reading that sentence is what turned this from a weekend idea into a now-or-never job: I mirrored the lot, 38,064 files, 16 gigabytes, at a deliberately polite request rate spread over a couple of days. The site's firewall has opinions about impolite scripts, and I had no intention of being the reason the archive went away early.

My first run spent an hour dutifully downloading regulations about walnut export licensing, because I'd built the work queue last-in-first-out without thinking about it, which is the most me bug imaginable.

Parsing English that thinks it's data

A history note reads roughly like this: Section 5(1): amended, on 2 July 2001, by section 149 of the Something Something Act 2001. A date spelled out in words. An operation verb. A citation by title, no ID, to an act that might be anywhere in 154 years of legislation. The parser's job is to turn tens of thousands of those into graph edges: this act amended that one, on this date, in this way.

Two things about that went better than anyone deserves. Every one of the 15,306 works parsed without a single XML error, which says something lovely about the Parliamentary Counsel Office's data discipline, whatever the rest of this series implies about everyone upstream of them. And 93.7% of the history notes resolved cleanly into the graph. The stragglers are mostly old acts cited by title in eras of creative spelling, and they sit in a review queue rather than in the numbers.

Before publishing anything, the graph had to reproduce facts already on the public record: the Resource Management Act's long saga, the bright-line test's ping-pong, the Three Waters repeal. It did. Then I let it talk.

Fourteen years, as a survival curve

The dataset holds 49,639 provision-repeal events: individual sections struck out of living acts. Treat each one as a death, take the age of the parent act at that moment, and the median is fourteen years.

Be careful with that number, because the loose version reads better and I've used it myself: "a law is typically fourteen years old when parts of it get struck out." The precise version is event-weighted: heavily hacked-about acts contribute thousands of deaths each, so the median tells you the age of the typical act at the typical amputation, not how long a law survives before its first repeal. The per-act survival curve (time to first strike-out, censoring the untouched) is the proper follow-up and it's on the list.

Even the honest version earns its keep, though. New Zealand makes thirty-year infrastructure commitments, governs them on a three-year electoral clock, and writes them into laws whose typical strike-out happens at age fourteen. Those three numbers do not fit together, and the misfit is what the rest of the series is about.

The politics is the demo, not the thesis

Amendment events to acts per completed parliamentary term since 2008: John Key's three terms ran 13,426, then 15,144, then 14,584. Jacinda Ardern's two ran 17,538 and 16,818. The current term sits at 12,710 with months still on the clock. Different parties, different decades, different crises, same band. Whoever you came to convict, the chart declines to cooperate: the churn isn't red or blue, it's the machine.

The counter-fact cuts the same way. New Zealand has a reputation as the west's fastest repealer, but by share of edits that delete law, the current government is the lowest since 2008 at 13.8%, and Key's second and third terms were the highest, both above 18%. The reputation comes from a handful of flagship reversals done at speed and under urgency, not from bulk deletion. About one in five operations across the whole dataset removes law rather than adding it; Parliament runs a permanent demolition crew alongside the builders.

If you want the politics proper, that's Part 1 (what the cancelled projects cost) and Part 2 (why the machine is built for whiplash), and a version of the story ran in The Spinoff. This post is the appendix that wouldn't fit: the pipeline those pieces stand on.

The data keeps coughing up side quests too. The oldest act still in force dates to 1865, and the current government has amended a clutch of statutes written in 1908. The Ombudsmen Act 1975 has been touched by 311 different other acts, the most cross-referenced law in the country, because every new public body gets bolted onto its schedule. And there's a whole register of provisions Parliament passed that no government ever switched on, including the internet-disconnection penalty from 2011's "Skynet" copyright law, fully drafted and dormant for fifteen years. That one's its own post.

The tracker, and the tape

Everything above is live at whiplash.jonno.nz: the per-term chart, the most-amended leaderboard, a lane-by-lane view of the statute book, and a map of thirty cancelled projects with a scrubbable timeline. The counting rules are published next to every number, because after the 820-versus-832 business I trust a figure exactly as far as I can see its convention.

The pipeline is deliberately boring: a mirror script, the parser, a SQLite graph, static JSON aggregates the site serves. No framework survived contact with the problem. All of it, mirror to graph to aggregates, is at github.com/jonnonz1/nz-statute-book, and the source archive it reads from is public and copyright-free, so you can check every number in this post against the same primary source I used.

Go on.