Live data from Hacker News

Germany's laws on github, machine-readable and ready to be forked

github.com

61–70 of 78 posts

Re: Germany's laws on github, machine-readable and ready to be forked

#61
post #40

Gesetze sind Prosa, sie enthalten keine maschinenlesbare Semantik. (Laws are prose, they contain no machine readable semantics) And there was me hoping they had fixed that ! Ahwell, one step at a time :)

Rewriting law to be machine-readable as in "instructions a machine can understand" would be quite a task I suppose. Interesting project though. Would that even be possible? How well does the law map on the black and white logic of a computer?

There's a large area of legal philosophy around those kinds of questions. Pragmatism vs. formalism in judging is one split that's sometimes identified, with "formalism" being closer to a view that the law is a precise set of procedures that must be followed mechanically, and "pragmatism" closer to the view that the law is a set of principles that must be applied using common sense to reach equitable outcomes. Lots of other positions as well, around that "what is law, anyway" question.

There are some attempts to formalize something like the pragmatic view, too (oddly enough), in artificial intelligence "legal argumentation" systems, which try to model the back-and-forth of adversarial legal systems, determining when to bring up an argument, how to counter an argument, etc.

Re: Germany's laws on github, machine-readable and ready to be forked

#62
post #48

Sorry semi-OT humour but this is one of the very few times were you can actualy fork with the law and come out ontop :). Sadly though alot of laws due to changes and word-smith pervertions can be hard to understand and in that it would be nice if there was some universal way to express law's that you could get any law in any country and express. That would be immpressive though hard to do. Only comparision would be p…

The closest thing to a universal expression of law is probably English. In older times, it would have been... Latin?

Re: Germany's laws on github, machine-readable and ready to be forked

#63
post #9

Awesome stuff. I couldn't find anywhere though: is this an 'official' project, or is it just someone who processed the XML forms into markdown? Also, this: "All German citizens can easily find an up-to-date version of their laws online." And it's only 130 megs of markdown when zipped (246 unzipped)! A mere 4,737,628 lines[1]! Surely you have time to read it, right? And therefore be a well-informed, law-abiding citize…

[deleted]

Re: Germany's laws on github, machine-readable and ready to be forked

#64

Earlier quoted context omitted.

This is about as revolutionary as officially letting the plebs read the bible. Pretty damn revolutionary.

Anyone can already read the laws, though. I'm less sure that reading them specifically via git is a major revolution. it's possible something compelling will be built on top of it, I'll admit. For the U.S. code, something like Cornell's LII interface, which for a long time has displayed both the current version of the law and, for any section, the history of amendments to that section, seems more user-friendly than a…

>I'm less sure that reading them specifically via git is a major revolution.

You're very right. The hard part is knowing where to look in the documents, not where to go to find the documents.

In a former life I spent a bit of time with my nose in the CFR. The hard part was finding the which regulations pertain to me, googling for "47 cfr 73.3526" was a cake walk.

Re: Germany's laws on github, machine-readable and ready to be forked

#66
post #53

There was a great discussion on HN previously about this topic which also explains why a straight git implementation isn't viable for US law; I'm not sure if doing the same with Germany's laws would be similarly difficult: http://news.ycombinator.com/item?id=3968653

Since Germany has a civil law instead of a common law system, this might be easier. (But I don't know, really.)

Not really. Common law systems still have statutes that are compiled and amended. The "common law" potion of the system just means that court rulings are (potentially) binding upon other courts.

Re: Germany's laws on github, machine-readable and ready to be forked

#67
post #54
post #52

Earlier quoted context omitted.

The scary consequence could be that eventually there will be laws prescribing certain programming techniques for software projects. In Germany I think it is almost already the case, because if your software project goes awry, the judge will want to know that used current best practices of software development. I only picked that up in passing, though, reading about a case with another focus. But it scares me, because…

Requiring a certain degree of test coverage by law sounds like a good idea for life-critical systems.

So people will write some crappy tests to satisfy the law. I don't think much would be gained. But consultants would be enabled to earn more money, that is true.

Re: Germany's laws on github, machine-readable and ready to be forked

#68
post #12

They should definitely do this for bills also, so you can easily see who has incorporated what into each bill, and how the bill is evolving as it happens

Agreed. Every proposed change and amendment should be attributed to whichever legislator requested it so we can see who's inserting all these crazy clauses and loopholes.

Re: Germany's laws on github, machine-readable and ready to be forked

#70

Wouldn't it make sense to give each sentence it's own line, and use double linefeeds to demarcate paragraphs? It would make diffs much easier to read.

The python scripts to generate the repository from the xmls freely available from the german government is also on github: https://github.com/bundestag/gesetze-tools So, go ahead, hack! ;)
Post reply on HN