XML, HTML, RDF/XML for everything, as well as browsable online (often with original source PDFs of the printed laws), with both online and RDF/XML representations showing all alterations to the law (with date, cross-reference to the Act that made the amendment, etc.).
The website is one of the big success stories of RDF, IMO, as it is all based around a model of the laws in RDF, with everything else just being varying serializations thereof. It also allows the website to show what has been amended — no need for dumping stuff to GitHub and then diffing it! (e.g., see the annotation on 28(1)c in http://www.legislation.gov.uk/ukpga/1998/29/part/IV)
That all said, there tends to be a delay between the PDF being uploaded and everything being marked up and entered into the RDF database (see the "new legislation" on the home page).
I actually wrote a tumblr post about that a while ago. It also included a user engagement aspect that would allow users to subscribe to topics of interest to receive a curated feed of changes that could each have a dialogue/poll emerge. I hadn't really thought through the specifics but its awesome to know that something like this is already started to some degree. Thanks for that!
Remember that diff is an algorithm to generate the smallest set of operations to produce version B from version A, not an accurate reconstruction of what happened.
Diff algorithms are also often tuned not try as hard to find the smallest set of changes for larger documents, due to speed concerns.
Git's built-in diff algorithm is particularly bad for text. Since it's aimed at line-oriented code, it does line-based diffs, which is horrible for ASCII text that is reflowed, because every line in a paragraph will show up as changed for a small change.
What's happened is that "Section 2" was moved later in the sentence, abbreviated as "Sec. 2", "of" was deleted, and "act" was capitalized:
Section 2 of act July 30, 1947, ch. 392, 61 Stat. 674, provided...
Act July 30, 1947, ch. 392, Sec. 2, 61 Stat. 674, provided...
The rest of the paragraph is unchanged, but git shows a 6-line diff with the entire paragraph replaced. GitHub attempts to do some word-based highlighting (see the timestamp lines), but it falls down on most of these paragraphs. Wikipedia's diffing tends to work better for this kind of thing; I'm not sure what they use. The upshot is that the number of lines changed may be a 5-10x overestimate.
It may be doing that conversion, but the conversion works. For example, committing the following text (with line breaks), then joining it all into one line, shows no differences when using 'git diff --word-diff'.
Test the first. This will check if reflowing
text actually produces git word-diff weirdness,
or if it's actually decent.
The line does get reproduced on the terminal (a line diff was seen), but no text is shown in green or red to indicate an actual change.
Just checked with the old and new versions of Title_09.txt and you're right, --word-diff does the right thing. It echoes all the changed lines to the terminal, but it only marks up (and colors, in color mode) the changed words:
[-Section 2 of act-]{+Act+} July 30, 1947, ch. 392, {+Sec. 2,+} 61 Stat. 674, provided that
Wonder if there's a way to enable that behavior on GitHub? And/or to generate repository activity statistics based on changed words rather than changed lines?
Sure, but this particular test tells you nothing.
You need one where the "line diff" has identified the wrong set of changes (IE it has decided two sets of text look close enough that one is really a change into the other, even though that's not what historically happened).
That is never the error I see in line-based diffs; because they're taking a much larger chunk of text to be atomic and treat irrelevant characters as relevant, they tend to give false positives (seeing two lines as completely different when in fact they're slightly modified versions of each other; or seeing two blocks of text as different when one is a reflowed version of the other.)
I did some work & research about diffs when I tried to visualise progression of slovak law. My best attempt was a diff method that would understand the inner structure of the law. I ended up with simple draft but I am sure somebody more competent could look into that.
It would be even awesome-er (and more useful) if you could parse individual bills and amendments into diffs, which get merged into 'master' as they become law.
But that only works at the shallow level. A crook can get around that by asking/bribing/convincing someone else to be the one who's responsible for the amenment.
I wonder if Congress uses any sort of version control. The text of these bills are written by - staffers and sometimes lobbyists, so I'm not sure how it would work.
Laws are essentially diffs against the US code. The diff (slip law) is canonical. They are continually compiled into the US code, which can involve deleting or changing text just like a diff, and periodically an edited, annotated code is published. After a certain amount of time, Congress enacts a portion of the published code, making it canonical and overriding any prior slip law.
What we need now is software that reads bills ("in section 123.abc the text 'blah blah' is replaced by 'bleh bleh') and compiles it into before/after views of what the resulting code would be.
I just suggested this, and then scrolled down to find this.
Someone needs to take the plunge and start writing the program; throw it on Github and tell us all about it. I know people who are looking for such a tool.
The US Code is not the same as the laws of the US. It is a "current snapshot" of existing laws in force, and does not itself have legal weight unless explicitly granted by Congress.
See, e.g., U.S. National Bank of Oregon v. Independent Insurance Agents of America, Inc., 508 U.S. 439, 440 (1993) for the Supreme Court's ruling and underlying logic.
Imagine? I used to do it. When I first started out, I would get stacks of the Chicago Municipal Code revisions on onionskin and it was my job to follow the instructions to update the five-inch binder.
"Remove pages 123.4 - 123.6 and replace with pages 123.4a-123.7."
Later, when I learned about diffs, I understood the concept immediately.
Not that much of a pun, really. Just a funny-sounding portmanteau. That being said, official names of things by the government usually sound very ridiculous, so this is definitely much saner.
The funny thing is that a lot of law is structured like definitions, the actual law, then consequences. Any of those three can change independently, and change the meaning of the law. So diffs are often not as useful as you wish.
We need to parse the law into some simulation code, and then have unit tests (does scenario B cause citizen A's rights to be violated), and then check if changes break the tests.
I just created a repo with all the codes[1]. There was a convenient link to all codes in one zip file. I will note that this is a massive amount of text.
There is a link to the schema used and a stylesheet (I assume for the xhmtl maybe?) that I would like to add in. But one step at a time.
It would also be fascinating to see the visualizations of this evolution. And perhaps by matching it with the voting data from congress, one could track the footprint of each congressman.
Probably more important than just diffs is actually a dependency graph and a topical index. While they've tried to do this via titles/chapters and references, linear breaks are never going to be as successful as many-to-many linkages as every Bible concordance out there demonstrates.
Caveat for for many of us overly rational thinkers: the powers that be deliberately are allowed to 'interpret' this code nondeterministically by many different means including its 'spirit,' admissibility of relevant information, manipulation of venue and participants, apparently even extrajudicial proceedings lately.
In short, that allows a lawyer to answer almost any question with "it depends," and start billing.
"In short, that allows a lawyer to answer almost any question with "it depends," and start billing.
"
No, this is usually "lack of sufficient facts to answer question".
If a crime has 4 elements, and you've said you've committed 3 and maybe the 4th depending on how you look at it, the answer to the question "can i be convicted" is "it depends", because it depends on the argument about the 4th element.
If your followup is to claim that there should never be questions about whether you've achieved some element of a crime, it should be binary, that's simply impossible.
Crimes, for example, are often about intent and causation. Until science provides us with historical mind reading devices, and completely accurate point-in-time reconstruction of the world, we're going to have to rely on various theories and evidence (much like science relies on theories and evidence).
Even point-in-time reconstruction wouldn't solve all causation issues, because the issue is often a fairness one: Is it fair to hold the defendant liable for a crime X steps removed from his own action.
Right. It should be noted that appellate practice, which is really where the big debates about legal interpretation happen, the "what does this comma mean" work, is not exactly a cash cow for the industry. It's a brand-building practice, but outside boutiques it's not what pays the rent. What pays the rent is factual disputes, where its pretty clear what the law is, but there is disagreement about who did what with what intent and how much did it cost.
With respect, only someone who hasn't studied law could say this.
Law is complicated and filled with ambiguity because the world is complicated and filled with ambiguity.
Unlike lawyers, we can simply will some of that away. We can make an enum which smooshes together disparate phenomena, that feeds a dropdown list and require the customers to use it. We can ignore very rare corner cases and include a comments field. We can do a lot of things to simply make essential complexity go away while we bicker amongst ourselves about accidental complexity.
Law can't do that. Law must treat all cases, all combinations, as they arise. Every single day a configuration of people, motives and circumstances emerges that has never before emerged, could not have been foreseen and which may never occur again. The law must still apply.
Law is hard because the problem domain is everything humans do.
Let me know how many story points you think that scope is worth.
> Law is complicated and filled with ambiguity because the world is complicated and filled with ambiguity.
True, yet I'm convinced by obvious ambiguity that it's on purpose, to feed the legal industry. That conviction is bolstered by all the "work" Congress does on reviving sunset clauses on laws that had no good reason to sunset.
Again, I must insist that folk can only take this view because they have not studied law.
Law's complexity is not by design. Much of case law and legislation is about refactoring existing principles into something simpler.
The complexity of law is emergent from the problem domain. It doesn't require a conspiracy against the public to be that way. It merely requires the existence of a sufficiently large and diverse public.
> Law's complexity is not by design. Much of case law and legislation is about refactoring existing principles into something simpler.
Although it seems like there is also the accretion of "legalistic debt" (c.f. technical debt) when changes are made in response to (the perception of) urgent, high-profile problems.
It seems that, much like software, it's a lot easier to
add clauses to, or make minor changes to existing laws than it is to write a new, much simpler version that would cover all the same ground, get it passed, and repeal the older version.
I'm also curious about what effect changes to a particular law have on precedent based on an interpretation of an older version.
There's a certain amount of legislation which is of the be-seen-to-be-doing-something variety. But that too gets reformed now and then. Lots of legislators are ex-lawyers, they hanker to tidy the place up inbetween shitting on everyone.
> It seems that, much like software, it's a lot easier to add clauses to, or make minor changes to existing laws than it is to write a new, much simpler version that would cover all the same ground, get it passed, and repeal the older version.
Like software, it's easy to underestimate the complexity of the existing system and to overestimate the advantages of a single, sharp cutover.
The current system is not perfect, but it largely works by groping towards better solutions over time. Legal systems where the official concept of law is "we designed it ab initio with Pure Reason (tm)" tend to be just as riddled with contradiction and complexity. They just lie to themselves about it.
> I'm also curious about what effect changes to a particular law have on precedent based on an interpretation of an older version.
Most of the time it is very easy to make the connection. Either it's new legislation, in which case the legislature will amend the clauses that a court has interpreted differently from what they considered to be the intent. Or it's case law, for which every precedent is named and referenced. You can trace every legal principle back to its first expression.
Well, police get jobs and pensions from the law industry, like marijuana laws. Doctors in the US promote unnecessary procedures. (I was a potential victim of that just last week.) No shenanigans I'm aware of in weather forecasting, though.
That's one of the reasons I am a libertarian. Less government means less complex law means less bugs and abuses of the law. If your government tries to say what you can or can not eat, for example, you need complex law to figure out what is cheese and how big the holes in it must be. If you can eat whatever you like and the government couldn't care less, you do not need any of that. So tell me - do we really need a law specifying which size holes in the cheese must be?
Why would 'less government' be less complex law or less abuse of it?
'Less government' typically means spending less money on government employees, when you hear it from libertarians. Paper's cheap, word are free, and abusing the law is usually profitable on it's own.
You talked to wrong libertarians then, or didn't listen very carefully. Spending less money on government functions is a consequence of less government, but far from being the goal of it. The goal of it is to lessen government intrusion in private lives and transaction costs for private persons caused by it. If the government does not regulate how your health insurance policy must look like, and leaves it to a contact between two private parties, you do not need a huge law that meticulously describes what such contract must cover and what the sides must do in order to be allowed to enter into a contract. If, however, the government wants to have a say in it, creation of such a law is inevitable.
Not having certain laws trivially prevent abuse of such laws - if there's no law prohibiting possession of certain plant, cops can not extort somebody in possession of such plant, can not hide such plant in somebody's vehicle in order to incriminate them, can not force one to perform illegal acts threatening that otherwise they'd be found guilty in possession of such plant, can not seize one's home, vehicle or money because they suspected him in possessing a prohibited plant. This made possible only by existence of the law that makes certain behavior a crime. If less behaviors are made a crime or deemed worthy of government intervention, less complex laws will be needed and less abuse of these laws will be possible - you can only abuse a law that gives you a power over somebody, but you can not abuse law that does not exist.
Surely the thing to advocate is less gratuitous regulation and more efficiency. Because no regulation at all is disastrous — without it we would still be living with lead paint, arsenic in our food, rat-filled restaurant kitchens and so on. Libertarianism espouses minimal state intervention, but it's clear that we actually do need a lot of intervention. At the same time it needs to be the good, useful type of intervention that protects citizens against the abuses of the marketplace.
You don't need an special "regulation" to not put arsenic into anybody's food. Arsenic is poison, and poisoning one's food is attempted murder. Laws against murder existed well before Iron Age, so there's no need for lawmakers to sweat too much about how to regulate such thing.
If you go to a restaurants where only thing that is preventing them from being rat-infested is government I suggest changing you patronage to a better place. Your home, I suppose, is not rat-infested, yet how often the government checks it? Somehow you manage to keep rats out of your home without the government, don't you? Why do you think everybody else can't do the same? Are they, unlike you, lack some important parts in their brains that allow them to function independently? I doubt it.
>>> At the same time it needs to be the good, useful type of intervention that protects citizens against the abuses of the marketplace.
Marketplace is by definition a voluntary interaction, and participants in voluntary interaction can claim abuse only in one case - when one of the parties were fraudulent and did not deliver their end of the bargain. In this case, indeed, the government needs to step in and enforce the deal - or provide some other satisfactory resolution. But that's not what current law code is doing, it is very far from it. It actually tries to mold the marketplace into the shape and form that politicians prefer, and that's where most of the abuses come from.
> Arsenic is poison, and poisoning one's food is attempted murder.
This is a very naive view. Pretty much everything is poisonous at high enough dosages, but there are plenty of poisonous chemicals that are not immediately harmful at low levels.
You can have a restaurant, a food manufacturer, a water utility etc. contaminate (intentionally or otherwise) their product with low doses of chemicals that over time will cause health issues or even fatalities.
The marketplace itself cannot regulate such abuses. Even if such contamination was punishable by law, the time lag would ensure that consumers would not realize the impact until long after, perhaps even after the statute of limitations has expired.
Just look at third-world countries to see how the lack of regulation works out. Or China.
> ... I suggest changing you patronage to a better place.
I don't know whether my restaurant has rats in the kitchen. How could I? The entire point of health inspections is to find out what the consumer cannot possibly find out themselves.
> Why do you think everybody else can't do the same?
Trendy, swanky restaurants are routinely shut down for doing very bad things behind the scenes. So clearly they can't.
Companies don't work for you; they work for themselves. If they have no incentive to be good, they usually won't be good; because, say, it's less expensive to be highly hygienic. You just have to look at the literature of consumer abuses to see how companies will continually, eternally act for their own good, at the detriment of consumers.
I don't understand, what's "naive" here? You say something may be poisonous, even at low doses. Poisoning people is a crime. I don't even see the question here.
>>> I don't know whether my restaurant has rats in the kitchen. How could I?
Ever heard of reviews? Critics? Certifications? Yelp? Zagat? Michelin stars? It is fascinating that a grown adult obviously having access to the internet, in 2013, can sincerely claim he doesn't know how to figure out if a restaurant is any good. There's a huge industry built on doing just that. People are complaining they have to many apps on their phone to do that and get confused.
>>>> Trendy, swanky restaurants are routinely shut down for doing very bad things behind the scenes. So clearly they can't.
Successful, prominent politicians are regularly busted for infidelity. So, clearly, spousal fidelity needs government regulation.
You are missing the time component. Reviews don't matter if the effects take a decade to show themselves.
> Ever heard of reviews?
You missed my point: Transparency. A restaurant may get rave reviews and still have a filthy, dangerous kitchen. It's what we, as consumers, don't have access to that matters.
> So, clearly, spousal fidelity needs government regulation.
This is a ridiculous non sequitur. I was arguing that companies obviously could not self-police, since they are doing bad things all the time even with state policing; how is your reply relevant?
Companies can't self-police. But other people - that care about what companies do - can find out what they do. Just as politician's affairs are found out, for example. So your claim that government coercion is necessary to either find out the information or disseminate it is obviously false - there are existing systems for doing both, and they work quire well - at least, not worse than government ones - where they are applied.
First of all, in many cases this requires that such entities have interior access. If you can't inspect facilities but only the end product, you become very limited in what you can do.
Secondly, even then, all you can do is disseminate information. You can't enforce anything; you can only try to convince people to vote with their feet.
A lot of people have "interior access", restaurants are not exactly highly classified CIA facilities. And any certification/review body can request - and obtain, if certification is worthy - such access, without any problem. Did you ever hear, for example, about Kosher certification? How do you think it can be done without access to everything? It can not. Whoever wants to sell on markets that need Kosher or Halal or any other such certification - provides access. Whoever does not - sells to people that don't care about this certification.
>>> Secondly, even then, all you can do is disseminate information. You can't enforce anything
You mean - you can't stop people from buying what they want even if you think it's bad for them, you can only give them information and let them decide for themselves if they're ok with it? Oh horror!!!
Sure. Kosher certification works because companies cooperate; but the network and trust has taken years and money to build, and it only works because there is enough critical mass in the system for a company to lose by not participating.
So, you're saying if nobody among the consumers needs these certifications it wouldn't work. And you say it like it is a bad thing?
Of course, this means the government loses a way to enforce arbitrary restrictions that nobody of the consumers actually need but that promote some political or special interest agenda. Tell me please again, how is it a bad thing?
US code is legislation/regulation. Case law of course would still exist even with minimal regulation, but absent byzantine network of legislation/regulation, it will be less complex, since less factors will be involved in the lawmaking. If you do not regulate how big soda cups must be to be able to be sold in a retail establishment, you do not need case law that defines what "sold in retail establishment" means, what "soda cup" means and is selling two small cups the same as selling a large one and what happens if two small cups look exactly like one big cup with a wedge in the middle. And so on. Congress creates over 50 federal crimes now each year, this makes the system more and more complicated every day, with bad consequences for everybody except lawyers that get to earn tons of money on navigating this insane labyrinth.
Also, if something use case comes up that your software didn't handle, you can write new code to handle it and rerun the old data. You cannot do that with law, you can't write new law and use it to punish past action.
Interpretation isn't an unguided, irrational process. When your lawyer answers "it depends" its because you've placed him at one point in what's really a decision tree and asked him: "where does it end?" It's like asking a programmer whether a particular token in a C++ program is a type name or an identifier. It depends.
If you imagine the universe of human activity as a multi-dimensional space, you can think of laws as carving out subspaces with lines (that may be more or less fuzzy) and attaching significance to particular subspaces. If I ask: "my x coordinate is 5, where am I?" what do you answer?
You make this sound like a bad thing. Would you really prefer "black and white" laws that leave zero room for flexibility or interpretation in light of a given situation?
One quote that sticks in my mind is this one from P.J. O'Rourke in Parliament of Whores, concerning Ken Starr's written position on a flag-desecration law:
Congress had "acted narrowly." (That is, the law is very specific, and you
can't be arrested for having a smart look on your face near the flag or
anything like that—which is good because being specific is the essence of
lawmaking and the whole difference between having a congress and having a
mom.)
The point here is that specificity is good so that J. Random Citizen can easily know if they are breaking the law or not.
But this is the reason that we have the ability to have the law interpreted on a case-by-case basis, which is different from interpreting "laws", the specific as-written instances. Note that the Supreme court doesn't hear or decide on a law randomly, only when someone brings a specific case to them.
The law should be written as "it's a crime to kill someone" (although, that may be too specific, and a more appropriate wording may be "it's a crime to rob someone of their life and livelihood"), and it's up to the executive and judicial branches to decide (or aid in deciding in the case of the executive) what the punishment should be. This is the defendant's "day in court", as it were.
I think too many people do treat the law as absolute in wording, rather than absolute in spirit. A law that enforces something unjustly on the defendant is just as bad as a law that doesn't justly enforce the plaintiff's rights. Finding that appropriate middle ground is the basis for the grey area that is the interpretation of law.
> The law should be written as "it's a crime to kill someone" (although, that may be too specific, and a more appropriate wording may be "it's a crime to rob someone of their life and livelihood")
Either of your examples would involve me still technically breaking the law if I kill someone while trying to save myself from being murdered by that person, even if I do eventually receive a lenient sentence.
Either of your examples would involve me still technically breaking the law if I kill someone while trying to save myself from being murdered by that person, even if I do eventually receive a lenient sentence.
Of course. It's hard to deny that you killed someone if you killed them in self-defense. And that's why there is value is having law be interpreted on a case-by-case basis. The judiciary could determine, because it was self-defense per your examples, that you didn't "technically break the law" because the law as worded is weak. This is the iterative nature of developing laws. If too many people were found to not be breaking the law as written after review, then the laws, and the wording thereof, should be updated to account for that by being more explicit and producing less grey area.
Yes, we should have black and white laws, and unit tests for them. So someone could write a unit test for "Will this allow the NSA to create a secret court that is outside the rule of law?" or "Does accessing a university computer that has an open access policy allow for a sentence of 130 years?"
Depends how you define "simpler." There would be a LOT of incredibly specific definitions, since there would be no room for interpretation by a judge.
Consider a law that says "you can't drive a vehicle without a license." Is a bicycle a vehicle? What if it has a motor and weighs a lot? A velomobile? What about a hovercar?
There might be 2,000 laws referencing "vehicle [definition #4,849, version 5]".
(Actually, I guess a sensible definition might be based on momentum: we'll call a tricycle a vehicle if you manage to get it going fast enough; the point is that you can hurt someone with it.)
.. it depends. What if the point in the given situation is to avoid traffic congestion? You normally don't want (a small) buggy drive down a high speed highway. In that case it the point would be: "should match the traffic flow requirements".
So, I agree with your argument. It's all very situation dependent. For some reason I find it oddly comforting that human society and life in general can't be crammed into a small set of fixed rules. That would be kind of boring I think.
There's a sub-area of AI, since about the 1970s, that does try to do that, but it's very much at the research level. Modeling even simple "common sense" things is notoriously hard for computers (commonsense reasoning seems to require a large amount of implicit background information), so it's not clear that easy to unit-test coincides well with a human notion of simplicity and predictability.
That's one reason that, in addition to being an interesting challenge domain for AI researchers, it's interesting to logicians, who aim to come up with logics and decision procedures that can capture what a decision procedure in law looks like (classical first-order logic and theorem-proving don't seem to model it well). The main short-term application is to reasoning-support systems that can suggest potentially winning arguments, point out obvious holes in draft arguments you were going to make, etc., sort of the legal analogue of medical diagnostic systems.
> Yes, we should have black and white laws, and unit tests for them.
First problem: I don't think that can be done. I'd be a lot more convinced to consider arguments like this accompanied by completed samples in some real area of human endeavor of the "black and white laws" with accompanying "unit tests" (and, anyway, wouldn't we want automated user acceptance tests, not unit tests.)
Thinking about it, it probably can be done.. just not in a free society (which I think is all about doing what you want as long as you don't hurt others in the process). You probably can create black and white laws in a despotic rule. "The Ruler has all right, you have none. He decides." There, drafted an entire legislature with very black and white rules..
Then who decides if you have broken the law? Obviously cops have no right either. Only the ruler can decides? So ruler spent every seconds telling people whether they can talk/walk/eat?
The problem with this is, human beings don't blindly interpret and process laws as code. Human beings can honestly differ in their interpretation of a law, and the accepted interpretation can change over time.
Some one, or some body, would have to decide what the 'proper' interpretation of these laws would be, and craft the 'unit tests' such that they correspond to the status quo. Then that someone or some body would have to ensure that anyone who disagrees with that interpretation gets put down. What you're describing seems like a particularly technocratic form of fascism to me.
Not really, as part of making the law - congress needs to go through all possible interpretations and rule out the ones not in the spirit of the law one by one. Then the law is defined by its tests.
Is it okay to collect all XYZ data?
Is it okay to collect anonymous XYZ data?
Is it okay to collect XYZ data and hold it for X days?
Is it okay to store and index but not search a collection of XYZ data?
The law would end up saying something like -
The NSA is permitted to store and index anonymous data for a period of 10 days. Attempts to make anonymous data personal are forbidden. Data may only be accessed with a court issued warrant subject to the following conditions:...
> Is it okay to collect anonymous XYZ data?
Anonymity is not binary.
- What lower level of anonymity is acceptable? Is 1 in 30 acceptable?
- What about edge cases where it becomes much lower? Say only one person in a small county has an account to a web service because it is largely targeted at people elsewhere?
- What about academic improvements that keep decreasing anonymity by improving understanding of collected data? What time limit would NSA get to update its systems in case of such improvements? What happens if the speed of academic improvements is larger than the speed of updates in NSA systems? Is the system scrapped right away?
I agree that formal definitions seem lucrative. But these aren't simplified mathematical static models that we are talking about.
Right, those are exactly the questions that need to be asked, discussed before implementation, and then included in the law if it passes.
What meta-data is truly anonymous and what is not? Is the agency permitted to built a tool to de-anonymize data based on academic research, or is the data in some ways protected against these tools?
They may get to the end of this process and in this instance find that such a government tool, even based on anonymous data is uncontainable, and should not be implemented. If you just grant blanket power and rely upon a courts interpretation of your two paragraph scribble to straighten things out, the intent of the law can be completely lost.
Yes. This is my point. =) Only by actually working out all these details can we have just laws, and IMHO, we would discover that most of our laws are not just.
We want law that prevents criminals from breaking into banks and stealing your cash, but what we got was a law able to be used to persecute young people to the point of suicide for accessing an "open" system belonging to an educational establishment.
The laws we have now cannot do what they claim to do without being impossibly broad or impossible to implement. As was was discussed elsewhere today, the joke of a "Do what I mean" button, is that nobody, in fact, knows what they mean, and this goes exponentially so for a congress of 500 or so people.
But the most 'just' laws aren't always the ones least open to interpretation. Also, let's not conflate Aaron Swartz's suicide into an example of the law working as designed and intended, rather than being the result of heavy-handed interpretation intersecting with his own fragile state.
The way I look at it, making laws more and more complex and attempting to codify every possible instance is a bit like adding massive bloat to a software project for the sake of maximum backwards compatibility. Just as more lines of code introduce more bugs and increase the possible attack surface of an application, so more complex laws introduce more opportunities to manipulate and undermine those laws through legalistic means (while giving the people who have to interpret those laws on their face little leeway for context-specific interpretation.)
In Florida, to use an obvious example, the law as intended makes it legal in a certain context to kill an unarmed teenager without any ramifications, whereas firing a gun into the air can get you 40 years in prison. This is what the people of Florida wanted, and this is what their legislators gave them. America's prisons are stuffed with minor drug offenders for whom the sentencing laws were absolutely unambiguous. How complex is the tax code and how many ways are there to dance around it? Most of those holes are there on purpose.
> Right, those are exactly the questions that need to be asked, discussed before implementation, and then included in the law if it passes.
Legislation is not the only source of law.
That said, more structured analysis is no bad thing. But it's not a panacea either. There's an existing analytical mechanism for legislation: depending on where you are, it's called "Parliament" or "Congress".
To participate, you must first be elected to that body. Or work for someone who does.
IANAL but I don't think it's possible to parse laws with that degree of certainty, or to determine an upper bound for "all possible interpretations," as different people can disagree as to what the "spirit" of a law is, or should be, or could be for the forseeable future.
The US Constitution is pretty straightforward, and people are still waging petty wars over individual words to wrest their idea of "intent" from the Founding Fathers. You're suggesting a formal procedure for legislation which might have some merit, but I don't think it would remove politics or human bias from the process.
What if laws are considered whitelists? If it's a whitelist then if not directly stated it's thrown out. This may slow the legislative process, but that's not necessarily a bad thing, it was actually the founders primary goal.
Agreed that it's not a fully baked idea by any means, humans will always attempt to circumvent any system. With that in mind, you may say that rather than designing a better system, we stick to the safe that was first cracked 200 years ago.
With that in mind, you may say that rather than designing a better system, we stick to the safe that was first cracked 200 years ago.
Half the people whose valuables are in that safe find it perfectly adequate and would insist that any attempt to change the locks is just a blatant attempt to grab their money.
Do those 50% believe the system is working as intended and is not being exploited by special interests? I don't think any republican or democrat agrees with that.
Sure. But special interests are only a problem when they're not dumping money into your district or your next election -- when they are they become a 'vital national interest'.
My point is, both sides have a say. If you get ten mathematicians in a room, they don't have to reach a compromise between ten different self-serving definitions of pi. The law is never going to be like that.
A nice example of the problem with natural language is Treason Act 1351[1] (this is still current law in the UK!), written in Anglo-Norman. This is problematic, as our understanding of the language is incomplete. Notably, in this case, there is no agreed upon meaning of "pvablement" — it means either "provably" or "probably": a rather major difference come a court of law!
But then you either need to get people to talk in Lisp or some other logical language, or you need a way to translate it to English. It's the English translation where ambiguities will arise. You've just moved the problem around,
haha, no. It was meant as a quasi-joke. I'd like to see one though.
Certain laws are very cut-and-dry (speeding for instance) and perhaps laws could be proven on a functional basis.
You could even make it axiomatic from the constitution and declaration of independence.
Of course, you'd need to define the axiomatic meaning of things like 'the right of the people to keep and bear arms shall not be infringed' - which is hard to do even with such simple language.
And then after loading the axioms, you'd spend a lifetime going through errors in the existing laws.
Certain laws are very cut-and-dry (speeding for instance)
Ha! No.
* do you want to give an exemption for speeding for, say, ambulances? So how do you define "ambulance"? Do you have to be registered to drive an ambulance? What defines the "duty of an ambulance" (or are they allowed to speed no matter what). What about a van carrying an organ to be donated?
* What if I have my sick child in the car and I'm rushing them to the hospital because it's faster than waiting for an ambulance? Is it right that I can be arrested and convicted for that? I think that would be a perversion of the spirit of any just law.
* What if I'm being chased by a maniac relative who wants to kill me? Can I speed then to drive away from them? Do I have to believe my life is in danger? How do you define that?
* Let's pretend I'm driving along and some other vehicle is about to move into my lane and crash into me because they are stupid and don't see me, and let's pretend that if I speed up a little bit (over the speed limit) and am able to get in front of them and avoid an accident. Should I be convictable for speeding even though I sped to prevent an accident?
Sure, these are all edge cases and there are loads of cases where it is clear cut, but you have to write a law that can handle the edge cases. Without accepting the vagueness of human life, you'll wind up with an unfair conviction that is horrible.
Or, alternatively, you can write the law simply and let people decide for themselves if it's worth breaking.
So, no exemptions for anyone, but then part of the cost of running an ambulance service is paying speeding fines regularly. Given the cost of ambulance services without that, the additional expense is lost in the noise, making it obviously a good choice to speed when useful (for ambulances).
Trying to figure out after the fact whether someone had a good reason to break the law (and therefore shouldn't be penalized) is one of the things that complicates legal systems enormously. Instead, we should write the law clearly and specify the penalties for breaking it directly, and let those who have the best information about the situation, the potential lawbreaker(s), choose whether it is worth breaking the law in a given instance.
The whole point of the proposed system is to capture all the downside of a given action in a single penalty. Therefore, escalations based on repeated actions wouldn't make any sense.
Some countries do a "penalty points" system where you get (say) 2 points if you're speeding, and if you get (say) 12 points, you're off the road for (say) 2 years. Your proposal of "let people break the law" means that you'd run out of ambulance drivers.
You then have the problem of whether someone can be fired as an ambulance driver if they don't speed. Many countries employment law says that you can't fire someone if they refuse to break the law for the job. So what happens there?
Yes, if we changed the laws, laws would be different.
I'm not suggesting that laws should be passed that work this way within a framework that assumes they don't. The solution to a mountain of bad code is not to add another layer that tries to make huge changes; it's to rearchitect. I also understand that this isn't going to happen in a large existing system like the US; I think it's a better way, but there's no easy, incremental path from here to there.
As for your hypothetical: In this system, since the vast majority of penalties would be monetary, or have monetary equivalents, and since the entire damage is (supposed to be) captured by the penalty, ambulance companies would come up with their own rules under which they would pay fines on behalf of their drivers, contractually. The market could then correct via abuse of those rules by the driver, or refusal of drivers to work for that ambulance company, depending on which way the rules erred.
No, you'd see more complex laws because law makers would just write around the unit tests rather than address the fundamental issue. Ergo, accessing a university computer would be fine (because that's in the test) but accessing a library computer would not .
To bring this into context, legislatures have actually been trying to reduce flexibility in several areas of the law recently, most notably in sentencing guidelines.
This can result in some bizarrely harsh sentences -- where a domestic violence victim firing a warning shot at her abuser gets 20 years in prison, or where someone who knowingly writes a bad check gets 25 years in prison.
Congress shall make no law respecting an establishment of religion, or prohibiting the free exercise thereof; or abridging the freedom of speech, or of the press; or the right of the people peaceably to assemble, and to petition the Government for a redress of grievances.
I'll go with yes. Alas, interpretation then falls to the definition and grammar of every part of said law.
Worth noting that definition and grammar are also contextual. Define "speech". Does that include visual images in video games? Grammatically no. Clearly not contemplated by the founders. But absolutely a fundamental part of free speech given the current times.
What constitutes "establishment" of religion? Does this mean congress can make no law about what a teacher teaches (this will abridge their free speech, at least in a temporal sense)?
I've never been able to decide whether or not we should rigorously enforce Title 4 Chapter 1. On one hand, such enforcement would be ridiculously overbearing. On the other hand, such enforcement would be ridiculously overbearing.
It doesn't matter as much as you say. The fact is, at the very least we can now know better where the fenceposts are, and this will have the undeniable effect of creating a more educated citizenry. A secondary effect is that motivated people can now create tools that reveal ways in which legislators are positioned in relation to those fence posts, and why their interpretations (such as they may be rationalized in accordance with your observation regarding law enforcement) are positioned where they are.
Perhaps most importantly, this will serve to make the law shallower. Currently, many laws are passed with large parts in reference to other laws, definitions from 400 pages elsewhere in the text (themselves with referential connections to disparate locations), and providing a way to analyze the law programmatically will have inevitable analytical benefits that allow citizens to know exactly how the sausage is made, whose farm the animals are coming from, and how it's been spiced.
There is this wonderful article by John Hasnas, "The Myth of the rule of law".
It brings a number of very interesting ideas:
* The law is inconsistent and possess contradictory rules. From contradictory premises, sound arguments
* It gives concrete examples of legal cases and how completely opposite judgments could be rendered, both being based on correct use of laws and analysis.
* Laws are not applied impartially, are not neutral, apolitical nor objectively applicable by judges. People who believe they live under "a government of laws and not people" tend to view their nation's legal system as objective and impartial. Obey and subject themselves.
* There is a cognitive dissonance between the laws and the people who make them. People generally believe that the law are generally good and should be obeyed. People generally believe that politicians tend to be corrupt and influenced. The people who make the law cannot be trusted but yet the laws they write should be.
At least for me, accustomed to logic, determinism and mathematical models for laws of nature, this was actually a surprise. Instinctively I still find it distasteful, though I can't say I have anything better to offer other than the unrealistic ideal that all judges would be guaranteed to be truly impartial. I have never directly benefited nor been harmed by the nature of this 'code' either, unless you count getting out of traffic tickets by switching on a learned persona that has people skills.
> the unrealistic ideal that all judges would be guaranteed to be truly impartial.
Even this isn't necessarily a good thing. Part of the value of a judge is having an empathetic element in the position of final arbiter. Decisions aren't always "GUILTY / NOT GUILTY"; they're often long-form essays discussing the merits of the case, the factors under consideration, the logic and reasoning behind the ultimate conclusion and so on.
Math is nice because it can be reduced to a symbolic language. We're not at the point where we can reduce human beings to symbols yet.
Italian law defines itself as being complete at any given time. This is why I do not follow Italian law, because it's impossible to follow ipso facto. Is this formally consistent?
No, judges (who mainly interpret words in laws and partially juries), are not allowed to just make things up all the time, which is what you're implying.
The US legal system is case law. of course, that makes interpretation even more non-deterministic, as you depend on your $10,000/hr legal team to dig up favorable ruleings
This is pretty awesome, and if it were in git/hg would have the ability to write a 'blame' tool to figure out who voted on the part of the law that is pissing you off :-)
Actually, you wouldn't.
This is the US code, not the legislative info :)
I actually tried to create this once (with a team behind me, in fact) with what's available or possible with the legislative info.
THOMAS theoretically published in XML, but it's missing a lot of info.
Not only is this info not published, it's not even stored.
They still are literally passing bills around to each other in some cases. You'd have to sit in on committee markup hearings, etc.
Even the small amount that is published from markups or whatever doesn't tell you who did it, only that it was done.
Some committees were willing to give more info. None were willing to essentially publish the in-flight staff attorney or other versions that would tell you for real who changed something.
Remember also that hg/git diff does not display what really happened.
It is displaying "how can i produce version B from version A using some minimal or near-minimal set of changes", converted to a line (or sub-line) based set of changes.
This does not tell you history, only one possible set of changes.
THOMAS does publish some in-flight versions of bills, but again, it's not really enough to do what you really want to do. I can tell you a bill changed between introduction and markup, and was different again when it got back to the floor. I can even, in some cases, tell you what was amended/deleted.
I can't tell you who did it.
(Well, i can tell you with some percentage accuracy, because we built a machine learning model, but ..)
The US system of legislative development is quite flawed. There are a lot of places where changes can be made without attribution, emerging from committees without saying who added what.
In most Parliamentary democracies you can only propose amendments from one of the two chambers, so any amendment can always be traced to the Parliamentarian who moved it.
I'd support having a nice and loud discussion on doing this. Being able to trace the authorship of line items doesn't seem to have stopped pork in other countries, but it might mitigate it. And we'd be able to yell at people better.
There are other amendments that cut back on some of the worst pork.
The Australian Constitution in section 55 forbids tax and spending legislation to deal with any other subject. If an Act includes other material, it's void, it has no effect.
This prevents the American situation of omnibus bills, rider amendments and the like.
We still get pork barrelling here; but between S 55, fused executive and legislative and strict party discipline, the political incentives are differently structured for individual politicians. It creates a stronger check on profligacy.
You can already do this - Congressional voting records are publicly available. However, even if you correlated these records with specific legislation, you would be making a dangerous mistake by missing the big picture.
Many laws are passed jn bundles and require compromise. Just because your Senator voted to support farm subsidies, doesn't mean he likes them - it just means he wanted a minimum wage increase to pass more.
Hopefully, as a result, the disturbing statements like the ones below will become obsolete:
James Duane, Regent Law School professor, defense attorney:
"Estimates of the current size of the body of federal criminal law vary. It has been reported that the Congressional Research Service cannot even count the current number of federal crimes. These laws are scattered in over 50 titles of the United States Code, encompassing roughly 27,000 pages. Worse yet, the statutory code sections often incorporate, by reference, the provisions and sanctions of administrative regulations promulgated by various regulatory agencies under congressional authorization. Estimates of how many such regulations exist are even less well settled, but the ABA thinks there are ”nearly 10,000.”
http://youtu.be/6wXkI4t7nuc?t=5m18s
Supreme Court Justice Breyer:
"the complexity of modern federal criminal law, codified in several thousand sections of the United States Code and the virtually infinite variety of factual circumstances that might trigger an investigation into a possible violation of the law, make it difficult for anyone to know, in advance, just when a particular set of statements might later appear (to a prosecutor) to be relevant to some such investigation."
http://www.law.cornell.edu/supct/html/98-93.ZD.html
If you were to start a new country, what would the legislative process look like there? For example, how should new "startup nations" like BlueSeed (http://blueseed.co) inspired by Seasteading Institute go about passing and storing laws? Should they have some sort of open github repo to which anyone can make pull requests? How do you see the congress of the future?
You can look at relatively small jurisdictions and copy what's appropriate. Throw out hunting and fishing and take Alaska's laws in 1959 and you've got the minimum for a jurisdiction. Same for the Canal Zone. You can add legislation from other jurisdictions that works, like New Zealand's torrens (not torrent) system. Alberta's condo laws. I wrote a set of laws for a new jurisdiction, there's no reason to start from scratch.
You just say that the laws in force on a particular date apply locally, minus anything that physically can't apply (eg laws about particular locations).
The law of every country in the English-speaking world started that way. Australia's current system of law, for example, commenced as a branch of British law on 26 January 1788. All the laws in force in Britain at that moment were presumed to apply; laws governing institutions and issues peculiar to Britain-as-a-place just weren't of any consequence.
Periodically you go into the collection and clear it out. In Australia in the 80s and 90s there was a law reform movement and as a positive side-effect enormous research was done to discover the true coverage of "Imperial" laws still technically in force. Our various Parliaments passed various Acts to repeal and replace old laws.
For example, where I come from, in the Northern Territory, the Law of Property Act repealed laws going all the way back to shortly after the Norman conquest.
You just say that the laws in force on a particular date apply locally, minus anything that physically can't apply (eg laws about particular locations).
Yep. Or you give yourself a new constitution and say "All laws previously in force automatically come into force, unless they contradict the new constitution". Ireland did that.
Likewise Ireland cleared out a lot of old laws in the 200X's. It was done by saying "Anything pre-1922 is repealed unless it's on this list".
I'm unsure why they kept some laws, like the 1204 law on "Erection of castle and fortifications at Dublin; establishment of fairs at Donnybrook,Waterford and Limerick", but at least now we can refer to it as the Fairs Act of 1204....
Doesn't appear to include codes and standards which are included by reference such as NFPA, IBC, IRC, SAE, etc. (see [1] for a non-gov't project to publish those)
Nevertheless it is a very good thing to see the the gov't publish (most of) the law in an easy to use format.
Just from a Natural Language perspective, this is amazing. By using the code as as a corpus, we can see how differently legal language differs from day-to-day parlance. Such an analysis might be fascinating, especially if we compare to word frequency in Google Ngram's historical index. I suspect legal language trails several decades behind modern lingo.
Semi-intelligent queries can be executed, such that ignorance of the law might be abated. Imagine saying "Siri, is it illegal to do X?" and Siri answering you. This is important, because of the "Three Felonies a Day" syndrome with unwitting violations of the law. http://www.amazon.com/Three-Felonies-Day-Target-Innocent/dp/...
There is a company that is doing something somewhat related and equally cool. They use NLP to identify who may have written particular portions of bills.
http://www.legcyte.com/
The law can be interpreted as a set of rules matched against an action in a particular context to determine whether said action is legal.
Right now lots of people do this manually.
Maybe computers can do it better.
If computers can do it better, maybe people could focus on writing new laws and refactoring old ones instead of repeatedly interpreting old laws for each case.
Yup, legal code isn't that different from computer code where a judge is the interpreter and evidence is fed as input.
If we could invent a computer interpreter that acts as a judge, laws and contracts being its code might make it obvious to lawyers why it doesn't make sense to allow code to be patented.
Every time lawyers would write laws or contracts they would have to avoid using legal ideas that have already been patented subjecting them to the same legal difficulties software developers face every time they write code.
You could also add in EDGAR data that touches the laws to make estimates on the way the judiciary would interpet a certain action. It could also be used to find loopholes, conviction-free zones near boundaries in the law that could be closed.
It's tragic that the United States (Federal) Legislative Model (USLM) is defined in terms of W3C XML Schema Definition language (XSD) instead of the comparably sane RELAX NG and its easily interpreted compact syntax. You would think that something this important ought to be made clear and understandable.
EDITED TO CLARIFY: The tragic part isn't that the schema is given in XSD but that it's defined in XSD, which lacks RELAX NG's simple semantics and composibility rules. For a good summary of what I'm referring to, see James Clark's message to the IETF on the subject:
In practice, it probably doesn't make any difference. Assuming, for the sake of argument, that XSD is expressive enough to allow the authors to say what they're trying to say, in an unambiguous way, it's more or less a moot point. RELAX/NG is awesome, sure... but to some extent the "war" between it and XSD is a religious war.
Pretty much every popular & widely used language / platform has XSD support... hell, it's so commonplace there are probably schema aware xml parsers in Brainfuck, INTERCAL and Befunge.
RELAX NG may well be a better choice, but saying this is "tragic" strikes me as a bit of excessive hyperbole.
The tragic part isn't that the schema is given in XSD but that it's defined in XSD. What I'm lamenting (yes more hyperbole) is that a schema this important wasn't defined in a schema language that had clear semantics and composability rules, fostering reuse and adoption for related domains, of which we would expect there to be many. (Later, of course, the definition could always be extruded into XSD and other popular yet semantically stunted formats as a practical publication step.)
Fair enough. I haven't really dug into this schema in detail yet, but I'm guessing that XSD is expressive enough, and that - worst case - somebody could define an equivalent schema in $WHATEVER, and mirror the data after tranforming it. It's not a perfect setup, but at least it might make the content more usable for some purposes.
I'm kinda curious to see what can be done with it in terms of transforming to RDF triples myself, but time will tell...
I would say that the 'law' is just subjective manual process, and we desperately need more tools for every-day judgement and decision making.
For example, if there were a computer system that logged all corporate financial transactions including income, then we could automatically tax large corporations, rather than waiting for them to report income through loopholes.
Maybe try to organize some tech-minded staffers on the hill? Get them to put bills onto a github repo when they are made public, maybe even XMLizing it to make it more exposed to machine analysis. It'd be a huge step in congressional transparency, especially now that bills are going into the high hundreds and thousands of pages (not a dig at the healthcare bill in particular, just a trend).
Well it looks like the sunlight foundation has done some nice work in this area, but as far as I can tell these are all bills that have made it to vote. http://www.opencongress.org/bill/all
Whereas, I would like to see the drafts and how they progress behind closed doors with all the lobbying influence.
I think its quite understandable that they have the deliberations in private. Imagine if your customers saw every minute of your office's day. What irks me is that although bills are available, they are available in such a way that it is a fulltime job to even look for things of interest. With better machine-searchable formats, you could set up alerts for potentially interesting sub-components of legislation that is up for debate.
Edit: I don't endorse some skeevy lobbying activities, but that isn't the only influence, and there are some legitimately difficult choices that our reps make (when they're working right... so I guess rarely) that they believe are in the best interest of the country and their constituents. Many of these decisions would be made even more difficult and actually discourage much of what thoughtful and earnest decision making does exist.
Since this is hacker news, I was curious to see which code the subject was talking about and surprisingly not the code I was thinking of. I wonder how much more of this gov code has actually been read by the people in all those countries where it's been available longer.
Putting something online is very different than actually getting meaning out of it. I'm afraid that this will push us towards more laws rather than less. But... Perhaps there will be good machine learning apps that can make sense out of all the contradictions.
This is awesome. They even have a stylesheet apparently.
However though the file claims to be UTF-8, vim seems to disagree, at least for title 10. I can't tell what encoding it really is though, doesn't seem to be latin1 or windows-1252 either.
The encoding looks like valid UTF-8, at least for the first few pages that I glanced at.
I did notice the section references look a little strange in vim, e.g. "act Aug. 10, 1956, ch. 1041, § 1" near the top; it consists of c2 a7 (section sign), which looks fine, followed by e2 80 af (narrow no-break space), which shows up as a box in vim.
I'm more annoyed that they are out of order with reference to which clause in Article I, section 8 their existence is justified by - but I suspect there's a reason for that.
This is only the codified portion of the federal law. So called "Statues at Large" that are passed by Congress but not codified into USC are not included. Plus this does not include the federal common law based on the rulings of federal courts.
Given that it can be mechanically converted to JSON, I have a hard time seeing how JSON would be a lot more useful. "Very slightly more convenient" seems like the most we could reasonably say.
We might have to wait even longer for all the common law based on the court rulings to be published in the same format. Not to mention the "secret common law" based on the FISA court rulings.
Not sure what format the files are kept in, but it's been done. Several private companies have these behind a paywall:ThompsonWest and Lexis/Nexis are the most well known, but there are others. Don't forget the published caselaw of the fifty states as well as state legislation. The U.S. Code is far from the whole picture.
There are but XML schemas are well understood, standardized and have been around for a long time. Even if they did this project today, XML is the right choice due to its maturity and suitability for documents.
http://www.gesetze-im-internet.de/
All laws are available in XML, HTML, PDF, etc. The site also provides an RSS feed.
In addition, some enthusiasts regularily download stuff from there and apply those to a Git repository:
https://github.com/bundestag/gesetze
That way, this repository contains not only the current laws, but also the history of how the laws developed!
For the Git repository, the XML version is not used directly, but converted to markdown. This produces very readable diffs:
https://github.com/bundestag/gesetze/commit/f90e8fc8eb20f081...
Wouldn't it be cool if we could finally manage our laws of filing pull requests?