Versioning the text of the law is not a problem. It is a solved problem. Every decent legal office has access to a versioned text of the law. The new challenge is the versioning of the legal content (or _meaning_ if you want) and the (semi-) automatic creation of consolidated texts at a certain point in time. The last point is difficult because the consolidated version is not a single document but a set of possible documents.
See also the other answer I gave on the difference between text and content: http://news.ycombinator.com/item?id=4023109
Cherry picking commits and branching on every possible merge conflict (and picking one winner for each branch) should be relatively straightforward, I guess the question is how big of a set of possible documents might this be - 10? 100? 1000? Would this be a process done by lawyers for the purposes of understanding laws on the books or by someone in the legislature at the end of each session?
Apologies if I'm ignorant on this stuff - I'm just really interested.
The problem is that, in general, (1) it is not straightforward and (2) you can be liable for damages if you state publicly "this is the correct version" unless you are a judge or the appointed authority.
Talking more practically, here is something that would be interesting to have: a tool that (1) analyses an act (or a bill), (2) identifies which parts of it state a modification to existing acts and codes, (3) have a look at these target documents and (4) tell you which of the "hunks" of the "patch" can be "merged" in a straightforward manner, almost straightforward or require an expert review. Steps 1, 2 and partially 3 are already done in many systems through NLP techniques (have a look at http://wyner.info/LanguageLogicLawSoftware/ for example). Step 4 is a brand new thing. Do anybody want to work on that?
A tool like the last one would simplify things a lot. You go from "sorry, I cannot tell you anything because a lawyer is required for everything" to "here is what I am reasonably sure about; for the last 5% you have to ask your lawyer if the correct merge is A or B".
> I guess the question is how big of a set of possible documents might this be - 10? 100? 1000?
The set of possible versions grows exponentially :(.
> Would this be a process done by lawyers for the purposes of understanding laws on the books or by someone in the legislature at the end of each session?
Lawyers are required. Many institutions publish "end of the year" consolidated versions of their acts. In some countries these consolidated versions have legal power, in others they are just handy references (the judges cannot use them).
Fun fact: it happens quite often that one branch of a parliament thinks that the current version of an act says X while the other branch thinks that it says Y.
Lots and lots of lines that don't change anything useful, and then the one change is hard to understand because it's wrapping a bunch of words causing extra changes.
I would recommend un-wrapping lines before commits and then have the presentation app smart enough to not show all of the lines where just a date in a header changed, doing word wrapping on the client side.
Also, without commit information, the changes are hard to wade through. Are there summaries or titles of the bills that can be used in the commit message? Who are the authors that drafted the bill and who are the "committers" that voted for it?
It originated as a graduate school project of his at the UC Berkeley School of Information.
It would be great if they inter-operated.
here's an example of an act that's been modified:
and an example of a bill going through parliament:
The text and process timelines (the easiest to create and visualize) are interesting from a journalistic point of view but useless from a legal point of view. You rarely care about the text of an act at a certain point. What you really care about is the state of the law, the sum of all the _effects_ of all _acts_ in a precise moment.
For example it may be interesting to know that on 31st December 2011 an act as been enacted that says that on the 1st of July the new tax code will be amended to read "The taxation level is 10%" instead of the previous "The taxation level is 30%", but what I really want to know is "what is the taxation level today, 25th of May?". Taking only the text into account will not give you the correct answer. What you need is a more complex system that "merges" all the intended actions written in the acts into a (mostly) coherent state of the law.
Versioning the text of the law is not difficult, neither has been difficult since the days of CVS. The hard task is to extract the legal meaning from the text and create time-and-context-bound actions from that.
The point of the versioning is so that I can see which representative made which change, and from there derive which ones actually have my best interest in mind.
In many legal systems you cannot link representatives' votes with acts. For example consider http://en.wikipedia.org/wiki/Recorded_vote , http://en.wikipedia.org/wiki/Voice_vote or the fact that many parliaments vote on single articles (or single modification proposals) and the complete act is never voted.
If you want a `git blame`, well, that is almost impossible in current legal systems. Parliamentary records are much more interesting for that purpose.
If it gets us to point B, C, or D, though, at least more people will understand the difficulties and challenges of getting to Z. Maybe some people will start to ask "Why is this so difficult?" "Does it need to be so difficult?" "What are the forces that make this so difficult and how can we circumvent them or remove them?"
As a software developer, our laws look like the worst form of spaghetti code. They're such a mess that if this were a software product, I would be a strong advocate of doing a complete rewrite. While we're in there doing that rewrite, I want there to be an update to our change control management.
> many parliaments vote on single articles (or single modification proposals) and the complete act is never voted.
Sounds like a flaw in change control management. That would be like a software developer who checked in code without being responsible for having the automated tests succeed. Any such process that didn't hold the software developer who checked in the code accountable for fixing how it breaks the rest of the application is fundamentally flawed.
Rather than being apologists for the current system(s) of law making and governing, why don't we think big and figure out a way to really re-invent them?
Step one is shining more light on the current system by getting more people in lots of disciplines looking at it. Software design is fundamentally based upon the careful application of specific sets of rules. We've made huge steps in solving problems that lawmakers just accept as the "way things are". We can do better.
No way. I am all excited about this kind of things and I have already stated that anybody who wants to work on this topic is more than welcome to mail me to discuss things together.
I am just telling you that these efforts, although necessary and interesting, are not novel ("new" yes, "novel" no) neither a solution to the real current problem. But let's all work together to overcome this.
> Rather than being apologists for the current system(s) of law making and governing, why don't we think big and figure out a way to really re-invent them?
We need to be both: realists and optimists. The reality is that any future system will have to deal with the current system without regarding them as "legacy systems": in UK there are still valid acts and cases from the late medieval times. Another harsh reality is that you can only change a legislative system from the inside. You can pressure it from the outside but, in the end, only people making the law can change how the law is made.
The optimism comes from the fact that there has been a huge movement in the legal offices all around the world in the last 15 years towards better legislative drafting rules (what we would call "coding standards"). If you want an example of a new guideline made in collaboration with computer scientists, have a look at http://www.apkn.org/lrp/guidelines/guidelines (there are being adopted by the youngest democracies in Africa, but also in some EU countries).
These guidelines contains things like "you should always state which acts you repel, never use 'all the acts contrary to this are repelled'". Do you see how much more _machineable_ is the former versus the latter?
Many legislative offices are pushing pressure towards MP in order to make these the use of such guidelines mandatory. It would be a huge step forward. Another way to do this is via a "the code is the law" approach: there is a tool made by the EU parliament that the MP can use to propose changes to debated bills. Such tool has all these guidelines hardcoded and there is no way to get around them (you can submit a written request but takes much longer to be debated). This tool is really increasing the quality of generated acts.
It also seems like they're creating a new website for browsing the U.S. code with more features for viewing amendments and source credits.
It started small and iteratively adds more and more features.
I always envisioned some access to this through something like git or Time Machine.
'the words "insane" and "insane person" and "lunatic" shall include every idiot, lunatic, insane person, and person non compos mentis;'
Interesting that that was considered to be up there with the legal definitions of "person", "officer", "oath", and "writing".
Right below the part you referenced:
> the words "person" and "whoever" include corporations,
> companies, associations, firms, partnerships, societies, and
> joint stock companies, as well as individuals;
So, there's a justification for the Citizens United decision right there. Congress said it was so in the definitions of Title 1, Chapter 1. Yes, I know it's more complicated than that. Still interesting, though. If Congress wants to change the CU implications, they can start by changing that definition right there.
If what you said didn't have a strong grain of truth in it, then there would be no need for this project. Our laws would naturally be more straightforward, clearly written, and better organized because they're so important to society.
There are some really strong forces that oppose simple and clear laws. Some of them are more natural results of maintaining a complex system. My feeling is that a lot of the code ugliness is due to the selfish needs of those in power.
In HN terms, the current system is Proprietary. This GitHub project is looking to add some Open Source goodness to the mix. I think it's a really wonderful idea, since the very act of shining light into the enormously daunting spaghetti code that we have to live by every day may help to wake people up to the unneeded obscurities, contradictions, redundancies, anachronisms, wastes, and outright abuses of power.
I fear we'll find out that we really didn't want to know how the sausage is made.
I say we use a strict majority to determine the acceptance of these amendments and forge a document that reflects the multitude of views in the hacker news community.
What would be the results, both realistically and idealistically, I wonder?
People who deeply care about the law are already able, and willing, to find the information they
need; I'm all for making it easier to manage, and there are worthy projects in that respect, but by
no means do I want ordinary citizens to start dabbling in legislation. The Founding Fathers'
romantic notions notwithstanding, running a government that provides important services to 350
million people isn't a side-job—it's a full-time job, and arguably a career. Heaping disdain on career
politicians is absurd: if they're good at their job, of course they should make a career out of it.
Which brings me to the idea underlying all these posts: that by keeping close tabs on the intricate
details of lawmaking, we can ensure that they will do a good job. I have heard this argument before.
It came from this guy who wasn't really a coder, but wanted to keep close tabs on what the coders
that worked for him did. So he started asking them to log in all their hours, with messages
explaining what they were doing. And he started looking at the commits in the VCS so that he would
see the actual code. Of course, when he didn't like something he would criticize. He would threaten
people with getting fired if they didn't code according to his standards. The coders tried to
explain that sometimes things have to be done in a way that's different from the "common sense" way,
and sometimes he was even reasonable about it, but he still was not a coder, so he had no way of
knowing what was involved.
That's who we're trying to become with projects like these. The most pointy-haired of pointy haired
bosses. Our pointy hair wants points of its own, and all because we try to hold people accountable.
That's a canard.
We want to hold politians accountable because we feel they are irresponsible. But what about our
responsibility? Who hired these irresponsible politicians to steward us? We did. Instead of looking
for ways to make politicians accountable, let's look for ways to make ourselves responsible. I would
start, on an individual basis, by taking ownership of our part of the equation: our vote. Remember:
"Accountability is something that is left when responsibility is subtracted" -- Pasi Sahlberg
Let's find projects that restore our responsibility. From that, the rest will follow.
I can only hope you remain in a constant state of fear. This has nothing to do with direct democracy or democracy in general.
Please keep your pants on. The government already makes this data available. I mean, where do you think he got it?
These are laws. Laws that we, as citizens, are obligated to comply with. Failure to comply with some of these laws lead to jail or financial ruin. And we are utterly ignorant over 99.9% of them. Especially the minute changes that happen year to year.
The idea that one must hire a lawyer just to be made aware of what the law is or is going to be ... is so warped and disgusting, I just don't know what to say.
I applaud any effort that allows a citizen easy access to the laws that govern us and especially their constant flux.
> I would start, on an individual basis, by taking ownership of our part of the equation: our vote.
Who am I supposed to vote for? The guy with the nice hair?
This is exactly the kind of tool that will allow me to quickly determine where to place my vote.
Try this: The idea that one must hire an engineer to build a bridge, or even design one, is so warped and disgusting, I just don't know what to say.
The idea that one must hire a doctor to prescribe life-critical and potentially deadly medication, or even give a diagnosis, is so warped and disgusting, I just don't know what to say.
I'm not advocating keeping citizens in the dark. But there is a reason we don't leave this to amateurs. We have already seen the way small, out-of-context passages of law read by people who lack legal understanding can get blown out of proportion in the media and threaten the country's progress, if not well-being. Remember death panels? The anti-vaccine movement?
People participating too actively in processes they don't understand is a very real danger. It doesn't necessarily outweigh the benefits, but I wouldn't downvote someone just for bringing it up.
The idea that one must hire an engineer to walk across the bridge is warped and disgusting.
That's one demented bridge.
Hiring lawyers just to grasp the law is absurd and reveals a fundamental flaw within our body of law and government process.
Systems like this could actually help with the "death panel" problem, which was mostly due to people listening to propaganda instead of just reading the law for themselves. At the other end of the spectrum are bills like SOPA, a case where the citizens objecting were better informed than the legislators.
Ultimately, citizens are tasked to judge the legislators, so they're involved with the process anyway. The only question is how well they'll do the job.
> The idea that one must hire a lawyer just to be made aware of what the law is or is going to be ... is so warped and disgusting, I just don't know what to say.
Having the text of the law available will not help that. As others have pointed out, the meaning of the law is very different from its text, and that's what you pay lawyers to explain to you. It's a pleasant fantasy that the world is simple, but it's a fantasy nonetheless, and it will always be one in a large nation.
The only comfort we have is that, by and large, while we only know a tiny fraction of the laws we live under, it is only a little smaller than the fraction that affects our actions.
> This is exactly the kind of tool that will allow me to quickly determine where to place my vote.
No, it isn't, unless you're a lawyer or a legislator yourself. Understanding law is an expertise, not a casual hobby. I cannot emphasize this enough. If you disagree with this, there is little more to say. And if you think it should be different, again, I think it isn't possible, and I believe that a few days talking with any lawyer about whatever your favorite topic is will show you otherwise.
And so, if you instead rely on reading the US Code directly and making judgement based on your understanding of it, you'll be making gross mistakes, because you won't take into account Supreme Court rulings that will affect the interpretation, other, non-obvious parts of the US Code that directly bear on how certain passages must be read, and an endless number of arcana that make a real difference.
But you'll still think yourself qualified, and you'll vote based on that. Except you won't have read all the changes made every year, because how could you, so you'll really vote based on the subset a few people told you to focus on.
This is the irony: a seemingly useful thing, the availability of ALL THE INFORMATION, becomes a tool for shaping whatever narrative the people we trust want to shape (and I don't mean "want" in a malicious way). But because they will have the information at their fingertips, we'll assume that they have properly analyzed it, and pass judgements based on theirs, thinking we are basing them on facts..
> Who am I supposed to vote for? The guy with the nice hair?
I inverted these two because this answer is the critical one. You are supposed to try and meet your representative. You are supposed to talk to her, and listen to her, not as a politician, but as a person you are entrusting with an important job. That means pretty much ignoring the stump speech, and instead talking to her or her staff, seeing where they are coming from, and approaching to learn, not to judge. It's hard work. It's way harder than grep-ing for keywords in the repository, or look at the commit history of a particular passage we dislike. But that's where responsibility starts. Not with being hypercritical of every little thing, as we developers are so good at being.
Wow. This is patently offensive. My responsibility as a citizen is to understand the law and comply with it. In fact, that's the only responsibility I have as a citizen. That's what it means to be civil. To be civilized. To live under a body of laws. If you don't understand them, you can't follow them ... how can you call yourself civilized?
If our laws are so complex that they can't be grasped by any layman, then we have two choices.
1. Eliminate the laws and render the system simple enough to grasp.
2. Create tools that allow us to grasp them.
Now, I prefer #1, but willing to settle for #2. You seem to reject both?
Anyway, this is the beginning of an open-source system that's already available in proprietary form in some fashion. If you think lawyers understand the law, well, you're a bit naive. They just use LexisNexis. Which provides laws, cases, rulings, opinions, etc. etc.
> you won't take into account Supreme Court rulings that will affect the interpretation
Please read some of the other comments. The author gets this. And this is just Version 1.0, right? That's like saying a baby is useless because it can't hold on to a job. Well, yeah. If you kill the baby, it never will.
> You are supposed to try and meet your representative. You are supposed to talk to her, and listen to her, not as a politician, but as a person you are entrusting with an important job.
This is very quaint, and honestly, I'm a big fan of the principles on which this nation was founded ... but this is merely one of those principles.
Why do you think that the founding document of our laws, the Constitution, enshrines the postal service? The postal service was then, what the internet is now. The founding fathers also recognized the power of shedding light on the legislative process.
Tools like this help that.
I completely embrace 2, as you do. I just don't think that live tracking of legislation is the way to do it, and I think that it has dangerous pitfalls.
> If you think lawyers understand the law, well, you're a bit naive.
I think they understand the principles on which the law is grounded. Basically, either law school is useful or it isn't. By most accounts, law school is 3 years of intense study, at the end of which you're qualified to...use LexisNexis. Either those 3 years are a waste, or they learn something that takes roughly that long to learn.
Of course some laymen can achieve that knowledge, and some in less than 3 years, much like people can learn to be good programmers without setting foot in a classroom. But that's an exception, and we can't predicate the functioning of society on exceptions.
> That's like saying a baby is useless because it can't hold on to a job. Well, yeah. If you kill the baby, it never will.
That's a fair point. And part of the beauty of the baby is that you don't know what it will grow up to do. But every parent has a dream for their child; my argument is that the dream expressed is misguided.
> This is very quaint, and honestly, I'm a big fan of the principles on which this nation was founded ... but this is merely one of those principles.
I know, it is quaint. But I don't really see a good alternative, because I don't trust our ability (yes, mine included) to figure out who to trust based on crafted messages, or selected video clips.
As I said, your point about the baby is well taken. This can definitely be a building block—but why don't we think about a building block to what?
As a thought, how about running analyses on laws vs. desired outcomes vs. predicated outcomes. Analyses run using open-source code—and hopefully eventually with predictive power. I think something like that might be very useful, and would definitely rely on this repository; especially if someone has the resources and time to artificially create it going back several decades.
Isn't there some value in making people more aware of what these "irresponsible" politicians are doing then, so that we don't keep lazily voting them in again and again?
Yes, those who care about the law are probably already involved. Shouldn't we be trying to get more people to care, though? More people getting the information from the source instead of having their opinions formed for them by the news anchor is a good thing, IMHO.
What we care about is narratives. And since narratives are fundamentally subjective, it's very hard to create a narrative that legitimately serves "the public good" while simultaneously satisfying the public. I hope there is a solution to this; I just don't think throwing more information at the problem is it.
Because direct democracy has been such a disaster for Switzerland.
It is very close to it.
In fact the only differences between it and the theoretic ideal, are in the practical implementation of a direct democracy. All real world direct democracies would look very much like Switzerland.
Switzerland is also a country with 7 million people, not 350.
And 7 million is still far beyond the monkey sphere. Zurich is bigger than most towns in the US, except for the mega cities like New York and L.A and a few others.
Most of the US is made up less densely populated areas than Switzerland. That is why the US so much more conservative than Europe, because due to its geographic size, it is also much more rural. Europe packs something like twice the population in a similar area. And the expression "All politics is local." originates in the US - I think. So the US and its states could be structured like the Swiss federation and its cantons.
The bottom line is that real direct democracy on a very large scale (literally millions of people) exists and works like a Swiss watch.
That's one extreme I wish the world would follow.
But sadly, despite your fears, the world is going towards the opposite extreme - Singapore.
Similar to Switzerland in its wealth and prosperity, Singapore is not at all a democracy. And that's the government model the world seems to want to follow.
That's where China is going and that's what the US and Europe are very slowly sliding towards.
That said, I suppose each committee could use pay for a subscription to do their markup "behind closed doors" before the final pull request hehe.
Legislators tend to "add features" and "fix bugs" by hacking in special case handling, turning the code into a mass of hard to follow exceptions. I definitely think they do this in part because no one fires the one guy who understands the undocumented spaghetti code. But even if they placed some value on elegance and simplicity they'd still have to use some legal jargon.
And I’m not sure it’s possible to have a completely unambiguous language for dealing with relationships between human beings. The architects of Lojban have made some heroic efforts in this regard, and while that language does a lot to delimit ambiguity (e.g., if a sentence has no explicit tense markers, then it is not asserting whether the event is past, present, or future), but it can’t eliminate it entirely.
In weather forecasting, for example, you can't have a deterministic algorithm that accounts for the impact of every air molecule and calorie of energy in the atmosphere. Instead, Scientists come up with statistical models that give us a "good enough" picture of weather for our purposes of predicting whether or not a hurricane may be heading our way or if we should plan on a picnic over the weekend.
The beauty of it is that Scientists aren't really political about short-term weather forecasting. (I won't get into long-range climatology politics :) The models are either shown to work better than other available ones or they're tweaked or replaced.
Maybe we need a similar approach to law making. If you create a tax or spending law, it needs to be an input into our economic models. Economic models need to be open sourced and running constantly with complete transparency on the inputs and outputs. Over time, we should improve those models like we have on the weather ones so that they give us the best picture we can have on how financial laws will change the Economy.
Likewise, we should model the impact of other laws on prison populations, crime rates, inflation, test scores, etc. Let's decrease the demagoguing and the politicking all these issues and start getting to the science of them.
Sure, we'll still have debates on what we want the outputs to look like, but at least we could focus the debates more on the outcomes that we want to see rather than on what it would take to get us there.
Let's open source the law.