Wednesday, September 23, 2015

Counterfactuals, What If , Turing Machines and Oh My


"If she had said yes things would have certainly been different" - my dear readers I  caught your attention, didn't I? Well what can I say sentence like these really act like a bait to fish in public these days as attention deficit is running wild. Anyway without digressing further  into my personal romantic escaped which I may tell you totally sucks, lets jump into the subject of today's disquisition.  Look at the first question again, i can guarantee that almost everyone of us sometimes or other have pondered a hypothetical world  that differs from reality that we live in. Call it wishful thinking, fantasy , cynicism whatever you may as I welcome you to the world of "Counterfactuals".

Counterfactuals are in general  a hypothetical scenario that would have occurred had certain conditions prevailing at the given time were different. Now why is this important? It is important because it is the main foundation on the basis of which we carry out any debate that can range from policy prescription to economic decision to personal choices.  Determining the counterfactuals is essential as it helps to identify whether the decision we made had actual impact on the outcome or not, especially for assessing the situation that involves the  pre-post scenario. For instance let's say local government has introduced a scheme or awareness program for promoting girl education. Now let's say after the intervention literacy rate among girls ticked up. Now as usual politicians will tout the achievement and general public will also buy into it. But while comparing the scenario before intervention and after intervention we miss-out one crucial counterfactual and that is what would have happened if there were no intervention? Would the literacy rate have remained same or would it have been different? What would be your answer? Take a break have a Kitkat and think again for second. In general people would opine that without intervention the situation would have been same as before. But here is the catch, on doing so we may have overlooked the fact that perhaps the girl's literacy rate was already rising in the first place, that is  even before intervention started. If so then it simply implies that policy intervention had no effect what so ever instead it simply reinforced the eventual outcome.


The best example of not considering counterfactuals comes from Fredric Bastiat under celebrated phenomena that all Austrian School economist love to cite called "Broken Glass Fallacy". According to which once a ruffian kid broke the window of a baker with a brickbat. The crowd gathered and at first wanted to punish the kid. But a wise guy argued, since the kid broke the window now glazier will get the job to repair it. The money he earned will be then spent for cobbler to mend his shoe. The cobbler will then buy meat from the butcher who in turn will buy a bread from baker. So the same money that would have remained idle with baker would now circulate and make every one better off by increased wealth. In surface this appears too good to be true, but if you look at the undercurrent you'll find that had the glass window not been broken in the first place then baker might have put it in bank which would have lent out to others, thus stream rolling all the asserted economic activities. So you see breaking things to create wealth is not a good idea at all. Otherwise we should simply bomb our cities so that there will be more demand for repairs and unemployment goes down. Sounds stupid isn't it.

The question now arise is why counterfactuals invariably appears in worldly affair? Perhaps the answer is in quantum physics according to which world we live in happens because of chance. Out of infinite possibility as a result of particle wave duality there is only one reality in which we live. So there are always several possibilities and only one outcome. One may downplay impact of counterfactual like great Morpheus did in Matrix Reloaded "what happened, happened and couldn't have happened any other way" ( aside: isn't it ironic that the both Matrix sequel sucked big time and couldn't have happened any other way"). But when our decisions are forward looking that notion of ignoring counterfactuals will be a Pollyanna thinking.

Now at this point you must be thinking  if counterfactuals are something that haven't occurred at all then how to determine their effect in first place? How to properly quantify them ? Is there any standard tools to measure it? unfortunately the answer is no. Especially in research methodology there is something called Randomized Control Trial that segregates the control and intervention variable to produce ceteris paribus condition so as to isolate the effect of intervention only . But again choice of control variable itself is presumptuous putting dent to entire argument. Meanwhile perusal of any standard text book on Capital Budgeting provides you with tool such as Decision tree, What If and Scenario Analysis. These are all based on Bayesian Analysis and Prior Probabilities which entails degree of risk under certain apriori conditions. But they again miserably fail to account for counterfactuals as it is  less about risk and more of the domain of uncertainty.  Besides this of course in economics there are some concepts called Opportunity cost and Excess Profit  that do give some hope. but alas, how far do they gauge  in actuality is in itself a counterfactual.

So what else then. Some might say- "Hey let's build Ultracomputers that can crunch Yottabyte of data ( mind you that will make a Big Data a girly number) and sort out all the possible outcomes from all the possible counterfactuals". Tempting as  it may sound but it is not tenable either. The reason is something called Church Turing Thesis which says only those mathematical problem that can be solved by Turing machine is computable. But as counterfactuals generate infinite possibility it cannot be solved by Turing machine and hence is not computable at all. So no matter how fast or how large machine you built still the solutions will elude you. Of course there is possibility of it being solved using Hypercomputers but till this date as Mathematician Martin Davis asserted, it is still a technological  myth akin to elephant graveyard. Therefore with utter disappointment we have to throw towel and say we give up. There is no way we can determine all possible outcome and determine the correct path. So whatever happens, happens for good. Kind of solace isn't it? Reminds me of grape was sour adage.


Anyway to sum up if tomorrow someone asks you why are you still single or why you are so indecisive in your career, job or personal life. Just tell them you are weighing in on Counterfactuals. And if they give you puzzled look just suggest them to read this essay. I will definitely owe you one.
                                                        

Monday, August 10, 2015

Religious Freedom


14 years ago, before I dropped out of Medical school, one thing that really exasperated me during my stay in Bangladesh was being constantly asked by strangers  what my religion was even before they asked me my name. I hated the idea that my entire identity can be wrapped up into my personal faith. Now after nearly one and half decade later  it seems this vile poison of sectarian conflict and xenophobic tendency is raising its ugly head in my own motherland. Having been born into Hindu family, completing kindergarten in Buddhist school ,growing up in Muslim surrounding in Bagbazar and playing cricket with  Christian friends in the playground of Padma Kanya Campus, watching these events unfold is too painful. Who is to blame? Everyone:

a) Secularist: Irony is they don't even know what secularism is. People saying secularism means freedom of religion makes me laugh out loud. Secularism that came from French laïcité means government and legislature cannot draft any laws on the basis of religious teaching. Secularism concept came in Nepal to weaken the Monarchy and all political party gave silent nod to it. And now they are having cold feet. What you sow is so you reap. Touché!

b) Hindu fundamentalist: Hindu fundamentalist say secularism will destroy country because in future Christian missionaries will pour in money to proselytize the mass. My question is why don't you raise voice against cast system, poverty, remove the tradition that binds women. If you do that then believe me nobody is going to be cajoled out from their personal faith for money.

c) Political Correctness: There is vast majority of Nepalese who are as Nixon said Silent Majority, they are afraid to voice their opinion because of fear of political incorrectness. One thing if you don't stand for anything then you'll fall for everything. Political correctness doesn't mean morality. And this political correctness is sowing seed for the future conflict for our children's generation

d)   Politician: Do I even need to explain anything more. All they care is strengthening  their vote bank.

So whether you are secularist, agnostic, atheist, Hindu, Buddhist, Muslim, Christian, fundamentalist, traditionalist, Marxist or believer of any faith or non-faith remember we all are Nepalese first. So live and let live.  Uphold your tradition and don't let outsiders dictate how we should govern. Stoking religious fervor is the worst thing that can happen to any society . Reminds me of line from great Bhupi Serchan-
अभिशप्त घर
जब-जब बाँया र दाँया पट्टिका छिमेकीहरुले 
एक अर्काको छाना माथि ढुङा बर्साउछन,
यस घरको छानामा घाम ताप्न बसेकी बुढीको चश्मा र
कौसीमा रमिता हेरिरहेकी दुलहीका चुराहरु फुट्छन,
आधा रातमा जना छिमेकीहरुले आपसमा 
जहाबाट जे पायो त्यसैले कुटाकुट गर्छन, 
भोलीपल्ट ब्युझेर यस घरको बातको रोगी बुढाले
आफ्नो लौरी भाचिएको पाउंछ। 
यस्तो छ अभिशप्त घर
डढेलोको बीचमा उम्रेको रुख जस्तो छ यो घर।


Wednesday, July 22, 2015

Political Terms for dummies

As constitution drafting process is coming to close there seems to be lot of misconception among general public regarding the various political terminologies being used in preamble of constitution. This confusion is somehow fueled by  political parties with ulterior motive attempting to misquote everything for their own gain. Which is eventually resulting into a vitriol rather than civilized public debate . So here I try to explain few of these terms from what I have understood so far, please correct it if I am wrong:
i. लोकतन्त्र (Democracy): rule of people. Especially rule of majority. Majority can make law
ii. गणतन्त्र (Republic):  There are certain laws  that cannot be voted away by majority. Safe guards minorities. It protects the rights of the individual and doesn't matter what a majority says. FOr example: Freedom of speech.
iii. जनतन्त्र (People's republic): This is not in our constitutional draft and used in communist state. This implies rule of people has been established and hence it cannot be voted away by majority. It is extreme form of republic.
iv. धर्मनिरिपेक्षता (Secularism): This implies parliament cannot draft laws based on writing , belief or teaching  of any particular religion. In US separation of church and state is based on this. Also India is secular country but Muslim communities insist on Sharia Law. For example in Muslim countries Alcohol and Pork is banned while in Hindu state Beef is banned.
v. बहुलवाद (Pluralism): According to this any group of people, unions or lobby group not necessarily political party can have say in formation of government . For example Engineers Association, Doctors Association etc can directly participate in political process.

vi. बहुदलबाद ( multi party system): Only those political parties registered in election commission can be able to participate in political process. Other groups like association, unions or lobby group can only put  pressure indirectly.
vii. समाजबाद (socialism): Social ownership of means of production. The main agenda of government is to create a welfare state. In Nepal's draft constitution it is mentioned that Mepal will be socialism oriented country.
viii. समानुपातिक बन्द सूची (Close List): Those who will be elected from proportional voting will be decided by party after the election result. Nepal is following close list system, parties do mention all the names of potential proportional candidate but the selection will be ultimately after the election. Personally I feel this as most un-democratic aspect of our current constitution.

ix. समानुपातिक खुल्ला सूची (Open List): Contrary to close list here the parties have to declare in serial order who will be elected into the parliament when proportional threshold is crossed before election.
 x. रास्ट्रियता (Nationalism): Political belief of making nationalistic pride as main agenda. Followed by King Mahendra and Panchayaat system. Any poltical belief that contradicts with national interest will be outlawed.
xi. प्रत्यक्ष निर्बाचित कार्यकारी प्रमुख (Direct election of head of government): In this system head of government is elected by direct popular vote. This is used in France , Ireland etc but contrary to popular notion  even in US it is not practiced, as POTUS is decided by Electoral college ( That was the reason George W. Bush won against Al gore in 2000). In Nepal this was advocated by Maoist ( Direct election of president) and  UML (Direct election of Prime Minister). Both of the parties main line has abandoned this now.

xii. अप्रत्यक्ष निर्बाचित कार्यकारी प्रमुख (Westminister System):  Popular in most commonwealth country including India where Prime Minister forming a government must have majority vote of confidence in Parliament. In Nepal this model has been proposed in new constitution draft.  Nepali Congress adamantly supports this. Critiques says this will result in same old political bickering, buying selling of member of parliament  and will ultimately result in unstable government. Meanwhile proponents of this oppose direct election as it can lead to devaluation of parliament.


Friday, May 8, 2015

Road Ahead

On the aftermath of the great earthquake, Government has decided to handout 2 lakh Rs to all those who have lost their home.  Now opposition at both left Maoist and right Kamal Thapa Group is protesting that it is not enough, meanwhile our finance minister and some prominent economist like Dr. Pyakurel and Mr. Rameshwor Devkota are saying it is too big amount that can lead to loose money resulting in inflationary pressure.  I think both sides are wrong:
i) Yes 2 Lakh Rs is not enough to build one's home. Even if they build one it will be temporary shed that will not be able to withstand another earthquake. But handing out more cash is not solution as it can't be properly tracked, might be used for gambling and alcohol consumption. Last week in Sindhupalchowk me and my friends found that out first hand as many of victims were seemingly drunk. Besides the cash can be misused and may go to hand of those who are not actual victims.

ii. As for inflationary pressure argument goes that classical scholars are babbling about won't happen because the victims are not going to spend the handout to buy luxury goods. Besides the government that earmarks fund to support various welfare scheme to bulwark it's core political base arguing this time  around against giving handout to those who actually  needs welfare is downright pathetic.
So what is the way around:
a) Instead of cash handout government should rebuild the house themselves. In every wards of VDC the cheaper and earthquake tolerant house should be constructed with proper sanitation using environment friendly indigenous resources. Certainly the amount required will shoot above 2 lakh  but this will ensure that cash won't be misused.  Further this won't lead to inflation as it will be counted as government spending.
b) For the farmers who have lost their livestock a cheaper loan at zero interest should be provided.
c) An independent audit firm like big four should audit all spending to make sure that funds is not misappropriated.
 The path to rebuilding and rehabilitation is  long and weary but can be achieved only with sound strategy and not populist knee-jerk reaction. There is no way to recompense the loss but the steps henceforth should be judicial, equitable and humane.


Wednesday, April 29, 2015

Earthquake Nepal 2015 and my personal confession

Many years from now if someone would ask me what was it like experiencing the Earthquake of 2015 then I would not narrate them where I was and what I did and I would not explain how it felt. Instead I would tell them one thing and that one thing is -  "it changed me". Yes, this natural calamity changed me to my inner core. What changed me  wasn't the nerve wrecking  low humming sound of striking shock-wave which still rings my ear  nor  was it the terrifying experience of watching people running for their life and of course it wasn't the sight of death and destruction that ensued(which sounds cruel indeed. I guess I have become numbed with violence we witness everywhere ). But instead it was something more personal , something more to my heart.

All my life there is one thing that I have ever been proud of and that one thing is my devotion towards my family. Ever since my mother was diagnosed with Alzheimer's over ten years ago , I had forgone many  opportunities  and prospects just to be beside her. Over the course of time , that feeling of humbleness of taking care of her despite all the odds outgrew within me into something very  vile and  something very dark, a  feeling of moral superiority  .  In recent times I used to wear that smugness of self-righteousness on my sleeve, unabashedly like the selfie generation posing with victory symbol while doing charitable deeds.   But in one single jolt the earthquake wiped that  entire smugness off my face.

I was seating in front my laptop doing some busy work (yes, I work on Saturday as well . Isn't that pathetic?). And all of sudden I felt as if my feet were bobbing up on surface of water and not firm on ground. The tremor came with such a force that for instant you lose your entire faculty. And I knew that earthquake has struck. For a moment I thought of my mother in her bed . I couldn't decide whether to go and protect her and ensure her safety or try to run for my own life. And then I ran. I ran like a chicken that I was. And within a few seconds I was down to the ground.  After abandoning her  in third storey ,from the safety of my garden where the jasmine and rose were blooming with mellow sweetness I watched with horror how my house swayed with the tremor. And in that dreadful moment that lasted for few minutes I realized how hollow and how weak my resolve was. I felt empty, mute and impotent. It felt like eternity. Finally when it stopped I ran to top and into her room. And as usual my mother was smiling care free.  And when I saw myself in mirror I didn't see myself, but what I saw was a shell of arrogant guy struck by nature's whiplash.  I saw a broken man who abandoned someone he loved dearly in face of natural calamity. I was a just a sucker, a chickenshit who was taught  a hard lesson by nature that in this world there is no guarantees and damn there is no such thing as unwavering resolve. These crisis certainly  brings forth true color of people and sadly mine was yellow.

Now my personal lamentation in face of such crisis that has befallen over our nation is certainly  minuscule and it doesn't mean a diddly-squat. Many people have lost their lives, family, friends ,fortune and everything. This earthquake has certainly shown that it doesn't matter whether you are rich, poor, religious, agnostic, self-righteous or depraved; nature is always a great equalizer. The wound that this disaster has inflicted might heal with time but undoubtedly the scar will always remain. And this scar is a painful reminder to all of us that in life never take anything for granted. Live life right here and right now because this very moment you have can be usurped at any instant. Never think that your  job and your career  is important, what is important is how you make difference with your work and your job. Never think that earning money is important, what is more important is you didn't earned it on other's expense. Never make  your deadlines and your personal goals as your priority, they can always take back seat , what  really is important is telling your loved one how much you care. Because this moment might be lost in an instant. And for all those who survived this disaster lets extend our helping hand because our motherland really needs one.



Before this write-up bloviates into a self-loathing , boring preachy  monologue. I just want to say one thing at the end in lighter note, No matter how much advancement we have made in technology. Radio still rules.  

Saturday, April 4, 2015

Startups and Survivor Bias

Startups are sexy. There is no doubt about it. Just take a sneak peek into any of national or international business magazines and you'll see  a blurb or story about new startups  which seems to be ubiquitously mushrooming every  right and left. Everywhere you see the glossy magazines cover where smiling faces shows the new cool kids in town with their new shiny product with promise of changing the world that we live in. Just talk to your neighbors, your childhood friend or your office colleagues and you'll find each one is currently  being involved in one way or the other in  some form of startup ideas that ranges from new App that helps you to get rid of your dog fleas or an aerosol to clean your toilet. Or social entrepreneurship venture that promise to sale grandmother's chutney online or an environmental initiative to explore adventure agriculture (growing weeds). The list goes on and on. Who knows your idea might become next big thing akin to Wello or  Barefoot power or even bigger Uber someday. Who knows perhaps Peter Theil himself is watching your every move and may surprise you with lucrative Term Sheet during your next venture round.


So  the question is are these start ups really a new phenomena. Of course not.  On the contrary it is just a term representing different flavor of entrepreneurship which fueled by promising engineering graduates and smart fresh MBAs  have recently entered into what Carl Jung defines as our Collective Unconscious.   Borrowing word from Nicolas Nassim Taleb startups are indeed a black swan or a form of Schumpeterian creative destruction that drives the wedge on status quo. They put innovation into driving seat and is a leading barometer of changing products and taste

However, this startup culture whether good or bad has undoubtedly done one thing and that is create a dilemma, something right out of Shakespearian soliloquy "To be or not to be" . A question that seem to plague everyone - should they give up everything they are doing right now and jump into startup bandwagon? Will it be more fun and more productive? Will they make more money and have bigger impact on society?    Honestly there is no clear cut answer to this. Everyone has their one view. Meanwhile, having been involved in three startups during past ten years under different capacity from software developer to solution architect to CTO,   I personally would say   "Good Luck" (Aside Note : All three had been utter failure otherwise you would have been reading my success story in Quora rather than my own lamentation in my personal blog page).  And yes luck is the huge factor. For any startup to succeed you should have right product, at right time at right place. Otherwise no matter how smart or innovative your product is at the end of the day  you will be swimming in a cesspool of misery.

Now you might ask why don't we hear about this? Why aren't  any broadsheets and  magazines covering these stories of failures? Why success story only make front news?  Well the answer is  because our judgment is simply clouded by a phenomenon well known in statistics called Survivor Bias. In terms of pure math it is blandly defined as the difference between  average risk associated with  success rate  and the average risk of all ventures.  And as usual, my dear readers, math again fails miserably to put things into a lucid  human perspective. So let me explain it by paraphrasing one famous anecdote. The story goes like this:

During the time of second world war, a certain Navy general was worried about the bombers getting hit by an anti-aircraft artillery gun. So he convened a study for proper armoring of all aircraft. The Center of Naval Analysis then summoned statistician Abraham Wald to inspect all the carriers that returned from mission with bullet holes and asked for his expert opinion.  Most of the planes were hit in the propellers and wings and very few in body. Apparently navy was planning to armor the wings and propellers and overlook the body part. But to everyone's utter surprise Mr. Wald recommended that body be  better armored than the wings and propellers. And his explanation was this, since they were simply inspecting only the planes that had returned safely meaning those planes that were hit on body were likely have never returned and lost in Atlantic. This means the planes had more likelihood to withstand the shots to  wings and propellers while their body was highly vulnerable Therefore upon Mr wald 's recommendation, which though sounded counter intuitive, Navy decided to reinforce the armor on those part of plane which were unscathed upon the return from their mission."

This anecdote thud describe what survivor bias does to our world view. We have this cognitive dissonance of looking at only success side or surviving side and not the failure side at all. And this rule applies for startup as well. For every Facebook there will be hi5 and For every What's app there will be Kincast. So before you take a leap of faith on any startup don't forget to learn lesson from the previous failures. Because believe me when your startup fails it is as painful as losing your own child.



Sunday, February 22, 2015

Dot

Look towards  the horizon
there you'll see a dot
where our vision meets
reminding us that

someday
despite our prejudices
despite our differences
despite our indifference
we will be together

someday
despite our  aspirations
despite our  frailties
despite our faith
we will join the hand

someday
despite our fear
despite our  frustrations
despite our disappointments
we will claim the paradise

hope to see you
at the dot

Friday, January 30, 2015

4 'T' of marketing. A musing on Four letters



I am not a marketing guy. For me it is purely a voodoo science like an ancient alchemy trying to convert Philosopher stone into a gold. Sight of customer scares me. To explain to them all the nitty gritty things about product or getting their feedback is a nightmare. In my almost ten years of experience in software development I hardly entertained  a call with client. If I had to, I would always make an alibi to somehow put it off. And believe me those few instance that simply couldn't be obviated,  had been so bad its even hard to put  it into words. Trying to balance two contradictory forces of maintaining good veneer  all the while temper rising underneath is akin to unstoppable force hitting immovable object. In the hindsight I am glad that I kept that zen mystic going throughout otherwise the entire meeting might have dissolved into a brawl for all.

 My first foray into the subject was much maligned. During my  MBA course the portion of 4P- Price Product , Place and Promotion as the fundamental tenet for entire marketing  was pedantic and boring, that I was completely sure that I would flunk it. The only thing I knew about marketing then was advertisement. Like Marlboro man lighting the cigarette or in Mad Men episode Don Draper giving that demo of wheel and using all that nostalgia as theme. You can check it out on Youtube, the best marketing pitch you'll ever see.

But coming back to marketing before even digesting the topic I was thrown into another curve ball with 4C- Customer, Cost, Convenience and Communication. Though seemingly same thing they have subtle difference with 4C main emphasis on Customer rather than market. Then I remembered the age old adage- "Customer is God". That made lot of sense. But what if God is an idiot. How is one going to market that situation? Something puzzling. Perhaps one should ask late Steve Jobs. Apparently his turtle neck sweater sure did know how to create that itch in the back of customer for them to be lured into a honey trap.  

And of course as I was wading through 4C all the while scouring the net, with grim countenance I learned that some wise marketing  guru has come up with 4V - Validity, Value, Venue and Vogue. The whole idea was to put what customer actually values as center  of focus rather than product or services. Pretty smart. Why didn't anyone think about it before. Seems apparent enough. And as I was pondering and going through reddit forum suddenly my eyes fail upon 4E of marketing - namely Experience, Exchange, Evangelism and Everyplace. Something that propped up from teaching of Jerome McCarthy (Note no connection what so ever with Joseph  McCarthy) regarding inbound marketing. Believe me at this point I seriously wanted to imitate that protagonist of Edward Munch "Scream" and made wailing cry on top of bridge. But alas I was sitting in my room in front of my laptop and that would certainly wake up my dog, which was the last thing I wanted to do.

Then all of sudden a epiphany like jolt of thunder hit me. Hey why don't coin your own 4 alphabet that describes marketing. Sounds cool enough. But is there anything left that Michael Porter and et hasn't unearthed yet. But still it was an adventure right. So there I was sitting in front of my laptop and juxtaposing some invalid thoughts and like waving Magic Wanda came 4T which goes like this -Trust, Traction, Technology and Trend.


a) Trust: If people trust your service or product then they will buy it no matter what. It's the best bait and nothing can beat it

b) Traction: You don't want a onetime customer. You want your customer to be a milk cow that you can milk every day. Success of your business certainly depends on returning customer. If you don't have that traction then you are nothing but a street peddler.

c) Technology: Do I need to say more about this? It is a buzz word. Attach technology to anything and it becomes cool. I wonder why they haven't come up with the word called Political Technology yet. Anyway use technology to innovate your product. It does not need to be big but simply out of box and you'll discover that sales are up and costs are down

d) Trend: You don't have to be Karl Lagerfeld to define trend. Trend is something hip. It's like selling same old garbage in shiny new wrapper. Only trick is making people think it's something out of this world that they simply can't ignore it.  I remember few years back I told a offshore developer to contact me in hotmail and she said that is so 2000.  You don't want to be that. Key is your product should be something that people talk about. At the end it is all show business.

Anyway this disquisition is getting kind of long. Who knows 4T might also catch up and become more trendy.  Believe me that's my own marketing ploy.