Saturday, October 19, 2013

Democracy 2.0

"No one pretends that democracy is perfect or all-wise. Indeed, it has been said that democracy is the worst form of government except all those other forms that have been tried from time to time." Winston Churchill was the luminary that said those lines. It's often used in most, if not all arguments for starting a discussion on why it should be the way this world is governed. The point at which I disagree with those discussions is that there isn't a better alternative, and I'll try here to propose a better option, Democracy 2.0 so to say. I'll also offer the disclaimer that I have no professional knowledge or training about government, so this could in all likelihood be the delusional rantings of a person who thinks he knows the answer. So, there, that was your pinch of salt.

I am the citizen of the world's largest democracy, and currently live in the world's most watched democracy. The denizens of both countries are almost always up for spirited debates about it, because these countries have had it for long enough to have a few generations who have seen no other form of government. But, the unfortunate fact is that major change in its formulation seem to be almost absent. To put it in perspective, if Apple were to not release a new iOS for 300 years, how would that feel like? Cause the last two were pretty good in my opinion (Yes, android was pretty good too, this not *that* discussion).

I always maintain that computer science has a lot to offer the world in a purely theoretical sense. The basic principles from the world and CS always have a reasonable mapping. So, lets begin. The biggest problem that's faced in democratic governments these days seem to be the representatives themselves. Voting is a pretty good way of electing representatives, but the people who formulated the idea never considered that elections could be such an industry. Don't believe me? look up the spending numbers for the last US presidential elections, and you'll see what I mean. Money is a great motivator, and money usually seems to grease the huge moving parts of the two democracies I mentioned. USA has lobbyists, who spend billions to get their pet projects approved, laws passed, and by implication, get supportive representatives elected. In a computational paradigm, this translates representatives into programs whose veracity can't be trusted, cause there are external elements which can affect their responses. There are some excellent solutions in CS for resolving these, but the problem here can be that large masses of programs can be compromised. So, a challenge based method seems to be a pretty good approach. Each program justifies its response, and that justification is noted along with the response.

Before closing that discussion, let me open a slightly different, but related chapter, making laws. It's become a massive undertaking to make even one law, or pass any other bill. In the CS paradigm, whenever you try to add a feature, a discussion about its impact etc. is a pivotal part of the design process. Then a description doc is written which describes not only the choices made for the features, by also why those choices were made. The careful reader will note that this reduces the chances of arguments like "This is clearly what the authors (founders) of so-and-so intended", because they write down what they intended to begin with. In addition, write down the assumptions behind the reasons as well. What all this implies is that you make a coherent argument about why you're doing what you're doing, and this argument must be complete. So, in the future someone can't come along and say that so-and-so were against A because they never mentioned it. Well, maybe A wasn't considered a possibility then. An example, maybe the founders of the constitution never thought about gay marriage because it wasn't a well known possibility back then, and that they knew if they even discussed it, the people who this constitution was intended to be for, would never accept it no matter what that the end result of that discussion was. This argument extends to a lot more contentious issues too. But carrying on, the other part of the design process is the bug-fixing stage, when the end users who are actually going to use your feature note the issues and problems with the feature. Then, a small group of core decision makers try to develop fixes for it, and implement those to the satisfaction of the end users. The fixes don't go back to a huge committee, just the small group whose business it is to get the product working - the authors of the law in this case. Changing the API isn't an option here, only fixing and clearing what the API is supposed to be doing, and make minor corrections if there were issues. If there are major issues, this team is usually fired, because they didn't do a good job of designing the API to begin with. Ok, if not fired immediately, then at least placed on probation.

Interestingly enough, periodically, the upper leadership in a software company changes, and major re-organizations aka re-orgs happen. Groups are fractured and shunted around, priorities are reassessed, and things are modified appropriately. Sounds a lot like elections doesn't it? More interestingly, debates in companies - software or otherwise - are usually resolved in a very dictator-like fashion. Steve Jobs was famous for this, and look what that brought this world. But this is dictatorship with a difference, the person at the top can't make arbitrary decisions, there's a board that controls his/her fate and can throw him/her out if bad decisions are made. More importantly, it usually helps if neither choice came from the person at the top to begin with, but that probably never happens.

One more increasingly important issue in software design is security. There're entire armies of people devoted to making sure your code is secure, and doesn't allow random hackers to put up pictures of genitalia on your front page. Which means that every bit of code is stress tested, and automated and manual processes check the code for loopholes. If any are found, they're sealed and fixed by that bug fixing process I described earlier. I don't see why this can't be done for laws too, laws these days are almost designed to have loopholes. Worse yet, lawyers are paid millions to find them. When smart people on wall street found loopholes in laws and made profits at the cost of others, we vilified them and wanted to persecute them. Yet, lawyers who do the same with actual laws usually escape such scrutiny, the same for the people who formulated the laws themselves. Now consider this, if a law was written with the intentions of the makers, plugging these holes would be a lot easier, because anyone could tell where the theory and implementation of that intention diverged giving rise to the bug.

Another interesting aspect is modularity. This has gained popularity recently. What it means that each component of a program works in relative isolation so breaking one module doesn't break the rest of the program. Most of your operating systems follow this philosophy, which has made computing much more secure in general. A democratic government was initially designed with this principle, but it's become polluted in practice. Just because one branch of the govt. cant make a decision doesn't mean every other branch should grind to a halt, that makes for poor design, and any software architect will tell you that. Interestingly, there's even work on how to make a decision when a module can't rely on others to be secure. But it's far too complicated for me to understand and explain here, so read it up if you want to. I promise that it's bloody cool work. The one thing I pride above all else about India is its judicial system. Judges aren't elected by everyone, and the judiciary, though slow, works in relative isolation. To this day, the Supreme Court's decisions are respected by most. They're respected in USA too, in spite of the oddity that each judge seems to be qualified with a political leaning. But the one singular fact is that these people have devoted their lives to understanding the law and what should denote fair judgement. They've proven their credentials to be at par with the very people who formulated the first laws, and so they should be allowed to operate outside the boundaries set forth in those first laws, *if and only if* the underlying assumptions on which that law was based on have changed. And trust me, even 50 years is a long time for those assumptions to hold.

What I'm trying to say here most of all is that one proven aspect from history is that when a government fails to keep up with the changes in society, the repercussions are severe. The simple solution CS can offer is that government keep changing slowly, improving all the time, so such upheavals are unnecessary. If for no other reason, it should be done because sudden changes are horrible for the people who live through it. At the end of it all, it comes down to trust, because the people who usually revolt have lost faith in the people who govern them. Finding a solution that fits so many diverse people is hard, so it's about time we use the mathematics and logic we're taught to use some rigor in the way we're governed as well. So that we can slowly progress to a government that remains by the people, of the people, and for the people - all of them, however they might be.