Friday, May 29, 2009

What can Aurangazeb teach MBA students?

Aurangzeb was the last Great Mughal Emperor, dying at the ripe age of 89 in 1707 AD.  Although the Mughal line would continue till 1858 AD with 11 more 'Emperors', none would ever rise to prominence.  Aurangzeb extended the Mughal domain to its greatest boundary, from Kabul till Assam, and reaching Kaveri basin in South India.   He was a brave warrior, fighting till his death many a battle, mostly successfully.

But historians generally consider Aurangzeb a failed emperor, as someone lacking a vision for the  future, who would damn the Mughal line forever.  There are many lessons from his life that can be applied to modern management practices.

At his core, Aurangzeb was a failed leader, although he won many short-term goals all his life.

Trust your partners
Aurangzeb was notoriously paranoid, not trusting his brothers, sons, ministers or even his own father.  At various stages, he imprisoned them, executed them or banished them, always viewing each as a rival power center.  This forced him to run all his campaigns as a solo champion.  From Akbar on, while no Mughal emperor had a cordial succession to power, Aurangzeb made things worse.

Lesson: Individual achievement will not lead to long-lasting organizational success, unless the leader shows trust in his deputies and takes effort to nurture each to his full potential.

Delegate and empower
Aurangzeb would not strengthen the forces even when is own son, Prince Muazzam, asked for reinforcement during the Deccan campaign, fearing his son would turn into a rebel against himself.   Not willing to delegate the responsibility, Aurangzeb would personally lead his Deccan campaign for 26 years, never again returning to North India.  He was reluctant to groom any successor even when he grew old.  When Aurangzeb passed away, there was no one with power to rule his domain effectively.

Lesson: The hallmark of a leader is his ability to create more leaders, perhaps someone who can even excel oneself.   Keeping the powers too centralized would distract the leader from working effectively.  Like his predecessors, had Aurangzeb delegated his Deccan campaign, he might have had time to consolidate his empire, saving it for his successors.  

Know when rules of the game has changed
Aurangzeb's lasting failure was against the Marathas, whom he would never subdue in spite of his dogged pursuits.  While Marathas initially had a charismatic center, Chatrapathi Shivaji, they quickly disintegrated into multiple factions, when Shivaji passed away in 1680 and his son Shambhuji was brutally tortured to death by Aurganzeb in 1689.  Marathas then took to plundering, moving in small teams for hit-and-run campaign against Mughals, with no central authority governing them.  Against these roving bands, Aurangzeb deployed his Imperial army, trying his old game plan on capturing forts on battlefield.  Even after decades of war, Aurangzeb failed to see that his Imperial Army was ineffective against the gorilla war of Marathas.  He was not a robust general to change his strategy in a fluid theater.  He never understood why he failed in his wretched Deccan campaign, dying a disillusioned old man.

Lesson: When the old and trusted strategy fails to work even after multiple attempts, it behooves the leader to dissect the situation to understand its root cause.  A leader should be agile and open-minded to think out-of-the-box, after first acknowledging the failure of his past efforts.  Not everything is a nail, simply because you have a hammer.

The perils of growing too fast
While Aurangzeb was a master empire-builder, he was a meek administrator.  His official writs were regularly ignored by his remote provincial governors.  Surprisingly, given his notoriety among historians, Aurangzeb was mild in dealing with Imperial officers for their disregard of his orders.  While Aurangzeb understood the importance of keeping his empire safe from external threats, he neglected to improve it.  Towards the end of his rule, only Bengal province under the governorship of Shayista Khan produced revenue for his central government.  Corruption and inefficiency was rampant in his administration, to his utter dismay.

Lesson:  Growth at any cost is a dangerous strategy.  Without a strong organic support to sustain the organization, expanding the organization for its own sake is bound to fail.

Address the Agency Problem

Aurangzeb's adversaries were regularly able to corrupt his forces, sometimes even his own sons,  to collude against his objectives.   In several instances, Mughal commanders simply bribed their Maratha counterparts to surrender the fort temporarily to get credit for victory - they even indulged in a bidding war among themselves.  In a particularly galling sham, Zulfiqar Khan, the Mughal commander sent to capture Rajaram in Gingee fort, simply chose to camp outside the fort to increase his importance in the Mughal court.  With his large force, Khan could have captured Gingee on the day of arrival, but he managed to drag the campaign out for 8 years, till he stormed the fort in 1698, even letting Rajaram escape.

Lesson:  As a project leader, ensure that all stake holders have a strong incentive for an orderly completion of the project.  Address the conflict of interest effectively before it manages to cripple the project.

Enjoy your work
Aurangzeb considered his role as an Emperor a sombre duty, to be executed meticulously without joy.  His self-control and simplicity in life were legendary.   His life stands in stark contrast with that of his forefathers, who regularly mixed business with pleasure.  Some of this drudgery was driven by his religious beliefs.   Aurangzeb's life became frustrating and dull and this affected his judgment towards the later part of his rule.

Lesson: Any task loses its luster, if executed mechanically.  A leader should be able to inspire his deputies to take pleasure in their work.  Quality of work suffers when the agent disconnects his heart from the work at hand.

Sunday, May 10, 2009

Holding the Programmer accountable

Currently the software industry takes great liberty in shipping buggy code to customers.  Even when the buggy software causes economic harm to the end-user, the liability of the programmer responsible for the bug is limited.  In the worst case, the programmer may lose his job, but more likely he suffers just a reprimand. The software vendor that shipped the defective product may sustain a slightly higher liability, such as a loss of the contract, or intangibles like loss of its reputation or damaged brand-name.

When a medical professional causes damage to his clients, he can be held legally liable for the suffering caused.  When a building collapses because of poor construction, we can go after the builder for reparation.   When your defective toaster causes fire, the manufacturer can be held liable.  When the car seat-belt fails to function, its maker can be hauled to the court of law.

When quality failures bankrupt other companies regularly, what makes the software vendor get away with it?  To add insult to injury, software industry routinely ships product with known bugs.  It is acceptable for a programmer to sign off her work with known defects.  The defect identified just gets added to a growing list of bugs to be fixed in the next project cycle.

Why not expose the programmer to legal liability for the damages he caused?  Will this accountability result in improved software products?  

In [CACM April 2009 - A direct path to dependable Software], Daniel Jackson gives a brief survey of software related incidents covering hospitals to medical instruments, and talks about software companies actively suppressing even basic data on the number and severity of bugs in their products.  Can a civilized society accept such practices in any industry, leave alone one as crucial as software development? 

There are some moves now to hold the software industry more accountable.

Let us look at some arguments both in favor of and against holding the programmer legally liable for delivering defective product.

Point 1: It is impossible to deliver a defect-free software product of reasonable complexity ("Halting Problem").  Also, Quality Control testing cannot catch all possibilities.  As Dijkstra famously observed, software tests can only prove the presence of bugs, not their absence.

Counterpoint 1: Liability depends on what could be reasonably expected of the programmer.   If the programmer did not follow the prevailing industry standards and make all efforts to deliver correct code, he should be held liable.

Point 2: Bugs are acceptable trade-offs in software delivery.  Quality can be traded-off against cost or time.  If the bugs identified are deemed non-lethal, the software product can be shipped out.  Some bugs may not be even experienced under regular use, rendering them harmless.  Delaying the product to fix all arcane bugs will result in competitive disadvantage.

Counterpoint 2: While not all bugs need to be fixed before delivery, those that break any reasonable user expectation should be fixed.  Any bug that violates the letter and spirit of user requirements is deemed harmful.  Minimally the user should be made aware of any shortfall in writing and his consent obtained before releasing the product with the defect.  The developer should be confident that his decision to release the product with known defects will stand scrutiny in a court of law.

Point 3: Defects may not be foreseeable.  Software behaviour is heavily influenced by the run time environment.  It may be impossible to account for all variations.  The combinatorial explosion that would result in certifying the product with other vendor products is insurmountable.

Counterpoint 3: Software products should be driven by clearly defined specifications that identify the typical run time environment.  If an user is known to use a set of third-party software products, its acceptable interaction if any should be documented in user requirements.  As long as the programmer did not do due diligence in ensuring his product would work under expected use cases, she should be held liable.

Point 4: Penalizing the programmer is counterproductive.  No professional deliberately sabotages her own product.  This scheme will incentivize the programmer to search for legal loopholes to avoid liability, instead of coding to the best of her abilities.

Counterpoint 4: A programmer aware of her legal liability will be doubly vigilant in her work.   Under the current situation where the programmer is treated with kid gloves, code quality is likely to take a back-seat to other priorities.  

Point 5: A programmer is naturally oblivious to defects in his own code.  It is easy to miss bugs in one's own code, lacking a different frame of mind to inspect it critically.

Counterpoint 5: There is a plethora of tools at the programmer's disposal to help him track and fix the bugs: user sign off on specs, design review, following coding standards, documentation, code review, various test approaches (unit, regression, system, automated, user-acceptance).  Following systematic approach is known to result in improved quality.  Again, the programmer's legal liability will account for what could be reasonably expected of him, under the existing state of industry.

Point 6:  In an industry notorious for a shortage of highly skilled labor, such a burden will drive away prospective employees.   As it is, students do not sign up for computer science courses.  

Counterpoint 6:  In classical Economics, a reduced supply and increased demand results in higher price equilibrium, which will force more participants to enter the supply side.  Such supply side concerns should be addressed independently, such as government subsidies to students, and should not be used as an excuse for delivering shoddy work.   

Point 7: Market-driven conditions already ensure good software quality.    Forcing the programmer to buy insurance for his work will result in that cost being passed on to the customer.

Counterpoint 7: Studies show that the threat of legal liability for shoddy work results in the actors paying attention to defects.  A software product should be viewed as a contractual obligation to its end users, and as such be subject to contract law.  Markets determine what is an acceptable cost increase for better quality.

Point 8: Software is mostly a collective enterprise.  Rarely industry strength products are developed by a lone programmer.  It is difficult to identify the programmer responsible for the bug.

Counterpoint 8: As a starting point, the software vendor should be held liable.  As all the programmers have a vested interest in their firm avoiding legal liability, this will have the result in delivering better software product.  

Point 9: Open-source software is a labor of love, developed by enthusiasts without a financial motive.  Legal penalties will shutter this movement down.

Counterpoint 9: Legal liabilities should be ascertained only on commercial software products.  This will result in commercial firms underwriting the legal liability of strong open source products.  For instance, IBM already offers to cover legal liabilities of Linux from patent infringement suits.  This is a win-win situation: open-source is left alone, commercial firms fill the vacuum to provide legal cover and legal liability results in improved software products.

Point 10: Legal liability will result in stifling creativity.  Software industry thrives on innovation.  Fear of suits will freeze the developer's flow, resulting in contrived products.  Many products are conceived without an end-user specification, created by the vision of few creative minds.  

Counterpoint 10: All commercial products should satisfy certain reasonable requirements, unlike artworks which are deemed expressions of freedom.  In particular, software products that result in harming the society should be held liable.

Point 11: All first generation software products are bound to have bugs, no matter how much effort is spent to avoid it.  Products regularly improve on repeated iterations, from real-world experience.  Legal penalty for bugs will ensure nothing new ever comes out.

Counterpoint 11: This does not seem to be true from experience in other industries.  Car companies regularly introduce new models.  Medical instrument makers constantly invest in innovation.   Builders try new construction material all the time.  In all these cases, they are successfully operating under the threat of legal action for defective products.  It is difficult to imagine software industry would be an exception.


Summary: Holding developers legally liable for defective products is definitely on its way.   Software industry can ignore this at its own peril.








Saturday, May 9, 2009

Honor killing or murder?

There are regular reports from the Middle East countries where a hapless victim, typically an unwed lady caught in an amorous episode, get stoned to death in public by a family member, in the name of Honor killing.   Sometimes these are justified invoking Sharia law, on religious grounds.  Many times, these killings are sanctioned by the law of land, after a court-trial.

These are similar to the medieval practices in India, where Rajputs regularly killed their women and children, when defeat was certain in their battles against the Muslim rulers.  Their women folks were regularly degraded by their Muslim conquerors, and their children rendered Eunuchs.  The proud Rajput warriors chose to kill their family members to protect their perceived clan honor. 

The idea of honor was pushed to extremes at times.  Previously in India, the Hindu widows were perceived to lose their place in the society and forced to terminate their lives on the funeral pyre of their deceased husbands. 

Historically, there has always been a trade-off: upholding one's social standing, even at the cost of self-injury, or accepting potential humiliation to live another day.  Sadly for most of the victims, this decision was made by their community.

From a selfish gene point of view, it is hard to justify such deaths.  All living beings have an innate sense of survival and rarely give up their rights to live.  To overcome this resistance to death, society sometimes dangles such carrots as going straight to heaven on death for the religiously inclined, or honor and pension for the victim's survivors, for the modern day soldiers.

Laws of all civilized nations permit killing only under the most extreme circumstances, where the victim's death overwhelmingly benefits the society at large.  No life is deemed so despondent to justify terminating it.   It is crucial not to romanticize those who killed their dependents under the guise of family honor, patriotism, love or religion. 

A woman who loses her honor may redeem it some day.  One who loses her life loses it forever.

Monday, April 27, 2009

The First Jihad against the Hindus

When cornered, a creative and determined man would skillfully convert his adversity into virtue.   Babur’s stunning victory against Rana Sanga of Mewar in the Battle of Khanua, 1527 AD, under the banner of Jihad (Holy War) was one such example.  Religion would be used as a means to advance personal ambitions, not for the last time in history.

While there were countless battles between the Hindus and the Muslims before, they were fought over India’s legendary riches.   Religion was never deemed a prime reason to wage a war in “Hindustan”, as the land was then called.

While Babur termed the very first Mughal battle against the Hindus as Holy War, such a label was more reflective of Babur's shrewd military prowess than his religious zeal.   Earlier, Babur had no qualms in accepting Rana Sangha’s help, who promised (but never delivered) diversionary attacks on Ibrahim Lodi in the First Battle of Panipat, 1526.

Rana Sanga, a ferocious Rajput warrior, was an worthy adversary of Babur, a battle-tested veteran and a descendant of Timur and Chingiz Khan.  Rana had lost an eye, an arm, had broken his limb and sported eighty wounds from sword or lance on his body – all the result of his previous military engagements.   

Rana dreamt of erecting a Hindu Raj, following Ibrahim Lodi’s defeat at Babur's hands, expecting Babur to quickly retreat to Kabul.   When Babur decided to stay in Hindustan, with his capital as Agra, Rana decided to take on Babur.  

Babur’s soldiers wanted to retire to Kabul with their loot after defeating Lodi Some of his allies in India began deserting him.  Babur estimated the strength of Rajputs at 200,000, far more than Lodi’s army that he had vanquished earlier.  Babur’s army numbered less than 12,000 men, but sported a modern army with muskets and cannons.

When confronted by a far superior enemy, Babur found a way to conveniently raise the morale of his troops, under the guise of Islam.

To win moral authority for his encounter with the Hindus, Babur turned to Islam - giving up wine and swearing not to trim his beard thereafter.  He declared the war as a Jihad, and addressed his troops that they will either become martyrs if defeated, or avengers of His sacred cause, if victorious.

Babur recounted the Battle of Khanua, 1527, in his autobiography, Baburnama.   The Mughals, with their blood ignited by Babur’s apparent religious zeal, overcame the Rajputs with their firepower.   Babur assumed the title of Ghazi, Holy Warrior, at this victory.

But Babur had no further interest in the Hindu army.  He did not pursue the Rajputs.  He even let Rana Sanga escape, who would later succumb to his wounds.  Content at securing his power, Babur returned to Agra Later, he would even return to drinking, breaking his vow at the Battle of Khanua.  Babur had little results by way of religion to show, having proclaimed the first Jihad against the Hindus.

Khanua was a watershed event in Indian history, with the Hindus losing forever their chance to establish a Hindu Raj all over their beloved Hindustan.   But the animosity of the Hindus towards the Mughal Empire would soon subside.

(Reference: The Mughal  Throne, Abraham Eraly, Phoenix, 2004)

Thursday, April 23, 2009

Morning Star ("Vidi Velli") - A poem in Tamil


This is a poem I composed on 9th May 1992.   Morning Star is traditionally associated with hope.  I chose this title in stark contrast to the dark mood elicited by this poem.



Wednesday, April 22, 2009

A damsel named Tongue

(I dedicate this tale to my sweet daughter, Champi.)

This is the story of a beautiful carmine damsel named Tongue, losing her liberty and suffering untold attacks by her cruel captors.

In the beginning, when she was young, she had all the freedom she desired.  She would twirl and slide, making happy noises at whoever passed by.  She would curl, she would flip, and she would jump with unshackled joy.  Her slippery moves made many a person captive.

Unawares, as she was growing, she was making hidden enemies, who were determined to wreak havoc on her life.  Little did she imagine the visceral hatred these budding enemies held towards her.

One day, she was dragged to her growling Master at Throat.

"Tongue! You make too much noise, disturbing everybody."

Recoiling at this unexpected accusation, Tongue protested. 

"But Master! That is my destiny! I can also utter sweet songs when your mind so desires."

Unmoved by her plea, Master at Throat grabbed her with an icy grip.  

"From now on, I will never let you move free.  I will imprison you in Mouth and surround you with 32 guards.  These guards named Teeth have only one goal in their lives: to mince and mime you whenever they can with their sharp weapons." 

Tongue was crestfallen and slumped, as her 32 tormentors started surrounding her menacingly, in their shining white armor.

"But you can never subdue my spirits", Tongue replied in a rebellious voice.  "I may be a prisoner, but I'll still dance with joy.  I may get chopped, but I'll heal myself and live to dance another day."

Since that incident, I rarely got to see Tongue.  Occasionally, she would escape her brutal captors to catch some falling food for her sustenance, but never for long.  She would invariably get dragged back by her cruel Master at Throat, with her body curling up at this manifest injustice.

Tuesday, April 21, 2009

A gypsy is dying

This is a poem I composed on 9/27/1992.

A chap widely admired
Is caught in a quagmire.
He is sinking to its depth
Yet no one has wept.

I am in search of a place
Where all my troubles cease.
So I can live in peace
And die, when I please.   
  (A chap widely...)

Gone are the golden days
When I couched upon sandy bays.
And pondered over the wonderful ways
Of my carefree life - one devoid of affrays.  
  (A chap widely...)

My spirits used to soar
To lofty heights; Upon my notes I did pour
Vivid versions of the joyful lore
Of getting entry through heaven's door.  
  (A chap widely...)

All that is past; Happiness lost.
The jaws of misery are closing fast.
My ship has lost its lofty mast.
It is a ship no more; How long will my doldrums last?  
  (A chap widely...)

Won't someone care for this vagabond?
After all, people used to be so fond.
Should one more fish die in this human pond?
I cry for help;  Please someone respond.    
  (A chap widely...)

Monday, April 20, 2009

Morality in War

From time to time, we hear episodes of war-crimes, that move us to indignation.  Any casual reader can identify several such immoral acts during recent conflagrations.

We have an innate sense of justice and fairness that we expect from others, even during such extraordinary times as war.

But it is important to realize that such expectations are a product of our time. What counts as immoral act during war has widely varied in history.

For instance, during the initial stages of World War I, airborne pilots did not attack fellow pilots of opposing sides.   Such an etiquette in war is incomprehensible now.

Hindu works on war even had restrictions on attacks at night time and on attacks without warning.  There were even injunctions against mismatch of weapons: a cavalryman could not attack a foot soldier, an elephant-rider could not attack a cavalryman.  It even prescribed that only soldiers of the same rank could engage each other.  

Again, we do not subscribe to such moral laws of war any more.

There were even an instance in Ramayana, where the enemy was asked to exit the battlefield, as he had lost his weapons during the fight.  What was then considered a noble act will be deemed downright foolish now.

What complicates the matter further are immoral acts that are committed under the guise of religious or patriotic services.   In an infamous incident during India's freedom struggle, General Dyer massacred innocents, but he was rewarded on his return to Britain. 

Further, many acts during war may be considered admissible, unlike under normal circumstances.  

In fact, the settings for arguably the most important religious work for Hindus, Srimad Bhagavad Gita, concerned the qualms of a warrior who loathed to kill his own teachers and brethren.  Under normal circumstances, such acts would be considered immoral, but were deemed right, nay duty-bound,  during that war.

The next time you rage in anger on hearing a war news, as dramatized by news services, bear in mind that history may change its view of the act perpetrated, however heinous it may sound in contemporary times.