Hacker Newsnew | past | comments | ask | show | jobs | submitlogin
All 104 amendments to the Constitution of India as Git commits (github.com/prince-mishra)
255 points by mishraprince on Jan 24, 2021 | hide | past | favorite | 88 comments


I always love these sort of things. Here's the same for the US constitution: https://github.com/JesseKPhillips/USA-Constitution

As a bonus, this one attempted to backdate the commits in a cyphered way (git dates are unix timestamps so the author needed to get clever to do anything before t=0 in 1970).


I did think about having correct dates and authors, but then I got lazy and in fact got more focussed on getting all the amendments in place. Now that the core work is done, I'll add corrected dates (perhaps real date + 100 years), authors and committers in one of the later commits. Thanks for reminding!


> I did think about having correct dates and authors, but then I got lazy and in fact got more focussed on getting all the amendments in place. Now that the core work is done, I'll add corrected dates (perhaps real date + 100 years), authors and committers in one of the later commits. Thanks for reminding!

How would you even do authorship? These amendments are basically institutional works, with sometimes convoluted histories (e.g. https://en.wikipedia.org/wiki/Twenty-seventh_Amendment_to_th...).


GP is the person who submitted this story, so I assume they're talking about the Indian Constitution, not the US one. It's possible that their legal system attributes authorship more directly than the US does.


> git dates are unix timestamps so the author needed to get clever to do anything before t=0 in 1970

More specifically, git dates are unsigned timestamps with an epoch in common with Unix timestamps.

The big difference is that Unix timestamps are signed and have no problem whatsoever backdating to 1776.


> git dates are unsigned timestamps

You are thinking of the in-memory representation of the (main) implementation, not the git format itself.

The on-disk/wire format is text representation, encoded in decimal. You can add a minus sign in front of it, git won't crash when parsing it. The implementation will, however, display the wrong date on git log, but it's a bug that git developers are working on.

For example (coincidentally, it is also a constitution):

    $ git init
    $ curl https://archive.softwareheritage.org/api/1/vault/revision/5e8f80061263d818ae3fc6c8d2086b5278f271ea/gitfast/raw/ | gunzip | git fast-import > /dev/null
    $ git show 5e8f80061263d818ae3fc6c8d2086b5278f271e | grep Date
    Date:   Thu Jan 1 00:00:00 1970 +0000
    $ git cat-file -p 5e8f80061263d818ae3fc6c8d2086b5278f271e | grep author
    author State Constitutional Conventions <> -5706313200 -0455


I wouldn't say "no problem whatsoever." Lots of things encode Unix time as a 32 bit signed integer, which can't date back further than 1901.

Any fixed-with type is going to have a lower- and upper-bound; whether it has a sign or not doesn't change that.

If git was trying to choose a bound for a 32 bit timestamp, I think 1970 is a reasonable starting point; doubling your future space is more important than covering space in the past. If it's 64-bit, though, then it's kind of silly to not just envelop the entirety of human history with all the room you've got (as a 64 bit signed integer with 0=year 1970 does).


It should not be hard to do the same to this one, given that the constitution of india came into effect on 26th january 1950.


I wonder how difficult it would be to show the evolution of US jurisprudence via court ruling precedents.


The commit messages to amendments are a missed opportunity here.


This is very cool. Diff for 42nd Ammendment which was used to impose emergency https://github.com/prince-mishra/the-constitution-of-india/c...


Especially look at the restrictions on courts!


I did Ctrl+F for "speech" and "press" and did not find anything in https://github.com/prince-mishra/the-constitution-of-india/c...


oh, I meant "courts" not press. Let me correct the comment.

I was especially referring to https://github.com/prince-mishra/the-constitution-of-india/c...

This amendment to Article 368 essentially gave the legislature unrestricted power to amend the constitution without fear of a judicial review.


There is no judicial review for amendments to the US constitution either. In the US the job of the courts are to interpret and apply the constitution. It's not their role to write it or constrain the writing of it.


The Supreme Court can and does severely constrain or expand what the writing is interpreted to actually apply to - you see this all the time around 1st, 2nd, 5th, 10th US amendments. In theory, a whole amendment could be neutered or nuked that way.


No, that's not how it works. The 1st, 2nd, etc. Amendments are reinterpreted, but they are never done away with unless another amendment modifies or nullifies it. Laws that are not part of the constution on the other hand are nullified by the courts relatively frequently.


In theory, but in practice that is more of an accepted convention than a hard rule and dependent on the willingness of the other branches to rein it in. As the sole arbiter of what is and is not constitutional, including how to read and interpret existing language - they can do what they can get away with.

For instance, the text of the 10th Amendment makes it pretty clear that the original intent was that states were sovereign except for those powers explicitly carved out to the Federal gov't - "The powers not delegated to the United States by the Constitution, nor prohibited by it to the States, are reserved to the States respectively, or to the people."

[https://en.wikipedia.org/wiki/Tenth_Amendment_to_the_United_...]

Since WW2 (and a bit before that, including rulings 'reinterpreting' the commerce clause to cover things like growing wheat on your own land for your own consumption within an individual state to assist the Executive in enforcing price controls over the economy), the supreme court has ruled that essentially Congress can regulate anything it wants, city, state and federal level. This is how we've ended up with things like federal laws against possession of drugs (even in states that have them legalized), federal laws regulating firearms (including possession of ones that are legalized in the state), federal laws on computer crimes, etc.

If that isn't a radical shift and expansion of an amendment (without going through a further amendment process), I don't know what is.

Similarly on the defacto removal side - 4th amendment protections and Asset Forfeiture, which allows near arbitrary and impossible to stop seizure of 'suspicious' assets has been ruled constitutional on a very flimsy basis - essentially as long as it gets rubber stamped by the courts, good to go.


I look forward to the day when constitutional amendments are pull requests.


Not just constitutional amendments, legal documents of all kinds would benefit from standard formatting and version control.

One difficult challenge is that text-line based diffs don't work well for free-form text documents. Line length, line breaks, paragraph breaks, list formatting, etc. are very ad-hoc in most legal documents.


In Italy (and I guess in many other places) laws are effectively commits, not documents/ files. The actual law is often implicit in the result of the successive modifications each new law applies to the existing ones. Which is terrible from a usability perspective- it's like working with lists of patches instead of files.

I think software engineers- thanks to much faster iteration cycles and having clarity and order as their only concern- have developed solutions and practices that absolutely can and should be applied also to the management of the law.


I think you are just describing the difference between a bill (what is debated and discussed during the legislative process), and the compendium of statutes (or regulations, etc.) that is updated via the legislative process.

My understanding is that there are always administrative departments responsible for updating and publishing the statutes based on the bills that have been passed. This is effectively applying a patch approved by the legislative process to the repository of statutes.

If you try to dig into a mainstream news story about legislative actions to the actual bill text you'll quickly find that for all but the simplest actions the bill text is useless for understanding the effect of the bill. The problem is that you need the surrounding context of the statute or regulation that is being amended in order to understand. At least for my state and the US federal legislative systems, the web based UI for understanding all this is abysmal.

The cynic in me thinks that legislators don't even understand the true nature of their own legislation. They are making voting decisions based on staff summaries, verbal discussions, media reports, constituent sentiment analysis, etc.


> that there are always administrative departments responsible for updating and publishing the statutes based on the bills that have been passed

I don't think that's the case in Italy. A bill often takes the takes the form of sequences such as "in the bill n. 1234/05 at the subparagraph 2, the word X is replaced with the word Y." There isn't, to my knowledge, a notion of "document" which the patch is applied to. You can, of course, derive the documents from the successive patches, and laws on new matters contain an entire document as a "first commit". But in software engineering it's the documents/ files you care about, patches and commits only exist as a support for change management.


Doesn't anyone take the job of publishing the derived documents, with all the changes made?

This seems like it should be done by some government department, but if it's not, still a lucrative opportunity for the private sector (surely every lawyer would buy a copy /subscribe to your service).


That is interesting. Thanks for elaborating.


This is my (basic, lay) understanding of how changes to UK law happen, as well.

For example, here is a collection of "Statement of changes in Immigration Rules: 1994 to 2020": https://www.gov.uk/government/collections/immigration-rules-...

If you click on the latest document, "accessible" version, you'll find paragraphs such as the following:

  Changes to the Introduction
  Intro1. In paragraph 6.2, after the definition of “English language course”, insert:
  “ “EU national” in Appendix T5 (Temporary Worker) International
  Agreement Worker means a person who is a national of: Austria, Belgium,
  Bulgaria, Croatia, Republic of Cyprus, Czech Republic, Denmark, Estonia,
  Finland, France, Germany, Greece, Hungary, Ireland, Italy, Latvia, Lithuania,
  Luxembourg, Malta, Netherlands, Poland, Portugal, Romania, Slovakia,
  Slovenia, Spain, or Sweden; and who is not also a British citizen.”.

  Changes to Part 7
  7.1. For the second paragraph 276BB1(vi)(d), substitute:
  “(e) the Ministry of Defence, the Foreign and Commonwealth Office, the
  Department for International Development or the Foreign, Commonwealth
  and Development Office has determined should qualify for relocation under
  the ex-gratia redundancy / resignation package, including confirmation that
  they served ‘on frontline duties outside the wire in Helmand’.”.
Anyone interpreting this law (i.e. lawyers) does not have the "latest" version to hand; they have to stack successive changes.

There are other complications, which I can't recall, but I dearly wish someone would do this for UK law.


Fascinating. Is there nothing in the UK like the US Code?

https://www.govregs.com/uscode


I did something like this for "fun" a number of years ago: https://github.com/magni-/visa-waiver-program/pull/2/files

There was a lot of media noise about this bill, and it was frustratingly difficult to figure out what it actually did.


I read once that the legal team at Github uses git commits in all their documents. Not sure where I read it. But it would be interesting to know more if it's true.


If diff is not enough, you have wdiff. :)


Helpful, but in the real-world legislative systems I've interacted with, the patch (the bill text) isn't formatted as an algorithmic diff against the base documents (statutes, for example). It is a baroque system that requires huge amounts of clerical effort to keep aligned and which makes understanding all but the simplest changes a mind-numbing exercise.


But they (almost) are! They just have a more involved review process, requiring sign offs from many more people (from a diverse group of representative stakeholders) given what’s at stake. A lot of the process/bureaucracy comes from the scale & scope of what’s being managed.


Absolutely! It would be a dream come true if Indian law-makers start doing things in the public, allowing public to comment/vet their ideas/thoughts/plans on upcoming legislations. I'm not sure if you're aware: currently the farmers in India's capital are protesting against the farm acts the Govt. introduced. The acts are supposed to do good to the farmers, but since they did not involve them, there is a lot of misinformation and protest.


India's constitution is the largest national constitution in the world, and second-largest overall, only behind Alabama's, which has a whopping 951 amendments and nearly 400,000 words as of January 2021.


Who would’ve thought that Alabama would be home to Big Gov.


It’s because it was written to oppress minorities in as many ways as possible.

> At the beginning of the 20th century, the President of the Alabama Constitutional Convention, John B. Knox,[12] stated in his inaugural address that the intention of the convention was "to establish white supremacy in this State", "within the limits imposed by the Federal Constitution"[7]

https://en.m.wikipedia.org/wiki/Constitution_of_Alabama#Raci...


Imagine all those smart people doing something else.


If it's the case shouldn't it be much simpler today?


Alabama never updated parts of their constitution to remove it as they kept losing federal court cases. It just became unenforceable.

For example their constitution still contains language for school segregation and removing voting rights for interracial marriages.

Even when they did make updates. It was in the form of amendments which increase the overall length. Eg, the amendment that lets women vote.


As a foreigner, can you explain why to me? Wouldn’t politicians score easy (and good!) points by removing those parts?


Not in Alabama. There’s a reason the federal government had to use the national guard to force Alabama to follow Brown v Board of Education and let minorities attend the state college. This was in 1963, less than 60 years ago.

It’s not like the racist people in the state suddenly stopped being racist just because the federal Government force them to change their most egregious laws.

The latest election, however, the voters did approve to start the process to investigate removing racist language from their constitution.

>in a symbolic attempt to keep his inaugural promise of "segregation now, segregation tomorrow, segregation forever" and stop the desegregation of schools, stood at the door of the auditorium to try to block the entry of two African American students: Vivian Malone and James Hood.[1]

https://en.m.wikipedia.org/wiki/Stand_in_the_Schoolhouse_Doo...

> With more than 1.7 million votes cast, the amendment passed with 67% support. That means more than 585,000 people voted against it. The ballot didn’t mention race, and some voters might not have even known what the amendment involved.

https://www.pbs.org/newshour/politics/alabama-approves-bid-t...


One more question, do you think it’s like this in every major white country or do you think US dropped the ball on this one? I’m curious about how Americans see the world. I won’t have any follow up comments, I promise.


Great effort!

I wish the files were named as Part01.txt, Part02.txt and so on to suit the default string sorting used by GitHub. The list on GitHub has Part1.txt, Part10.txt...Part19.txt, Part2.txt, and so on, which makes it a bit cumbersome to browse on that site.


Yeah, now that you pointed out, it does look ugly. I created an issue: https://github.com/prince-mishra/the-constitution-of-india/i... to track this one. I anyway plan to rewrite all commits with corrected time and author info; will be a good time to rename files as well.


Disappointed that they weren't backdated.


By backdated, do you mean correct dates for the commits? I'll add that in one of the subsequent commits: both corrected dates and authors.


Yeah, that, using the --date parameter on git-commit.


This makes me want to do ours (Ireland). We had a big referendum on an amendment a while ago, and I actually read it at last. There's some pretty dated stuff in there (the special place of the woman in the home stands out in my memory).


Here is a repo for Hungarian laws: https://github.com/badicsalex/torvenyek

The dates are accurate.


Is there something like this for the entire US Code? Laws in the US are often written to say something like "Amend Section X to say Y.", and it's very hard to follow.


I have daydreamed about the same many times and considered trying to start it myself, but it didn't take too long before realizing that the reason I'd want it is the same reason I wouldn't stand a chance at building it.

It would certainly be a wonderful resource though. Especially if it could be implemented with a "code review" style interface for showing the votes on each of the bills representing a commit.


There is a repo for the USA-Constitution: https://github.com/JesseKPhillips/USA-Constitution

I am not sure if there are any for the states.


You then also need to work out the ramifications of the change.

Eg if motion 39 amend section y to x - Therefore 9.3(iii) is removed and renumber section 9.3, these are the Consequentials and should also be included.


Actually, section numbers tend to be very stable. Thus you can get 45 USC §231n-1, which is not the same thing as 45 USC §231n, 45 USC §231(n), or 45 USC §231(n)(1) (which does not exist, incidentally).


This is how we should maintain and pass laws. To see which legislator proposed / amended which paragraph etc.

Might be interesting to see the authors of the tax law etc.


This data must exist as this is how parliamentary systems work and (MP's Senators, Congress Persons) should in theory have this data.

Might be very good to allow civilians to look at the data but it does require that you really understand your particular country does things.

Having said that the Executive can "Get away with Naughty Shit" and that's a quote from one on the MP's that lost out to John Bercow for speaker of the HOC.


Yep, that is the long term agenda of the project. Most (all?) amendments have certain socio-economic/political context which gets lost over time. Amendments (and laws in-general) are better understood when the context is well laid-out.

I'll add all such contexts to all these amendments, including who tabled the bill, how did the debates go, were there any following judicial reviews: all that data.


Every general election adds at least a few new amendments to the California constitution https://en.wikipedia.org/wiki/Constitution_of_California#Ame...

I could not easily find the comprehensive list. It has to be well over 100. This page, for instance, is only amendments with their own Wikipedia page https://en.wikipedia.org/wiki/Category:Amendments_to_the_Con...


Shouldn‘t it be one commit if they were amended? /s


An amendment in the Indian Constitution is an act/law/bill in itself. It does modify the core document (the constitution) but it has an independent existence.

In that sense, one could argue that every "amendment" is a bugfix, feature-request of sorts.

Debatable both ways.

I personally like the idea of independent commits better as the "git browse" UIs handle individual commits better.


It’s a joke about git commit --amend.


lol, I took it too seriously then. I thought it to be a reference towards squashing all amendments into one commit.


If I file a PR on it and more than half a billion Indians give it a thumbs up, does it get merged? Talk about e-voting!


Direct democracy has its problems. 50.01% voting can cause serious issues. But using tech to improve speed of policy should be a thing


> But using tech to improve speed of policy should be a thing

I’m going to push back against this. What problem are you actually solving that requires technology? Some would argue policy making should be purposefully slow and intentional to better understand the effects of said policy.


The cost of governance is enormous, there is no need to make it even more complex than it is.

There are plenty of places that have really benefited from adopting technology solutions to governance problems effectively. The transparency in processes and policy can really strengthen democracy. It is especially critical in developing economies who cannot afford non tech solutions

India itself for example has pretty robust electronic voting system for the last two decades, and is able to run it pretty securely and effectively. The cost of an election would vastlymore and be more difficult to administer without e-voting. Not mention the opportunity for localized corruption paper voting presents.

The ability to know proposed laws and regulations before and after they are passed, or ability to file your taxes easily all be of immense benefit any community.

This isn't to say that there no challenges with tech there are plenty, however the response should not be luddite and shun all of it in policy making.



This is brilliant. Thank you for doing this. Where are you sourcing the original text from ?


Till 96th amendment, I used the work done by https://github.com/captn3m0/constitution and https://github.com/anoopdixith/TheConstitutionOfIndia/

96 onwards, I downloaded the gazette notifications and applied the changes manually. I could not find any automated way.

I'll file an RTI one of these days to the Legal Department to source the Constitution as is, after every amendment. Let's see where that goes.


https://www.india.gov.in/my-government/constitution-india/co...

Pretty sure, I’ve seen it in plaintext as well on one of the government websites. I don’t remember where right now though.


Reminds me of a thing someone put together when I was Mapbox where we had each US state, in order, as a commit alongside their (IIRC) GeoJSON shape as a way of progressing through the growth of the country.


Easily the best project I've seen over last coupler of days. Will definitely follow and may be contribute, if i can


Is the official version in English? Are there authorised translations to other languages spoken in the sub continent?


Yes, the original constitution was drafted in English and the full official text of the Constitution in English, available here: https://www.india.gov.in/my-government/constitution-india/co...

However, Amendment 58 (https://github.com/prince-mishra/the-constitution-of-india/c...) made sure Hindi translations exist Hindi version here: https://www.india.gov.in/hi/my-government/constitution-india...

I am not sure about authoritative versions in any other language.


Only ''authoritative'' translation into Hindi but not for any other language from English. See 58th amendment of 1987. You may find unofficial translations though.



https://github.com/prince-mishra/the-constitution-of-india/b...

>"338B. (1) There shall be a Commission for the socially and educationally backward classes to be known as the National Commission for Backward Classes."

[...]

"(5) It shall be the duty of the Commission—

(a) to investigate and monitor all matters relating to the safeguards provided for the socially and educationally backward classes under this Constitution or under any other law for the time being in force or under any order of the Government and to evaluate the working of such safeguards;

(b) to inquire into specific complaints with respect to the deprivation of rights and safeguards of the socially and educationally backward classes;

(c) to participate and advise on the socio-economic development of the socially and educationally backward classes and to evaluate the progress of their development under the Union and any State;

(d) to present to the President, annually and at such other times as the Commission may deem fit, reports upon the working of those safeguards;

(e) to make in such reports the recommendations as to the measures that should be taken by the Union or any State for the effective implementation of those safeguards and other measures for the protection, welfare and socio-economic development of the socially and educationally backward classes; and

(f) to discharge such other functions in relation to the protection, welfare and development and advancement of the socially and educationally backward classes as the President may, subject to the provisions of any law made by Parliament, by rule specify.

[...]

"(9) The Union and every State Government shall consult the Commission on all major policy matters affecting the socially and educationally backward classes."

[...]

"340. Appointment of a Commission to investigate the conditions of backward classes.—(1) The President may by order appoint a Commission consisting of such persons as he thinks fit to investigate the conditions of socially and educationally backward classes within the territory of India and the difficulties under which they labour and to make recommendations as to the steps that should be taken by the Union or any State to remove such difficulties and to improve their condition and as to the grants that should be made for the purpose by the Union or any State and the conditions subject to which such grants should be made, and the order appointing such Commission shall define the procedure to be followed by the Commission."

[...]

342A. (1) The President may with respect to any State or Union territory, and where it is a State, after consultation with the Governor thereof, by public notification, specify the socially and educationally backward classes which shall for the purposes of this Constitution be deemed to be socially and educationally backward classes in relation to that State or Union territory, as the case may be.

(2) Parliament may by law include in or exclude from the Central List of socially and educationally backward classes specified in a notification issued under clause (1) any socially and educationally backward class, but save as aforesaid a notification issued under the said clause shall not be varied by any subsequent notification"

===

PDS: I sure as hell hope that we Americans will never be considered a "socially and educationally backward class" by India! <g>

And I sure as hell hope that the citizens of other countries -- will never be considered a "socially and educationally backward class" -- by India as well! <g>

I mean, take India's historical relationship with Pakistan, for example...

My question to the Writers of The Indian Constitution:

Are the citizens of Pakistan -- also a "socially and educationally backward class" ?

?

Because, I sure as hell hope not! <g>

By the way, here's a quick quote from (our American) Declaration Of Independence:

"We hold these truths to be self-evident, that

all men are created equal

, that they are endowed by their Creator with certain unalienable Rights, that among these are Life, Liberty and the pursuit of Happiness.--That to secure these rights, Governments are instituted among Men, deriving their just powers from the consent of the governed..."

Also, from our American Constitution (The "Equal Protection Clause"):

"No State shall make or enforce any law which shall abridge the privileges or immunities of citizens of the United States; nor shall any State deprive any person of life, liberty, or property, without due process of law;

nor deny to any person within its jurisdiction the equal protection of the laws."

See, our laws here in the U.S. are much simpler -- basically everybody is equal before the eyes of the Law...


- Constitution of India applies only in the Union of India

- The first article of the constitution defines the boundaries of the Union of India: https://github.com/prince-mishra/the-constitution-of-india/b...

- The terminology referred to as "socially and educationally backward classes" is to provide certain underprivileged sections of the society better living standards

- PART-3 (https://github.com/prince-mishra/the-constitution-of-india/b...) guarantees the Fundamental Right to Equality 14. Equality before law.—The State shall not deny to any person equality before the law or the equal protection of the laws within the territory of India.


I would like to file a pull request, remove socialism and reinstate our original freedom of speech. Unrealistic, but one can dream.


Socialism cannot be removed by pull requests, only by brute force.


Wowie.


[flagged]


Or that the body politic has a very active life, which might not be a bad thing. I don't know how the Indian constitution is amended, but typically it's the sort of activity that requires large majorities. Isn't it somewhat inspiring, that a country so big could unanimously change its basic rules so often?

Obviously there are questions of whether that unity was real or somewhat manufactured, but still, at face value it's a Good Thing. I'd rather they keep agreeing on amendments than they start disagreeing and disenfranchising from their democratic institutions.


Not really constitutions are living documents that have existed for a long time -hundreds of years for older countries like th US and UK.

Why would you not expect a lot of changes


A constitution is the high level document that your citizens agree are the foundational principles governing the state. They are a set of general points that nearly everyone can understand at that level and agree to.

They are not the minutiae and laws that govern in detail.

104 is too many principles, or at the wrong level of detail, to be at the level of a constitution for people to discuss in concept and agree to as general participants in a society.


As time passes, new things come, new challenges. For example, computer fraud, health practices, research, nuclear weapons. Each of the new law passed to address any of something like this, is known as amendment. At the same time, any changes are also known as amendments.


That's not a constitution-level change you want to be making. Those are called laws.


Not all countries are the same as the USA


Yeah, I guess if you like ethnic/religious division and a country full of chaos.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: