My thoughts as an enterprise Java developer.

Thursday, November 01, 2012

Laws are like computer programs

Laws are like computer programs. Like programs, laws try to apply rules to change their environment but the system for making laws isn't setup to make good laws. Programmers have generally accepted best practices to increase the chance of good code but there aren't such practices for laws (or they are minimal).

  1. Laws have to deal with much more varied input than computer programs.
  2. Laws have greater risks when the input isn't handle correctly (people can die)
  3. Laws are written by people who are selected for their ability to have general goals -- not people who are necessarily good at ensuring that all of the details are correct. Generally visionaries don't write code.
  4. Laws have virtually no testing that is done before implementation (sometimes there are studies but they are usually general). Code generally has multiple types of testing: compiler, unit, functional, QA, user, etc that verify that the code is good before it is released.
  5. Laws are written by large groups that are all responsible for large portions. Programmers are usually responsible for small portions that don't overlap much.
  6. Laws are applied to large groups before being tested on small groups (sometimes federal laws are based on state laws but that is rare and loose).
  7. All of the people who help produce programs generally focus on a narrow domain but laws are mainly written by generalists (exceptions being lobbyists and "experts")
  8. Laws reference parts of laws, which is like functions
  9. Simplicity isn't a goal for laws.
  10. Laws use the waterfall model
  11. Laws don't have official comments

What other programming best practices do laws not follow? Are there programming practices that laws follow well?

1 comment:

mauhiz said...

an often mentioned point is that law could benefit from the use of source control : branching (over states/regions), revisioning, and commit history.