I do especially like the GitHub avatar: https://avatars1.githubusercontent.com/u/1994383 ;)
[1] https://github.com/bundestag/gesetze/blob/master/q/qnormbanv...
I'd love to see such a repository for the acts in my country, by the way, but the official source is a PDF, and most of the published acts are actually patches to existing (already heavily "patched"), like "In the section II, item 13a, change words 'foo and bar' to 'foo, baz and quux'". This mess untangled into an actual, highlighted, unified text is an actual product, and lawyers happily pay the subscription. I imagine it is similar in other countries.
If you're interested, here's a talk about it at Git Merge: https://www.youtube.com/watch?v=-qql1Ess7qM
Here are some scrapers/scripts around it: https://github.com/bundestag/gesetze-tools
It's a financially independent (it has a "pro" version) non-profit owned by the department of justice and the faculty of law of the University of Oslo. It is an official source and as such laws published there are officially, legally published and it has been that way since 2001. Laws relevant to private citizens are available for free. It's pretty neat.
-----------------------------------
From their README, it's just someone that converted the XML version published by the "Bundesministerium der Justiz und für Verbraucherschutz" (Ministry of Justice and for Customer Protection) which as they note is available at http://www.gesetze-im-internet.de/
For instance, a section I've used often for running my business is the VAT part: http://www.gesetze-im-internet.de/ustg_1980/index.html There is a notification service, including an RSS feed: http://www.gesetze-im-internet.de/aktuDienst.html
About the Markdown version in GitHub: after a quick inspection, most diffs seem to be plain additions of content, presumably as it was converted to Markdown. However, some diffs might have tracked changes in the laws, as this one: https://github.com/bundestag/gesetze/commit/3c1bada22f08b4e0...
I suspect the author ran the converter a few times and then abandoned it. In principle, it should be possible to keep updating it.
The improvement over the official XML version seems to be that with Markdown it's easier to get understandable diffs.
I'm not sure how they do it, but I guess that it wouldn't be extremely hard to have a small grammar to automatically convert the legalese patch into an actual git patch (most of the time, the sentences which wrap the editions are the sames).
------
The French Civil Code, in Git
Introduction
Here is a little hack, the result of an afternoon of code: the Civil Code in Git.
If one considers the law as a set of texts modified by the various assemblies of the state, one can consider them as a set of text files created collaboratively.
The members of government, and the various assemblies, work in collaboration on these files, which, once voted for, are written into the Code (here the Civil Code).
But there is another category of people who, for fifty years now, have worked on text files collaboratively, and excel at it: developers. They have created extremely effective collaboration and tracking tools for working on source code. The most popular to date is Git.
Git not only allows you to view the source at a time T (snapshot) but above all to easily visualize the changes in the source (commits). In the analogy to the Civil Code, this permits the tracking of the changes made by a law.
Combine all of this with the Open Source philosophy, and the second part of the analogy is made: the modification of source code in an open and public fashion.
Finally, the Civil Code is a part of the source code of France. And source code belongs in source control. Period.
Example
Here is for example the commit which authorizes marriage for all: https://github.com/steeve/france.code-civil/commit/b805ecf05...
This is more readable than, for example (cf http://www.assemblee-nationale.fr/14/ta/ta0120.asp):
"At article 165 of the same code, the word: 'before' is replaced by the words: 'during a republican ceremony by'."
Technical Note
Git dates are based on the Unix epoch (01/01/1970), changes before these dates are all dated 01/01/1970, with incremental seconds; the commit message gives the correct date.
LICENSE
All files are licensed under Creative Commons (https://creativecommons.org/licenses/by/4.0/).
One small point: I do not understand why you added "it" to the last sentence of the introduction. Your translation of that particular sentence feels weird to me, why not simply:
"And source code belongs in source control."
Also, maybe "différentes" (in the third sentence) could have been translated to "various"?
* * *
Aside, note that the original text itself has several errors. Many accents are missing, some letters or words are missing or doubled. I may submit a PR to correct them.
Moreover, the text includes many English words (not all of which are common in French). It even includes a barbarism: "tracker", from English "track" and French common verbal suffix "-er", supposedly a verb supposed to mean "to track" — a shame, since French has the verb "traquer" to express the same thing.
"And source code belongs in source control."
You're right, of course. That was left over when I switched from "it goes in" to "it belongs in". Fixed!
For "les différentes assemblées", would you say "various assembliess" or "the various assemblies" in this context?
There's a Markdown version here, if someone wants it: https://gist.github.com/spinda/282452390bf6d6fbcc5b
So for earch article, the codes tracks "when" the article changed, stores it in a hashtable, and replays the "time" (date) for each snapshot, and creates a commit each time.
Then there is a python script that takes that JSON file, creates the .md files and runs the git commands in the shell.
Ultimately the sad thing is that I had to scrape this information. There were lots of pitfalls due to bad formatting and so on... Well, scraping.
I am french born and raised, btw.
We sure do know how to complain. :)
(slightly unfair, of course---obviously the complaint about grammar had to come from a native speaker; who else would notice it in the first place..?)
https://github.com/steeve/france.code-civil/commit/b805ecf05...
You can clearly see that the "commit/law" changes the wordings of various files to replace "mother and father" by "parents" and "husband and wife" by "spouses".
By that i mean if law x is changed to say "blah blah blah" that means that law Y no longer applies and law Z is changed to say "foo bar bobbins"
The code is not readonly at all, each law within the domain covered by the code is an alteration to the code. Individual laws are reified as commits, and the repository tracks the evolution of the code as laws get voted in and applied.
http://eur-lex.europa.eu/n-lex/info/info_fr/index_en.htm
(I don't know any French and don't know the particulars of French legal system that much, so I cannot really assess quickly based on what I can find in the net).
Pull Requests! Can you imagine a democracy editing its laws through pull requests and code review?
[1]http://www.legifrance.gouv.fr/affichCode.do?cidTexte=LEGITEX...
I do agree that the technical details would be interesting.
Unfortunately, the author was utterly careless about spelling. That really makes it feel like a quick hack.
> Voici un petit hack, résultat d'une après-midi de code : le code civil sous Git.
"Here is a quick hack, the result of an afternoon of coding: the civil code under Git."
So I'm curious: how do legal scholars and practising lawyers track changes to legal systems over time? Do they use trees, DAGs, or something else? Do they have concepts similar to change dependencies and regressions? What special concepts or techniques does the domain require?
The UK has legislation.gov.uk [1], which seems to treat acts of the UK parliament as some kind of structured objects. Amendments can be accessed, and there is a timeline feature (for example [2]) that shows changes over time. It does have the feeling of being incomplete, though, and lagging behind changes as they happen. So is there some other, canonical, data source that this site tracks? What is it?
Anyone knowledgeable care to comment?
[1] http://www.legislation.gov.uk/
[2] http://www.legislation.gov.uk/ukpga/1974/39/section/21?timel...
As far as the changes to regulations go, they are announced in the state paper, with a starting date. All lawyers are obligated to follow the changes. The ministery of justice also offers a service, they collect all the law texts and publish them. Although recent changes come with a considarable amount of delay. So you use it at your own risk.
In germany there is an excellent site: http://dejure.org/gesetze/BGB/413.html You can browse the regulations and read the comments and decisions based on that very regulation. I hope we had a similar site here in Turkey.
Moreover, I also have to state that law regulations don't change quite often. The regulations that change are usually very specialised. All regulations already have a structural order. Especially code books like civil code have regulations that can't be treated seperately.
Last but not least, UK and US have a different law system than France. French law has its roots in Roman law. Nearly all regulations are written in books like civil code.
The answer to your question about how lawyers figure out changes to the law is: they give an assignment to a new associate (or law student, in the case of scholars) to track down the history manually. It's a horrible pain in the ass.
Most codifications I'm familiar with (both state and Federal), whether in print or online, include a list of amendments along with each statute. But any given amendment may have changed a dozen (or far more) statutes, and it's generally a tedious and time consuming job to track down the changes to a given statute over time. Also, the reasoning for the changes, when it's given at all, is often burried in committee reports, which are rarely accessible by following links on a webpage. Some commercial services (LEXIS, WestLaw) will provide historical "snapshots" of particularly important statutes (the Internal Revenue Code, for example), which can help to some degree but which still leave a lot to be desired.
Statutes in general contain a lot of structural information (cross-references, definitions, etc.) which in some online sources are hyperlinked at least, but changes to which are not to my knowledge expressly tracked. One can easily get confused when, for example, a court case refers to a section of a statute that has been renumbered, or to which a new subsection has been inserted in the middle.
I took a quick look at the UK site above, and ... it actually looks quite impressive. As you say, however, it doesn't purport to be current, so some legwork is still left to the grunts. As a former programmer (and text munger a la Perl), it has always seemed to me that there should be a lot of opportunities to apply the tools of software development (version control in particular) to the texts of the law, but simply slurping up text into a repository is not likely to be all that helpful, and the overhead of doing anything useful would be considerable.
Isn't there a better tool than git for plain text diffs?
> We freely interchange between time_t and unsigned long in the low-level date code
As one of the candidates for the speaker of the House of commons said to me "the executive can get a way with a lot" in terms of controlling the order paper and timing
Stil think Parmjit would have made a better speaker than Bercow
I'm surprised if France and other supposedly civilized countries don't do it on behalf of the Justice Ministry or equivalent. I mean, the fundamental responsibility of citizens is to adhere to the law (ignorantia juris non excusat); the fundamental responsibility of government is to make the law available to citizens because it is not reasonable to require compliance with laws that are not practically available to citizens.
I'm in Finland, and the full content of law books has been in internet for almost 20 years, published first by the state-owned publishing house that gave out the print versions, and more recently by Ministry of Justice who has contracted the technical execution out. The database structure managing pieces of legislation dates back to 1980's, but until 1990's it was available only through a license payment.
Individual laws (and executive orders, state treaties and such) that are published by parliament or ministries have of course always been public information and published in the net since 1990's; the important thing is actually maintenance of "up-to-date" version because the parliament publishes its laws mostly as "patches" (i.e. only a changed section is reviewed, voted on, and published).
The database cross-links to published parliamentary process so that the official background work for each law, section and paragraph is available, including preparatory statements by parliamentary committees, any dissenting opinions and so on.
Also more significant precedent cases from high courts are available in database. (We have a so-called Roman law system where the code is primary source of law, unlike American/English common law where precedents are more important; nevertheless neither system is absolute of course, and precedents do matter in civil law systems as well.)
The database descriptions can be found:
Denmark: http://eur-lex.europa.eu/n-lex/info/info_dk/index_en.htm
Finland: http://eur-lex.europa.eu/n-lex/info/info_fi/index_en.htm
France: http://eur-lex.europa.eu/n-lex/info/info_de/index_en.htm
Germany: http://eur-lex.europa.eu/n-lex/info/info_de/index_en.htm
Sweden: http://eur-lex.europa.eu/n-lex/info/info_sv/index_en.htm
Please be kind in your comments.
Also, you're wrong (http://legifrance.gouv.fr/), but that's secondary relatively to the harsh tone you had there.
"But any queries may well be referred to Marie Navarro, the editor and chief researcher of Wales Legislation Online.
Like everyone in Wales, the judges use this website when they need to find out whether the law in Wales on a particular topic is different from English law.
The database is not run by the judiciary, by the Welsh Assembly Government or by one of the commercial publishers that pride themselves on keeping their subscribers up to date with English law.
It was set up in 1999 by Cardiff University Law School, and is run by Miss Navarro, a French lawyer who came to Wales on a European scholarship 13 years ago and decided to stay."
Which means - correct me if I'm wrong: "The civil code is like a part of the source code of France. And then, it should be in a source control."
And there are similar diff possibilities: https://criminocorpus.org/fr/legislation/versions/689/1/diff... :)
If you pass motion A implementing this new law the Law x and Z a deemed to be negated or changed appropriately.
https://github.com/steeve/france.code-civil/commit/b805ecf05...
Compare with what they usually look like:
A quick github search indicates that Taiwan's laws might also be there at https://github.com/victorhsieh/tw-law-corpus using the https://github.com/g0v/twlaw exporter, Japanese laws seem to have been uploaded at https://github.com/riywo/law.e-gov.go.jp but just be a crawl/dump of law.e-gov.go.jp
It's also not really new, Seb35 already did a great job on this previously as free software: - https://github.com/Seb35/CPI - https://github.com/Seb35/Archeo-Lex - http://blog.seb35.fr/billet/Arch%C3%A9o-Lex%2C-Pure-Histoire...
Also http://www.lafabriquedelaloi.fr proposes git versioning of the parliamlentary process for each bills: http://sunlightfoundation.com/blog/2014/06/25/opengov-voices...
This looks like a demo day project of Le Wagon, a french bootcamp in Paris (I found a link from their demo day https://youtu.be/hHPOV8vz5Q8?t=503 ).
Where you part of that bootcamp too ? (It seems to reuse the same "Nul n'est cense ignorer la loi." gimmick!)
One thing that is not mentioned though : will it autoupdate? And if yes, at which rate?