← Back to context

Comment by gorgoiler

3 years ago

Laws would do well to follow the rules of software. Small modules with clear responsibilities with an emphasis on readability and test cases that are run before you go to prod, for example. Testing is expensive so I understand why the legal system would rather just push their code and fix bugs when they see them in the wild. The collateral damage for people caught up in real life test cases is tolerable, especially when it’s someone else footing the bill.

Linting and type checking the existing codebase would also be more helpful than rewriting everything in a new language. Enforcing size constraints on vocabulary and word count. Cross referencing between different legal systems. Throwing out dead laws that are no longer executed in prod. Profiling the efficiency of existing laws to find hot spots.

There’s little incentive to do this when the current system is run by a cadre of highly trained legacy COBOL programmers. I’d pick a very small part of the system — incorporate a new city and start from the ground up — and take it from there with the clear eyed expectation that a full rewrite is going to take a century.

Moreover I think laws work similarly to software. People wrote law, others find a loophole and use it, the people fix it with patches, and so on...