Wednesday, March 4, 2015


Look left, look right
Come what might
Be it day or night
Commit no slight

Be strong, yet nice
And nurture no vice
Find a cause, devote his life
Find a good woman, make her his wife

These are but a few tenets of being a man
To be good not cause you must, 
But because you can
But what to do when these rules took hold
And he learnt the story untold

He learned of people who don't
They can, they must, but simply won't 
And he realized, 
All he knew to do, was give them a look
There is no mention of any more, in this book

Black and white, he had learned to see
But this was the middle, as grey as can be
Dive in you must, to set them free
But they whispered back, so did we

And he began to see up and down
And up sprouted a whole new town
Where he thought he was the knight
But turned out to be the clown

The rules had changed, the book was old
That way of life was pawned and sold
Yes, things were simpler up on that moral perch
But this world warranted a whole new search

There were good things in this world
That the book never saw
They brought to life such beauty, that filled him with awe
The world wasn't just black, white, or grey
Nor were there devils, looking for his soul to prey

They just wanted to be left alone
To love and live
They never wanted that present
The knight sought to give

He searched far and wide, hoping for succor
To find even one
Of all the answers he sought, yet found none 

And so he trudged on, hoping for once to write
Of his search, of his plight
The book of colors, of this world so new
With questions so many, but answers so few

But as the seasons changed, from spring to fall
He yet searched for the meaning of it all
But it did not yet rule his life
And without so looking, even found a wife

As he looked back an old man
At how far he traveled, how fast he ran
He remembered the old home he once came from
It brought back a few smiles and even a frown
He would forever be that man from out of town

It wasn't the end he once wished
He touched some lives, yet some he missed
But to an extent, followed the book he had

                                                                     --- Me

Monday, March 31, 2014

Albert Pinto Ko Gussa Kyoon Aata Hai

I've been pretty pissed off about the political climate in India of late, and the kinds of things going on, especially on Facebook. My apologies for the misuse of the title.

If you're not aware of what's going on in India these days, it's the circus that comes along every few years. The Lok Sabha elections, which eventually elects the Prime Minister of India. The two, or should I say three leading candidates are all deeply flawed. There's yet a group which is angry about this very fact, that we're looking directly at PM candidates, cause India isn't a presidential democracy. I'll get to why I'm pissed with that group a little later.

First, the candidates, the Congress finally has it's scion Rahul Gandhi up and running, the BJP has Narendra Modi of Gujarat fame, and somehow, almost in a delusional fashion, we have Arvind Kejriwal. Lets look at them in order, Mr. Gandhi, who's now better known as a meme after his all too infamous interview, cannot honestly hope to win. After answering questions from probably a parallel universe, no sane or well educated person would want to vote for him. This is fairly shameful, as he comes from a long line of very successful politicians, all of whom were intelligent enough to hold their own in the political arena. Intelligence seems to have its roots in genes, and Sonia Gandhi has proven her intelligence time and again, let alone the rest of the Gandhi clan. So how he was so much at loss in a scheduled interview is beyond me. After that, how can anyone want to hand over the reins of a country to him.

Mr. Modi owes his fortunes and misfortunes to Gujarat. To some it seems like I support him, but quite frankly that isn't the case. My knowledge of economics isn't that deep that I can comment on the development that has happened in Gujarat and how much that's his doing. But, having been to parts of it, I can say that the people of the state have a bigger claim to that than any leader. It may be a stereotype, but they really do have business sense. I've never seen a state in India that is cleaner, more organized, and safe for women. Now since I haven't seen Gujarat pre-Modi, I don't know how much of that is thanks to his leadership, but I doubt anyone can attribute human nature to a leader. As for the infamous riots, the plot is a little more complicated. The courts exonerated him, but the specter of those riots have never left him. I can't comment on his guilt, that's for courts and people wiser than me to decide. What I can say though, is that they happened on his watch, and I've seen people resign for less. If he is guilty, then sure I can go along with the moral argument of why he should not be PM. More so however, people in politics are built on perception, and I do buy that argument that whenever he does go abroad to represent India, the defining factor won't be his successes in development, it'll always be those riots.

This may be abrupt, but let me turn to Mr. Kejriwal, cause he's the one who annoys me the most. Why, you may ask. Well, quite simply, all he's doing is throwing a spanner in the works. He, and his party for most part, seem to love a revolution, they're just not sure what they're going to do if they succeed. Yes, that line is supposed to remind you of the Joker's line from the Dark Knight, where he says "I'm like a dog chasing card, I wouldn't know what to do if I caught one" ( Because some of you are probably foaming at the mouth by now, let me explain why. The two main points that AAP wants to bring about that I've understood are, rooting out corruption and decentralizing the power of the government. Honorable intentions at heart, but very half baked executions. Their model of corruption removal seems to think that corrupt people are somehow separated from regular people. That the aam aadmi is somehow not corrupt. No offense, I've met very few such aam aadmis in a country of more than a billion people. Extrapolating statistically, I don't think we can find enough such people to run the country. And furthermore, simply being honest doesn't make you qualified to run anything. Stupidly, let me borrow a line from the West Wing, where a Nobel prize winning president says that fixing any problem requires a combination of efforts, not going all out in a particular direction. Anyone who has any experience with natural systems will be able to tell you that the way mother nature does it is pretty much the same. Redundancy is the name of the game. If you want to remove corruption, remove the things that lead to corruption. But first, rid yourself of the naive notion that any system can be completely corruption free. Corruption is a natural implication of a system with insufficient resources for the number of people -- everyone will want to steal cause there isn't enough for everyone. It's a part of human nature, all that we can do, is make it an option with a high opportunity cost. Not just by prosecuting corruption, but also weeding it out from our day-to-day behavior. Don't slip a 50 to the cop who stopped you, go pay that ticket. Don't misuse that company car for personal things. Don't cut the line or jostle, follow order. Because those more visible forms of corruption arise from them. Reducing power tariffs and giving people freebies is just populist politics, something that other parties have been doing for ages.

I think I lost track there, went on a bit of a rant, so let me come back to the second point, decentralization. The core tenet of the idea of swaraj is very appealing, to return the power to the disenfranchised masses and let them decide how to spend that money. Let me ask you this simple question, in such a model, how can you get the IITs which educated Mr. Kejriwal, how can you get the Bhakra Nangal Dam, the Indian space program, the amazing railway network and roads that India has? Distributed decision making makes sense for certain projects, but not as a general rule. Economies of scale are important for growth. As for decentralization, there have been projects for a long time in that direction, which have slowly divested some power to local councils and gram sabhas. Being impatient with that just because the current system doesn't correspond to an ideal is again naive. No system is perfect, so when you advocate revolutionary transition from a model that somewhat works, you better be sure that your alternative will work better. Cause anything else leads to anarchy, and ironically, more corruption. As I've said numerous times before, this is governance, not kindergarten, learning on the job isn't an option at this scale.

So there you have it, three candidates, all of whom are deeply flawed in their own different ways. I wouldn't want to vote for either of them. If you twisted my arm, and flew me back to India to vote, I'd probably be in favor of Modi, cause at least he has an established track record for governing.

As for the people who're unhappy that we're getting closer to an American model where leading candidates are making themselves known, and crying themselves hoarse about how India's democracy was designed differently and a Presidential model has serious pitfalls, take a moment. No one is transitioning India to a Presidential model just yet. Moreover, just because we understand two models of democracy doesn't mean a new better model can't evolve. Because the people who designed these two models did it to the best of their knowledge at that time. People seem to forget that times change, and given different conditions, those very same smart people might have made different decisions -- that's what made them intelligent to begin with. So using the argument that someone decades or centuries ago did something and following that by rote is something I don't understand. Instead I advocate trying to understand why they made the decisions they made and how those were driven by the prevailing conditions, so that we can understand if any of those have changed, and if we may need to rethink their ideas. Cause it's not like we don't make intelligent people anymore, we probably just don't elect them to office as much, and don't give them the freedom to make lasting change. 

Monday, February 10, 2014


I've been reading the Divergent series of books these past few days. Yes they're  probably written for teenage girls, and probably have major elements lifted from others, but it's a nice story, and I'd recommend reading it. There are a few things in there I'll probably write about in a while. But, In the meantime I found a nice excerpt from the end of the third book Allegiant, that I felt was worth sharing:

“There are so many ways to be brave in this world. Sometimes bravery involves laying down your life for something bigger than yourself, or for someone else. Sometimes it involves giving up everything you have ever known, or everyone you have ever loved, for the sake of something greater.

But sometimes it doesn't.

Sometimes it is nothing more than gritting your teeth through pain, and the work of every day, the slow walk toward a better life.

That is the sort of bravery I must have now.”

Sunday, January 5, 2014

A skeptical aam aadmi

I am what most people might call a skeptic (with the grand exception of technology, where I seem to be an early adopter of most things), but I like to keep an open mind for new things, provided they give a good argument in their favor. Quite simply because doing anything new is hard, so some leeway should be granted. It's illustrative to think of this as the hump:
Yep this one, no pun intended
I was lucky enough to find a pic that illustrates the phases too! I maintain the most interesting things happen in phase 2, cause honeymoons are fun and easy (or so I've heard...). Humps are hard, because going up slopes is hard. That may sound like an obvious fact, but that's the reason trails take a long route up, mountain roads have bends, and you have to take a few degrees to get to active research. And quite simply, there is no easy way across the hump and anyone who promises you such a way is most likely a liar (think diet pills and their no-exercise-weight-loss promises). This is an accepted fact in sciences, barring quantum tunneling. Lets leave that out for the time being, cause I won't be talking about quantum things here. The jump I'm claiming here is that most real world challenges also fall somewhere along this curve. People spend years making slow, creeping progress towards a solution, building momentum. And when you hit the peak, you know that the trend has reversed and you'll see a sudden flood of progress. I'd postulate that gay rights in USA are approaching that peak. Why? Cause simply put, it's a battle for minds, as soon as you have a critical mass of people believing in your solution, you have the majority and the majority can convert others much more quickly.

This is where I'll pivot to the point I want to discuss. The AAP (Aam Aadmi Party for the uninitiated), is offering a panacea to the problem of corrupt governance. Their manifesto has a definite socialist tilt, but they claim to have solution that works. So yay, we're at the peak of the hump. A lot of their supporters say this is why they must be given more leeway than other parties. I'm willing to accept that to a limit, but there seems to be a general misunderstanding of what it means to be near a peak. To get near this peak, a large number of people have devoted their lives and effort. In this case, quite literally lives have been lost to highlight corruption and try to steer the country away from it. So when someone claims to be capable of crossing the hump, they carry the wishes and dreams of a lot of people past and present. Secondly - and this is the part I see gross ignorance of - they're near the peak, not past it. A mistake here has the potential to start an avalanche of momentum away from the desired outcome. Why, you might ask, cause future governments can point to their failure to shoot down progress. If you want examples, just look at the current problems the Obama administration is facing from mistakes in the healthcare rollout.

The two arguments that might detract from me having any say in this are that I'm technically not an aam aadmi, and that I'm not even in Delhi right now. Yes, I've used a good combination of luck and hard work to get where I am, so I might not be like most of the middle class AAP represents, but I'm still there, and I've lived through the spectrum, through my experiences and my family's. As to the fact I'm not in Delhi right now, well, that gives me some objectivity simply from being outside the problem I'm supposed to be looking at (I spent a whole post discussing that, so look it up :) )

So finally, here is the primary thing I'm skeptical about: Why dole out the results you expect to come down the line? I'm inclined to believe there is corruption in power and water distribution, but why not let those inquiries complete with actual facts. I don't care where you studied, IIT included, because most IITians themselves will say it's dangerous to assume that your predictions will always be correct. Even experts fail periodically, and you're still new to this game. This is where that danger of rolling backwards comes into play. A mistake here will reverse the momentum in the blink of an eye. The same parties AAP accuses of favoritism and corruption will come back and point fingers, destroying their hard-earned credibility. Because, unlike some who feel this is a victory, I think this is just the beginning of the test, one in which they have to ace every question to be successful. Doing that requires slow prudence and maturity, not rushed populism.

Even now, negative articles are propping up about Kejriwal and his perceived heavy-handedness in matters. How raising questions and pointing out possible flaws seems to be anathema. There's only so long (that honeymoon period), that AAP can hide behind the label of being new. After a point they'll have to start answering questions, biggest of which is how they intend to pay for what they've already given away. Because no matter how corrupt the previous government was, in the decade or so Sheila Dikshit was CM, I saw the power situation improve, pollution go down, and transportation improve by leaps and bounds. When I was a kid, the word "blueline" warranted terror similar to Gabbar Singh. People knew what "folding cots" were, cause we slept on them a lot of times thanks to there being no power. Pollution was so bad that smog was a daily occurrence. Thanks to, in spite of, or independent of, the Congress government, power cuts went down, buses became better and safer, a metro was finally built, and pollution is going down thanks to CNG. Those are achievements, big ones at that. Delhi still has problems, and almost all of them can be traced back to the massive influx of people it sees everyday. I once sat through a lecture (by an expert on the topic, mind you) on how you can't possibly plan for such an influx because there aren't enough resources. And now AAP, which doesn't have so many experts, is claiming it can. I'm not inclined to believe them unless they offer hard proof. And they seem to be on their way to delivering that, with audits of power companies etc. Instead of fast-tracking these audits, they went on a promise making spree. Temporary as these promises might be, taking something away is always exponentially harder. Remember when reservations were only meant to last for a few years?

If it was unclear from the last para, what I'm trying to say is that governance is built on hard-won victories, not shoot-from-the-hip promises which play to the masses. AAP had the potential to do the former, and still does, but they seem to be going for the latter, which is what disturbs me. Because while you're focused on this particular hump, don't forget the other hump, the one of dictatorship. If you're confused, read about Herr Hitler's rise to power.

ps: I know some of you are going to lose it about the last line, so let me clarify that I don't think AAP is going to become the next National Socialist German Workers Party, only that small missteps have the potential to have big repercussions. Because the steps from National Socialist to Nazi aren't that many if we follow anything like mindless drones without asking questions to the contrary. 

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


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.