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. 

Monday, July 1, 2013

It's my birthday and I'll rhyme if I want to!

Another year of my life is gone
And I might be forgiven for being forlorn
I'm not the spring chicken I used to be
There are even some new leaves in my family tree

Though I'm not really tied down
I still yearn to be free
To spend my days doing stupid things that make me smile, not frown
Alas, there's still some fight left in me

And though I might now be twenty eight
So lighting those many candles might be tempting fate
And sure, any beatings or bumps I'll happily take
But know this, I remember those who plaster me with cake

I should probably end this on a cheery note
And maybe drop some interesting quote
But nothing comes to mind, it's a blank
So lets just be frank

I'm probably old enough where it's just another day
But it's still a lot of fun to cut a cake, and say yay!
So thanks everyone for wishing me and being so nice
I feel so elated, I just might have another slice

-- Me

Thursday, May 30, 2013

Why

Sometime between 6th and 9th grade, we were taught how to write notes in English class. The main questions you were supposed to answer were, Who, What, When, Where, Why. My most hated was always the 'why'. It could never really be answered in the word limit that was allowed. As the years have progressed, it's held its place as the most annoying question in my mind.

Over the years however, the complexity of this annoyance has gone up significantly, thanks in no small part to the many scenarios where this question raises its ugly head. Things like, why did that happen, why didn't that happen, why does my code not work, you get the picture. However, I'm starting to see that the worst of it all is the question, why am I doing this?

Let me give a little more perspective. Over the years, I've experienced frustration in the work setting, and seen others go through so much more, all for doing something we love. But work is like any other mistress, if it doesn't love you back, the affection starts to fade and you're left wondering why you're going through that frustration to begin with. The other, worse part has to do with the fact that I'm surrounded by very intelligent people who hold the skills and temperament to succeed at pretty much any endeavor. I like to believe I'm one of them, and it probably is true. The next part might sound patronizing or self-aggrandizing, but it really isn't, so my apologies if you're offended. The key problem when you're so intelligent that you can do anything, is the question why should you devote your efforts to that particular something. Yes, it can be seen as overconfidence, but the fact is that most people are driven by a reason. There's a reason people are willing to put in their nights and days, their sweat blood and tears for a cause. Because the simple fact is that it needs to be a cause. And the importance of the cause is proportional to the effort required. A lot of my friends, they've spent a good part of their lives studying and working pretty damn hard. Which means that the 'why' at this point needs to be pretty darn strong. This is the point where companies and business execs lose the plot. At this point, money can only do so much, family considerations and pressures a lot more. But what they (and me), truly desire, is a sense of satisfaction, or achievement, of having made a difference to this world. They want a fulfillment of that dream that was shown to them when they started college and were told they could change the world.

Much as this might seem annoying to you, people who aren't happy with how much they've achieved, the desire to achieve something in life is universal. It's the scale of desire that differs. I'm sure when Alexander would have told people he wanted to conquer the world, people would have wondered, why the hell isn't he happy with having a kingdom. Yes, I will agree that he died young, and that might suck, but the world knows who he was. There was a line in the movie Troy, when Achilles' mother tells him, that if he stays, he shall have many sons and daughters who will love him and pass on his story, but slowly his name would die out. But if he went to Troy, he would not return, but his name would live through history. He chose the latter.

I don't think all of us want that strong a cause, but scientists try to map it to the autism spectrum. How focused you are on one particular thing tends to decide how much you want from your work. That's a gross oversimplification I agree, but there is a correlation. In fact, autistic tendencies are positively correlated to success in STEM fields, simply because hard work and perseverance pays off in these fields more than others.

So in the end, the irony is that I at least know the answer to one of the why's, which is that why I must know why I do something, and that's a good beginning. Hopefully, some time before I hit 50 I'll also understand why I ended up taking the path I took.

Wednesday, April 10, 2013

Ideal and Practical Solutions

I've been busy with a deadline the past few weeks, and the hellish amount of effort, and the stuff happening in that time gave me this idea. Let me start by saying that in the world of Computer Science, there are all kinds of solutions to problems, but they usually end up being classified - rather informally - into ideal and practical solutions. For example, you can propose complicated algorithms for problems which are amazingly fast, but no one will ever implement them because they're so complicated. On the other hand, people will be more amenable to using quick and dirty solutions simply because they're easy to use. And this is something I see happening in the real world too.

The key lies in understanding that ideal solutions may not be practical, in the real world too. They make assumptions and simplifications that just don't hold up in the real world. So, we end up creating practical solutions that are close to the ideal solution, but not quite there. This is especially true of problems which are very complex, where an ideal solution requires just too much. Take equality for example. The ideal solution is to ensure there is no discrimination in any sphere of life, based on any factor. But, we all know some of these are buried very deep, either because of the way we are, or because of the environment we grew up in. Now, I've yet to see an example where training can overcome such deeply buried views. Which means that equality isn't a problem which can be practically solved within a generation, no matter what the change proposed. In fact, since how we're raised contributes significantly to this, I'll be a little stingier and claim that a few generations are needed before any proposed changes creep into the nurture process. Which means the war for equality is something that's going to yield changes over a century span, rather than, lets say, a 5 year span. Which makes it fairly disheartening for anyone fighting for it. But, it's important to understand that the temporary 'equilibrium' that we achieve during that century depends a lot on how much we strive for the ideal solution.

Let me go on a tangent for a bit and explain the law of thermodynamic equilibrium. Don't get scared of it, all I care about it in this context is that if you have two sources of temperature, the equilibrium temperature depends on both the sources. This might seem like a fairly simple thing, but it has massive implications, particularly when you're trying to do things like insulate your house for the winter, or cool it in the summer. I'll leave the technical details aside, just point out that this is why air conditioners are rated for a particular range of temperatures, if it gets too hot, they just can't work if they haven't been designed for it.

Getting back, how this tangent applies to the "real" world is that how hard activists fight for equality right now, has a direct consequence on what the temporary fix we get for it. Which is why there are so many lobbying firms that get so much money. If not for any reason, but simply to affect a temporary solution, because most people can see how things will go in the long term. The particular example I'll use here is fairly contentious, so I'll try to stick to logic and avoid getting into opinions, particularly my own.

Recently, there has been a lot of discussion about gay marriage, the equality of marriage and the whole concept of marriage as a whole. Both sides argue over the fairness of their side and how not following their view would be detrimental to the world as a whole. But, arguing over what the government considers as marriage should only begin after one looks at the history of why the government got into the business of noting who married whom. This goes back to medieval times, when there weren't really governments but lots of lords and kinds who ruled their fiefdoms. The big problem was who gets the property or any belongings of a person when they died, and how to avoid quarrels of any such sort. Ideally this was also meant to resolve matters of succession, but history is littered with examples where the powerful simply chose to overlook the laws. But, in most cases, this helped. The person who was legally married to the deceased got dibs, i.e. their offspring were legal heirs, and the others, bastards. Legal marriage was attested to by the lord or king, whoever ruled the land. Such attestation was important to prevent impostors, not just in matters of property, but also the profession. This is exactly how surnames associated with jobs arose, and sadly enough, the caste system. But clearly the original reason for a ruling body or government recognizing marriage was to ensure that the rights of the loved ones of the deceased (or living) was maintained and free from challenge by the rest of society. This idea stood the test of time, which should give it some measure of sanity, in as much it must have been developed by some leading minds of the time. Since in USA (where this discussion is taking place), the founding fathers are considered paragons of reason and virtue, it is logical to consider the people who came up with the idea of registering marriages, as smart enough. Going along the same argument, this would imply that the definition of marriage as understood by a government should be based purely on how it might help matters of protecting the rights of a person and their loved ones, particularly taxes, inheritance etc. That should imply that the government should not really care if this union is with a man, woman, or any other being or thing. As long as the person or persons referred can be transferred ownership of property without any ambiguity, the government should be perfectly fine with it.

Yes, I realize my argument implies that gay marriage should be allowed. And I do concede that it assumes the separation of church and state. But that's where my logic led me, I'd be happy to change it if someone shows me the flaw there. And if you're wondering where did the ideal v.s. practical theme go, here it is. The solution I've presented is ideal, because it's based on a dispassionate logical understanding. We as humans are not so, we have deeply ingrained prejudices which affect our decision making. Thus I don't expect gay marriage protagonists to win soon. As in I do expect they will get some legal victories soon, but a true adoption won't happen until people's prejudices are wiped out, and that's something that can't happen until the next generation. Even worse, it'll take ever longer for this idea to precipitate to other countries, cause they're a little further back on this change totem pole.

To conclude this rather long and rambling post, let me just say that the extreme protagonists on either side need to keep up their battle cries, no matter what their cause is. Cause how hard you push makes a dent, on both the short-term and long-term scales. And even if you don't see the change you want quite yet, take heart in the fact that your next generation will, thanks to your efforts. 

Tuesday, March 5, 2013

The 3am desparation


Ah sleep, why hast thou deserted me
An early-to-bed-early-to-rise types, I have the potential to be
It's all part of my grand plan, come here and see
But you're stubborn, it's 3am and I need to pee

A long time ago my parents scolded me for staying up too late
Now they're ecstatic, if I'm up at eight
Morning walks might still be pipe dreams,
But it's been a while since it wasn't lunch, but breakfast I first ate

What could I possibly have done...
...to deserve such a fate, I just had some fun
To all who ask me to sleep early, what am I, a nun?!
And I don't sleep all day, my day just begins with the setting sun

And beneath the moon I've seen some amazing sights
Taken some great pictures, and seen twinkling lights
But now people insist on calling me,
The thing that goes bump in the night

Until "Twilight" I had no problem in being called a vampire
Some vamplings, I once hoped to sire
But one more mention of glittering in sunlight,
And I'll walk out into the sun, to set myself on fire

But before I set myself ablaze,
I must rid myself of this daze
Upon the rising sun I must gaze
And see if waking up early is really as magical, as everyone says

And I must hurry, the damned idiot might tell the kids
How he found their mother, quite soon,
And I'd like to finish this PhD
So my life is no longer a sad toon
And so people stop calling me that loon
Who decided instead of taking a paying job, to work nights and stare mournfully at the moon

Imagine the limits of my desparation, that I'm using pop-culture references
I tried counting sheep, but they refused to jump the damn fences
I agree, I must be out of my senses,
But I've seen too many of my friends' thesis defenses

And now since my mental capacity is all too low
So much so, that I didn't use "pun" in the 13th, no 11th row
I must try to watch some boring TV show
To bed, I must go!

-- me