Search This Blog

Monday, November 02, 2009

A better definition of Learning

Webster and Oxford define learning as "knowledge or skill acquired by instruction or study". Most of our lives are governed by this definition - from pre-school all the way to adulthood, including certifications. While this is a decent definition, it does not exactly cover all aspects of learning, does it? How about learning by mistakes? How about the 'Eureka!' moments that you go through when you are in the bath tub? How about learning from others' learning?

We see glimpses of these types of learning either embedded in the generic definition of learning or as an addendum to the 'taught' learning process, such as team discussions typically done in business schools. However, due to the generally accepted notion of learning, not much emphasis is given on these other forms. This can be an issue because we tend to lose significant opportunities to learn in our child and adulthood by focusing only on rote learning and not the other options of learning.

Can we do better? Yes, we can. In fact, we don't have to look far. A much more precise definition of learning has been given in the Sanskrit literature, which amazed me when I first came across it as part of Prof. B. Mahadevan in his article on Sanskrit and Business Management that I blogged about earlier. Here's the verse, and my visual depiction of the verse.

In English,

Aachaaryaat paadamaadatthe paadam sishyah svamedhayaa
Paadam sabrahmachaaribyo paadam kaalakramena cha

Sounds Sanskrit? Here's the breakdown (thanks to my brother, who can actually understand as opposed to just reading it!):

aacharyaat - from the guru
paadam - quarter
aadatte - receives
paadam - quarter
shishya: - student
sva medhayaa - by his own intelligence
paadam - quarter
sabrahmachaaribhi: - from his fellow students
paadam - quarter
kaala kramena - by time
ca - and

Essentially, learning is defined as one quarter teaching, one quarter self study, one quarter group study, and one quarter done over time. Can you be more precise?!

Taught
If you think a bit, you can see the depth of the meaning that is described so beautifully here. You learn from your teacher. This is the one that is done formally through the education system.

Self-Study
Then you reflect on the thoughts be they coming from the teacher, of your own volition, or from your surroundings. A classic example of this would be the 'Eureka!' moment that Aristotle had when he was sitting in his bath tub. How many times have you had such moments when you were driving or when you were on the shower? Many a times, I have found myself honing my ideas or thoughts better, be it related to my work or personal life when I just sit back and think about it. Maybe emphasis on meditation in Sanskrit was to promote this form of learning.

Group Study
You also learn from your peers, a concept established successfully by the 'Hole in the wall' experiment by Sugata Mitra. While we do this in school most times, there is sadly very little emphasis on the power of such learning. Normally, we are encouraged to do things by ourselves than as a group. On the contrary, you can see most business schools put a lot more emphasis on group discussions, potentially to unlock this form of learning. I remember my college days where a bunch of my friends used to study through the night (in the middle of watching a variety of serials that come late night ;)) weeks before the final exam. It helped me personally and I believe the group in general as well (we all got really good grades!).

Over Time
Lastly, there is the process of learning over time, either by way of experience or by way of history. As the famous quote goes, "those who do not learn from history are condemned to repeat it" - true words, embedded in this stanza ages ago. Most projects take some time to 'learn' from successes or failures of previous projects.

Years back, computer scientist Peter Naur wrote a paper titled "Programming as theory building" - one of the best articles I've read, and something that holds true even today, even in completely different contexts. Essentially, he argues 'swappable' resources are not a great idea. His argument is that each programmer builds a mental model or theory about his program during the course of development. In most cases, this model is seldom documented or communicated with other resources (primarily due to the difficulty in expressing the model in words). As a result, when the programmer leaves, the theory leaves with him, essentially resulting in another programmer building another theory (or rarely, the same theory) from scratch. How many times have you looked at a piece of code and wondered what the heck the programmer was thinking?!

I found this concept in a completely different setting, in a book called The art of game design by Jesse Schell. In the book, the author describes a concept called Flow Channel identified by psychologist Mihaly Csikszentmihalyi (and they say my name is hard to pronounce!), which is the basis for levels in a game - more on this in another blog.

So, in effect, our education system is really tapping into only 25% of the whole learning process. Imagine how it would be to tap into the whole process?! I wonder when we will learn that the learning provided by our learned ancestors would facilitate better learning for the future generations.

Sunday, October 18, 2009

Management in Sanskrit literature

A few weeks back my brother sent me a lecture delivered by Prof. B. Mahadevan who works at IIM Bangalore. The topic is "What constitutes good management - Lessons from ancient Sanskrit scriptures" delivered as part of the "Sanskrit and Science" series. The first couple of paragraphs unfortunately a bit dry (probably due to the transcription of a lecture) and hence I promptly shelved it for a later time. While on a flight today, I came across the article that I had almost forgotten, and I am glad I took the time to go beyond the first page.
In the lecture, Mahadevan lists five primary qualities for a person pursuing management skills, namely
  1. Ability to visualize the big picture
  2. Systematic approach to problem solving
  3. Attitude towards learning as a way of life
  4. Managing short-term vs long-term conflicts and
  5. Having leadership traits
I think this is a fairly neat and relatively concise way to look at management skills. He goes further to explain how each of these concepts is explained in various Sanskrit scriptures and how they are relevant even in this day and age. Here is a quick rundown.

Ability to visualize the big picture

One of the striking quality of Hindu scriptures is the concept of providing multiple viewpoints to a single idea, thereby providing an option for the reader to pick and choose the idea he sees close to his mental picture, while still achieving the same goal. There are various philosophies within the Hindu system that talk about salvation, although the path taken is completely different. It is interesting that the ancestors have thought of these myriad possibilities and listed them rather than emphasizing on a single idea.

In one classic example, the vishwarupa (literally magnanimous form) of Lord Krishna in Mahabharata is described as "the light shining from a thousand sunrises", an expression that Robert Oppenheimer quoted when witnessing the first atom bomb blast. There are numerous other examples where the vastness of time and space are explored in detail while sitting in a corner of this world.

Such "big picture" thinking is now deemed as an important quality for a good manager.

Systematic approach to problem solving

Mathematics has been embedded in various Sanskrit literatures. Not only have they thought big, they have also taken pains to categorize the vastness and also provide a proper system to calibrate it. Even more amazingly, in Rig Veda, one of the most ancient Sanskrit scriptures, the speed of light has been calculated as 3.020263x10^8 m/s, an extremely close approximation of the current definition!

As Mr. Mahadevan surmises, this systematic approach seems to stem from the spirit of inquiry that is encouraged within the scriptures themselves. Scriptures such as Katha Upanishad and Prashna Upanishad are written in a question-answer format, that promote this idea strongly.
As an example, Mr. Mahadevan quotes a stanza from Lilavati by Bhaskaracharya, where proper nomenclature is given for number systems ranging from 10^0 to 10^17. Remember, this was written hundreds of years ago!

Similarly, in Bhagavatam, another popular Sanskrit scripture, nomenclature has been given for time ranging from 10^-6 seconds to 10^17 years.

Learning as a way of life

Sanskrit and pretty much everything else in the past was taught in Gurukulams, literally meaning the teacher's residence. In the past, learning happened by way of apprenticeship, wherein the students will stay at the teacher's place for a prolonged period of time and learn various skills.

Mr. Mahadevan quotes an amazing verse that defines the idea of learning: Learning is one fourth taught by teacher, one fourth learnt by self-reflection and thinking, one fourth by group study, and one fourth is learnt over time.

This, I feel, is an excellent and probably a very accurate way to think about how we learn. Personally, when I was in college, I used to learn part by reading by myself and part by doing 'group study' with my friends, which I felt greatly enhanced by learning as well. A similar conclusion was reached by Sugata Mitra in his experiment "Hole in the wall" (the idea behind the book Q&A by Vikas Swarup, which was the inspiration for the Oscar winning movie, Slumdog Millionaire). I hope to expand on this in another blog post.

Understanding that learning is something that happens over time and not just in an instant provides a level of humility and also alerts one to be constantly on the lookout for new knowledge.

Managing short-term vs. long-term conflicts

As Mr. Mahadevan states, Hindu philosophy itself is one long conflict between short-term goals and long-term goals. The idea of living the current birth while reincarnating multiple births before reaching salvation provides a great analogy for this concept. The concept of karma accumulating over time and birth and the prospect of managing it well in this life to facilitate future ones is not dissimilar from a manager weighing in short-term gains to long-term gains.

Leadership traits

Finally, every manager needs to have some leadership qualities (which unfortunately, is lacking in most politicians today). As Mr. Mahadevan shows, Sanskrit scriptures explain the idea of leading by example and having an emotional balance in multiple places to highlight this idea.
Over the years, I have wondered why Indians (and Asians in general) tend to be more 'doers' than 'leaders'. While I have thought that it was mainly because of the submissive past (most Asian countries were colonies of the Western world), it looks like the root problem is more because of the educational system that is in place in these countries that focus more on rote learning instead of creativity. While the Western world seems to have rectified this error (after all, the current system is based on British learning system), they seem to now have erred too much towards creativity, thereby creating a void in analytical skills. It looks like what we need in our educational system is a right balance of the two.

So, if the ancient Sanskrit scriptures contain so much wisdom over a wide range of topics that are relevant even today, why aren't people, especially Indians who are close to it, look at them with vigor?

As Mr. Mahadevan states at the end, Sanskrit can nowadays be learnt in two phases of life - one as part of collegiate and graduate studies by students taking special interest in the subject, and two, as an adult who has established a secure future by other means. Since the Indian society largely favors careers oriented towards a secure job (such as IT, medicine, and engineering), it would be very hard for students to make Sanskrit literature as their career.

So, the only other and probably the most viable option is for professionals who have a secure job (the same IT, medicine, or engineering) to take up Sanskrit at least as a hobby and start learning so that they can unlock many more mysteries that it may hold.

On a side note, I have also wondered why the people who have provided so much wisdom preferred an oral mechanism of passing on the information through generations instead of a secure written mechanism. I have an idea why, and hopefully that'll be the topic for another blog!

In the meanwhile, I strongly encourage you to read Mr. Mahadevan's lecture, excusing the spelling mistakes at the end and relatively dry start. It's well worth your time. My only niggle is that the transcript does not explain the verses he quotes in more detail.

Tuesday, October 13, 2009

Vermont Teddy Bears - not as USA anymore?

After a gap of a few years, my wife and I traveled to the New England area to see the fall colors. I have always enjoyed going to Vermont/New Hampshire area (have been there 4-5 times now). The natural landscape is spectacular, especially during this season, the people are very friendly, and more importantly, the area still carries a lot of rustic charm that seems to be eroding in the urban areas. If anyone wants to visit the 'real' USA, at least as imagined based on past classics that are still popular in India such as Archie comics, this area is a great place to start.

Our trip was quite productive, with lots and lots of fall colors everywhere and the weather cooperated beautifully. We tried to go through as many of the local roads as possible, hoping to catch a glimpse of the fall colors in all its splendor. Ironically, I felt the colors were far more vibrant along the interstates (especially I-89 and I-91) than the local roads. One exception was the loop of Burlington-Hanksville-Waitsfield-Waterbury, which was amazingly beautiful with extremely vibrant colors - I highly recommend the drive.

I have always been pleasantly surprised by the ingenuity and local entrepreneurship in this region, the two most famous being the Ben & Jerry ice cream company and the Vermont Teddy Bear Company. In the face of increasing globalization, these two companies seemed to stand bravely, protecting the American brand proudly. However, during this time, I had a bit of a shock to find both these thoughts shattered somewhat.

Ben & Jerry's Ice Cream Founded by two friends a few decades back, B&J was awarded the "Small business persons of the country" award a way back. The guys started the company small and grew fairly big. I was quite disappointed to hear that the company is now owned by Unilever - a fairly huge conglomerate of companies.

While they still seem to do their best to keep the 'local' flavor of the company alive, I cannot but help feel that commercialization has taken over this company as well. Thankfully, the ice cream still tastes the same :)

Vermont Teddy Bear
This is probably my biggest disappointment and the reason for this post. As some of you may or may not know, "teddy bear" got its name from a cartoon depicting "Theodore "teddy" Roosevelt", former American President, an avid game hunter, who could not bear himself to shoot a cub tied to a tree (by his cohorts, as he was not getting any wild animal that day).

Since then, teddy bears became quite popular. One day, a person named John Sortino wanted to get a teddy bear for his son and found that he could not buy one that was made in USA, thereby starting his own company to make some.

The company has prided itself in its small-town values and 'Made in USA' brand. Having been deluged every day with products from Asia, I was happy to do my bit to promote local products and suggested to my wife that she get herself a bear, even though it was slightly over-priced (fair enough, since they don't mass produce stuff and the quality is good).

Here came the shocker. In the "build-a-bear" section of the company, half of the options were 'imported' (read 'made in Vietnam')! The other half were all a new type of bear concept called 'Flattie' - which honestly, looked as if a Teddy Bear was put under a steamroller.

There was absolutely no decent 'made in USA' option that we could buy. As I looked at others around me, including all the children, everyone was making a beeline for the 'imported' options, as they looked more like teddy bears and less like flattened pancakes.

Worse, there was a 'charity' bear (buy 1 and they give another to the local fireman's association or something similar). I was quite impressed and thought I'll get one of those - only to find that they were also not made in USA!

I mean, why promote the company as "made in USA" when half the options are not so and the ones available look nowhere like teddy bears? Calling them 'exchange students' and 'imported' does not make it any better or glorified. It's still not made in USA.

I still pressed forward and picked up a 'flattie' hoping that when stuffed it'll look somewhat like a bear - no dice. It still was as flat (esp. the nose/mouth area) as it was put under a steamroller.

At the end of the day, I walked back with a heavy heart, light wallet (the 'imported' ones were the same price as the 'local' ones), and a flattened bear - not the feeling I was hoping for. I am sad that yet another 'local' company has succumbed to the globalization.

UPDATE: A day after I posted the blog, Wendy from the company was kind enough to respond to the post and clarify some of my statements. As she mentions, the issue I had was mainly with the "friend for life" section of the factory and not the entire store itself. There are definitely a lot of authentic bears to choose from. It also appears that the 'flatties' are available only in the store and not elsewhere. I am definitely very impressed with the courtesy of the staff as well as their professionalism and wish them the very best in future. Oh, did I also mention that all teddy bears have a 'life-time' guarantee (except if you put your teddy in a dryer)?! That's something you don't see anywhere else.

Tuesday, October 06, 2009

Maslow's hierarchy of needs and Yoga Chakras

A while back, I wrote how Darwin's theory of evolution seems to be codified within the ten avatars of Vishnu in Hindu scriptures long before Darwin was even born. The point was that we need to take a closer look at our respective ancient scriptures and texts with a more serious outlook without dismissing them outright as irrelevant.

Yesterday, I came across another instance where I think what the Western world had identified is something that has existed for ages - it's just that nobody bothered to take it seriously in modern times.

Maslow's hierarchy of needs

Case in point is Maslow's hierarchy of needs. I have come across the hierarchy a few times in popular science non-fiction books on psychology and brain function. Postulated by Abraham Maslow in 1943 after observing different types of people, it lists 5 types of human needs, stacked one atop the other. The theory is that one cannot move to the next level in the pyramid unless all the needs below it are satisfied. Here's a quick snapshot of the hierarchy.

For example, one does not worry about safety and morality when survival is at stake. Similarly love flourishes when one is secure. Finally, one tends to think about self-awareness only when the other needs are first taken care of.

Yoga Chakras
Maslow need not have wasted his time on research. The same concept, in an even more expanded form, is codified in the Hindu scriptures in the form of Yoga Chakras.

Chakras, as described in the Yoga Sutra (Sutra = Scripture) is embodiment of various forms of energy stored in a human body. The concept of chakra is mentioned in the Rig Veda, one of the most ancient Hindu scriptures, and were later made popular by the Sankhya philosophy (of which Buddhism has its roots). The scriptures state that a body needs to ensure that the energies are balanced at all times, failing which various forms of ailments (mental and physical) may arise. Channeling the energy properly (also described as channeling the 'chi' in Chinese spiritual texts) can help one attain enlightenment or freedom from this material world.

Now, how does this compare to Maslow's hierarchy? Let's first take a look at the chakras.

Each chakra is associated with certain qualities which represents the corresponding energies. They are
  1. Muladhara: Located at the end of the spinal cord, this deals with survival instinct.
  2. Svadhisthana: Located in the lower abdomen, this deals with feelings and sexuality.
  3. Manipura: Located near the stomach, this deals with self-power or basic intellect.
  4. Anahata: Located near the heart, this deals with love.
  5. Visuddha: Located near the throat, this deals with learning and expression.
  6. Anja: Located between the brows, this deals with self-awareness and insight.
  7. Sahasrara: Located at the top of the head, this deals with enlightenment or wisdom.
Looking at the two hierarchies side-by-side, you can see some amazing similarities:

Muladhara and Svadhisthana are related to Maslow's physiological needs.
Svadhisthana and Manipura are related to Maslow's Safety needs.
Anahata maps to Maslow's need for love and belonging.
Visuddha maps to Maslow's need for self-esteem.
Anja and to an extent Sahasrara maps to Maslow's self-actualization.

Unlike Maslow's needs, it does not stop there. Like most other aspects of Hindu literature, the chakra has multiple facets embodied in one simple codification. Here are two other facets to the chakra that are even more amazing.

Each of the chakras are located next to or are associated with a hormonal gland or organ in the body that has close correspondence to the activity described in the hierarchy.

Another explanation is that each chakra is associated with a light spectrum component, essentially spelling out the colors of the rainbow.

Apart from these, the chakra is also associated with a representation of the lotus flower, with each chakra having different number of petals. I am not sure what the numbers represent though, but am curious to find out. The overall chakra concept is also represented in the Kundalini form of yoga, which deals with channeling the energy through these chakras to achieve enlightenment.

I wonder how many other symbolisms are embedded in our ancient scriptures that we have since dismissed as heretic or irrelevant based on the bias and prejudice we have developed over the last few hundred years. I only hope that we have the sensibility to wipe the slate clean and look back with an open mind.

As the Zen philosopher Shinryu Suzuki said, "In a beginner's mind, there are many possibilities. In an expert's mind, there are few."

Friday, October 02, 2009

A case for corruption

Everyone in the world (barring the politicians) decry the need for a corruption free society for the betterment of humanity. However, I think in some cases, the existence of corruption has actually been a boon rather than a problem, obviously unintentionally. I can think of two good scenarios.



Better health As a kid in India, we used to get milk from the local milkman and occasionally from a government run co-op depot that used to sell milk in packets. There were only two choices - cow's milk or buffalo's milk - and both of them organic, whole milks.

It is an open-secret that milkmen generally make money by diluting the milk with water to increase the quantity for the same price. While this corrupt behavior was lamented upon by my mom and pretty much everyone else, it was accepted as something that you just can't get rid of.

Cut to the current day - I purchased a gallon of whole milk a couple of days in expectation of my friend's visit with his 2 year old kid. Obviously the kid didn't drink the whole gallon and I had plenty left. I made a cup of coffee only to realize that I had only the whole milk and not the regular 2% that I use. So, I did the natural thing - diluted the whole milk with some water so that it is not as 'rich' and 'fatty' - at least in volume.

So, in essence, the 'corrupt' practice that the milkmen followed were in fact indirectly helping us by reducing the fat in the milk, which is now considered as a good thing!

Government Health Care India, having socialist roots thanks to Nehru, the first Indian prime minister, has both private and public health care systems. Government-run hospitals are available for almost everyone to have basic health care without need for any insurance and mostly for minimal price.

Currently, there is a big debate raging in the US about government-run health care option and how it will throw all the private practices out of business. Coming from a country where this is in vogue, I say that it does not happen, thanks to the general idea of corruption that is linked to the government!

While I think that most doctors are honest and carry their business like any other place, the bureaucracy surrounding any government institution has created a perception that Government hospitals are inferior to private hospitals and hence have lower quality of care. As a result, those who can afford private care (such as middle-class and higher) tend to avoid government hospitals, while those in real need (lower-middle-class and below) opt for the option as they cannot afford anything else.

So, in an indirect way, corruption has actually helped provide universal health care, although not in glowing terms!

Social equality No other mechanism than corruption has created a level of social equality in developing nations. The power that is usually attributed to CEOs and politicians can be seen in almost all levels of public service - from hospitals to police to ration systems to pretty much everything else. Since most of these positions are held by middle-class citizens, in a way corruption has made them as powerful as the upper-class citizens. Everyone has to bribe everyone else for one form of service or the other - what better way to create social equality?!

Can you think of any other scenarios where corruption has had an unintended side of being perceived as helpful?

PS: While I am not a fan of disclaimers, I do want to say that the above piece is meant as sarcasm (if it was not obvious already) with a tinge of truth than be considered as a defense for corruption. Obviously the drawbacks far outweigh the 'potential' advantages, but I am curious to know if there are any!

Thursday, September 10, 2009

Impact of non-immigrant workers on the developing nation

Earlier, I mentioned how a healthy influx of non-immigrant works can actually be beneficial to a developed nation. So, how does this impact the nation on the other end - the developing nation?

Once again, it has its benefits and drawbacks, and I feel that the drawbacks this time outweigh the benefits. The benefit is mainly two fold: One, as most developing countries tend to have a population growth higher than what they can sustain, the reduction in the population can help reduce the burden a bit. However, this is not necessarily entirely beneficial, as the population that is going out is one that can help improve the economy of the nation than be a burden, as most tend to be the law-abiding, tax-paying kind. Second, those who do decide to make their fortunes abroad tend to send back quite a bit of cash back to their families back home, there by increasing the foreign currency reserves of the country and also improving the purchase power of the families, which in turn, can improve the economy.

However, the downside is fairly significant. As I mentioned earlier, most of those who do go out to find better opportunities tend to be more law-abiding and tax-paying and hence, the nation tends to lose the tax income from them. Moreover, they also tend to be better educated than the average citizen and the nation as a result, loses good leaders and entrepreneurs who would've otherwise helped improve indigenous companies.

So, what can a nation do to prevent this 'brain drain'? To answer this, we must first understand why people tend to move outside their home country in the first place and take steps to fix those issues. While there is a percent of folks who want to go to another country due to some connections they already have or just because of plain curiosity, the following, I believe, are the more common reasons:
  1. Perception of better social infrastructure (aka quality of living) - be it roads, houses, basic facilities, or government interactions, the developed countries have a better system than the developing nations. While corruption and mismanagement is there in every nation, it tends to be less when it is the closest to the typical citizen in most cases. Police do their job regardless of the stature of the person or his connections; electricity and water is available without having to run to multiple government branches; work generally gets done without bribery.
  2. Perception of better education - while the school system in many developed countries are no better than those of developing nations, the higher education is significantly better. This could primarily be due to the healthy interaction between companies and universities. Most professors get grants from companies/government to do research and even develop some projects. Such a mechanism is not there in developing countries, where universities are essentially seen as extension to schools.
  3. Perception of better freedom - both men and women tend to feel that there is generally better freedom to say and do things in developed nations. This could be politics such as criticizing the government for inaction or social behavior such as morality, dress code, etc.
  4. Perception of better opportunities - the capitalist nature of developed countries tends to foster competition. The growth of IT also has made it easy for someone with one background to easily switch to another. Till a decade or so back, it was very difficult for an Mechanical Engineer to become an Electronics Major. People were typically put in silos and it was increasingly hard for them to break the mold. Thanks to IT in part, this has changed in the recent years, and more and more opportunities are coming up for fresh graduates. However, the issue still persists outside the IT industry.
In order to stem the 'brain drain', I feel that a nation that is truly interested in protecting its intellectual property must address these concerns.

While the purchasing power of the middle class citizens has increased enabling them to buy cars that they could only dream of in the past, the transport infrastructure has not caught up, resulting in major gridlocks, which in turn, is affecting the overall health of the nation. While IT has made leaps and bounds, the network is still significantly inadequate. One of the pleasant surprises that I got when I went back to India a few years back (first time after the Globalization) was the ease at which one could get a gas connection or a telephone. What used to take a year or two is now happening in a week. Things definitely have improved, but the road is still very long.

While there are way more universities and colleges than used to be a decade back, the quality of education has not improved significantly. In fact, it has gone down, thanks to numerous 'wealthy' individuals opening a college for making more money than for imparting better education. The evil of 'management quota' and 'reservation' still exists. What is urgently needed is a merit system (with economic support - such as scholarships) and a healthy involvement of businesses. This would not only bring the much needed cash to the education system, but also better prepare the students for job opportunities once they graduate.

India has always prided in being a democratic and secular country, where every citizen has fundamental rights of speech and worship. However, in the recent years, fundamental groups of all religions have cropped up and taken the role of 'moral' police. This is a very dangerous trend, which, if not cropped at the bud, would only lead more people to leave the country than stay back. A strong action needs to be taken to ensure that moral policing does not happen. India has survived for centuries without requiring moral policing and has withstood invasions from Mughal and British empires without losing its core values and without a need for a moral police.

While the IT industry has helped significantly in enabling fresh graduates to get better opportunities not just in IT but also in related industries such as commerce, there are still other areas like arts and literature that are languishing due to lack of support. While most political parties take up a language issue in one form or the other, none seem to be genuinely interested in protecting and promoting the indigenous languages and cultures. This must change for arts and literature to flourish along with technology and provide the much needed balance to the system.

These measures, I feel, would greatly help a developing nation, be it India or China, to compete fairly and healthily with developed nations such as USA and UK, and hopefully make the world a better place.

Impact of non-immigrant visas on a developed nation

In the last post, I showed the most common path that is taken by a non-immigrant worker (typically in the skilled jobs category such as IT) towards better life and opportunity in USA. The question then, is "How does this impact the country - Is it good or bad?" The question gets raised pretty much on a frequent basis, not surprisingly coinciding either with an election or with an economic downturn.

I feel that there are more benefits than risks, especially in this specific segment (temporary visas for skilled workers), and contrary to popular belief, I would argue that it actually benefits the economy than hurt it. Here's how.

B1 Visas
In case of B1 visas, where people come in for a short assignment, typically lasting no more than 3 months, there is some benefit and no real loss. While those folks tend to spend some money by buying gifts, they tend to conserve as much money as possible. It's mainly because the exchange rate is quite high ($1 = Rs. 48).

H1 Visas
The real benefit comes in H1 and to an extent, L1 visas. People in these visas tend to stay for a longer term - typically 3-6 years for a H1 visa and 2 or more years for an L1 visa. When a person comes in for a such a relatively long-period, he needs to set up a base here.

Accommodation and Travel
That means getting an apartment, furnishing it, buying essentials, getting a car, etc. All this contributes to the country's economy. Moreover, now that he is staying for a longer term, the tendency is to travel and explore the country with his friends/colleagues/family. This has a fairly significant impact on the American tourism, as can be seen at crowds gathered at Niagara Falls around national holidays! There is a joke that an Indian can find his long-lost friend or cousin if he visits Niagara Falls on Independence Day!

Marriage and Travel
This inclination for tourism only increases when the person gets married. This happens more often than not because people who tend to come in to USA on an F1 or sometimes even an H1 are young adults aged 20 - 30, and tend to get married around 25-35, when they get staffed in a relatively stable project. This change in the lifestyle once again contributes fairly to the American economy.

Child Birth
The next big expense comes few more years down the road when the family size increases. A new kid comes with its own expenses, often more than their parents! This again contributes to the economy.

Note that the typical downside of immigration such as potential increase in crime, uninsured medical expenses, etc. are not applicable here, as most tend to fall under the middle to upper-middle class with an average annual income of around $60,000 - $100,000 and they are all insured by their employers for the most part.

I have seen that a typical non-immigrant family tends to save less or at most same as what they would have, had they been back home. While the material possessions to tend to increase significantly compared to their counterparts back home, the overall savings remains the same.

On top of all this, one thing that I find most interesting is that H1 visa holders have to pay Social Security Tax. As you know, SS tax is intended for care post-retirement, which H1 holders are not eligible for, unless they stay here and get citizenship. Moreover, a country such as India does not have a bilateral agreement to convert the SS tax contributions to a PF (Provident Fund) contribution - the Indian equivalent of an SS tax. So, if the person decides to head back after the H1 term ends, their contribution goes to the SS pool, benefiting the rest of the citizens (or at least that's how I understand it).

There are a number of other intangible benefits as well. For example, as most H1s have kids no more than 3 years old, they do not place a burden on the educational system. Rather, they contribute to the economy of the day-care agencies. Also, most families tend to fly-in their parents and in-laws to see the newborn and to generally show them around the country. This in turn, increases the tourism as well.

So far, there are only positive. So, where's the negative? The biggest complaint is that an influx of non-immigrant workers will deprive the citizens off their opportunities for same jobs. However, I do not believe this is true. The same hue and cry existed when offshore development started. People feared that all IT work will go to developing countries. 5 years down the road, we are yet to see that happen. I believe that more than depriving people of their opportunities for jobs, I see this as a shift in the type of skill set needed within the country.

Change in skill set
In most developing countries, the educational system emphasizes rote learning and analytic work as opposed to creative work. As a result, people from these countries are excellent in analytical skills and task-oriented jobs. However, the same advantage also makes them poor leaders. The lack of emphasis on creativity makes them less effective managers, leaders, and entrepreneurs. This is where the American workforce shines, and this is where they can continue to get more work.

The exceptional few who are good leaders use the free market in this country to set up shop, which in turn, provides opportunities for a number of citizens.

So, in all, I think it is in fact, advantageous to have H1 workers at a constant rate than not have any. It bodes well for the country's economy, tourism, and development.

Green Card
The penultimate step in the quest for citizenship is permanent residence (or Green Card). This makes the non-immigrant worker effectively an immigrant and helps them in getting some of the benefits enjoyed by citizens. The children also would have grown up by now and get incorporated into the educational system. The influx of the analytic-oriented kids into a creative system can help bring a better balance to the overall educational system as well and foster healthy competition.

Moreover, most green card holders now have to upgrade their lifestyle and tend to buy a house (and spend more money on house maintenance!), which again is a boon to the economy.

Bottomline: Having a reasonable influx of non-immigrant workers can be healthy for a developed nation both in terms of economy and in terms of keeping it in its toes. This influx should be considered as a shift in the work force and not as a replacement.

Now that we have seen how a developed country actually gains a lot more than it loses due to non-immigrant workers, you may wonder "Who loses?" After all, nature is more or less balanced and if one wins, someone else must lose - and that would be the developing nation! In my next blog, I hope to explain what the developing nation loses, and how it can potentially avoid the loss.

American dream for the non-immigrant worker

This is a slightly longer post - so much so that I am splitting it across three posts, all related.

Heated debates about worker visas tend to appear typically during times of trouble and during election. While the demand for H1-B (temporary worker) visas in USA seem to have slowed down (at last count, there are still 20,000 visas up for grabs this year), I think the current economic crisis and even job downturn seems like a good time to think about the impact of these visas on the US economy.

As a foreigner from a developing nation who came to USA for better opportunities and growth, I can relate to the standard (sometimes even stereotypical) path that a non-immigrant worker takes in search of a better life. While I focus on India and US, as I relate to them personally, I believe the same applies to the visa relationship between any developing nation and developed nation.

I have tried to depict the typical road taken by a non-immigrant worker to achieve the elusive 'American Dream' in the picture below.


The journey typically begins with a (hopefully) bright, young individual who wants better education and career that he does not believe might be available in his home country. As a result he applies for an F1 (education) visa, hopefully gets a grant or scholarship, and comes to USA.

After 2 years of studies, he gets a Master's degree, gets an EAD (Employment Authorization Document) to work in the country for up to a year. In this time period, he gets a job and gets the company to sponsor his H1-B (temporary worker) visa, which would allow him to work for a minimum of 3 and a maximum of 6 years.

After a few years, some may opt to get back to their home country for personal reasons, which may include caring for aging parents, personal choice, or a stronger social group in the home country. Others continue down the road.

The willingness to stay on course may be strengthened by marriage (want to have some quality time with the wife and show her around the natural and artificial beauties in the country). Another boost might be the birth of a child.

Eventually, the individual may apply for a Green Card through his company. While the card is being processed, there may be other boosts such as buying a house which would further extend the willingness to pursue the eventual dream.

The Green Card (permanent residence) eventually arrives, giving more flexibility to the individual in terms of career growth, which may extend his stay for a few more years. In the meanwhile, the kid(s) may grow up to be young adults. At this point, another reality check happens. Torn between the comfort of the new life and the culture in which he lived (which often may conflict with the culture he currently experiences), he may decide to go back after all. Factors such as economic prosperity in the home country may aid in this decision.

Another check might be the perception (or reality) of a glass ceiling in the work environment - he may feel that he is not getting anywhere in his career and may opt to move back, hopefully getting a more senior position based on his experience in USA.

Alternately, he may decide to stay on and after 5 years, may opt for citizenship. At this point, his 'American Dream' has come true - he has a home, kids, and good income... or, has it?

All this sounds great; some might even say, obvious. However, what about this path hampering the citizens of the developed country, who are otherwise robbed off their own dream because of these newcomers? Does it really hurt them? Why the perception? That's for the next post.

Monday, August 24, 2009

Commitment and Ideas on India

Commitment
So, I've started going to the gym (again!). I should thank two aspects that I have incorporated in my routine for this renewed interest in my health - putting my gym dress on as soon as I get back home and TED.

The first idea was borrowed from David Allen's book - Getting things done. When talking about writing down a list of 'to do' items to better organize your schedule, David emphasizes that it is not just enough to write things down, but you should also commit to what you wrote down by taking a first step on actionable items. As an example, he says that whenever he gets back home, he puts on his gym dress, a first step to going to the gym, as a commitment to the act. I thought it was an interesting concept, and frankly, it is. Every time I put on my gym dress as soon as I got home, I've been to the gym, which brings me to my second aspect - TED.

As I had blogged earlier, I am a fan of TED and try to listen as and when possible. Since watching the video, even if only 20 minutes long, is fairly difficult either at work or after coming home, I downloaded interesting videos to my phone and have started watching/listening to them while at the treadmill - which works great!

Ideas on India
One such video that I watched today was Ideas on India's future by Nandan Nilekani. Nandan classifies ideas into four categories and provides key ideas on each category for a developing nation like India. Here's a quick list:
  • Ideas that have arrived (accepted and implemented)

    • People: from being a burden to engines of growth
    • Entrepreneurs: from villains to role models
    • English: from the language of colonizers to language of jobs
    • Technology: from man vs. machine to man and machine
    • Globalization: from Bombay plan to Bombay house
    • Deepening of democracy: from one party rule to 13 party rule
  • Ideas in progress (accepted but not implemented)

    • Education: universal access to primary schools
    • Infrastructure: connecting the nation
    • Cities: engines of growth
    • Single market: smooth, seamless flow of goods across states
  • Ideas in conflict (not yet accepted)

    • Conflicting political ideologies: policy making gridlock
    • Labor reforms: job protection hampering job creation
    • Higher education: state control or private funding?
  • Ideas in anticipation

    • E-governance: Democracy, technology, efficiency, and transparency
    • Health: avoiding diseases of prosperity
    • Pensions and entitlement: Taking care of the future
    • Environment: Can India's growth be clean?
    • Energy: Driving growth around a new energy model
I think he makes some very compelling and valid points, except some nuances here and there.

While I agree deepening democracy has led to better prosperity, I believe the multi-party system in India is holding India from surging forward as well. In a coalition government like what India has witnessed in the last decade or two, progress literally stalled because political parties were busy fighting among themselves on who can have more power than working together for the betterment of the country. This has even been witnessed in US when one party is the ruling party while the other has the majority in the congress. While I agree that a single party rule is not the alternate answer as it has its own share of problems (especially monopoly), there has to be a middle-ground somewhere.

Similarly, while I agree that cities are engines of growth, I don't think putting more emphasis on the cities than villages is a sustainable solution. With a country having such a huge population as India, the cities rely on the sources from the villages for sustenance. By making cities more important than villages, it's only going to encourage villagers to move to cities, which in turn can reduce the food production, increase dependence on exports, and increase slums in the cities (not all who come to the city realize their dreams, unfortunately). I believe the right balance has to be struck by revamping the agricultural sector by having a more transparent commodity market and by encouraging shared cultivation (encouraging farmers to pool resources and work together so that they can use more advanced technologies for cultivation due to the increased land mass).

I think our 'old' culture, which may be the source of some problems, also holds keys to implementing some of the yet-unimplemented ideas.

The concept of compulsory primary education has been embedded in Indian culture in all its castes by means of Gurukulam (studying by staying at the teacher's - or Guru's - residence and learning till graduation) and apprenticeship (be it warfare, trade, or craft). The problem arose due to the implementation of a western system of schooling without its background. While it may not be practical to enforce the older concepts back (as we have started developing the western background over the years), what might be more effective would be to take some of the aspects of the earlier concepts and applying them appropriately and thereby revamping the educational system in India.

We can also learn a lot from our culture in terms of environment and energy. Indian culture has strong examples on recycling and using biodegradable elements - from 'matkas' (mud pots) used to store and purify water, to 'dhonnai' (cups made of leaf) to serve food. I am sure if we look with a renewed focus, we can find enough and more examples that can be adopted to the new age, while still preserving its fundamentals.

Finally, we don't have to look far on how to avoid diseases of prosperity. At a time when the Western world has taken a new interest in Yoga, India only needs to look inward to ensure a healthy life, while implementing tried and tested Western medicines to eradicate the fundamental diseases.

In all, I'd strongly recommend that you see the video. As Nandan says at the end, it's not just important for India, but for any developing nation and for every developed nation - and this brings me back to my previous title - a strong commitment from the government and its people is needed to help realize these ideas.

Sunday, August 23, 2009

Lord Ganesha and the Super Brain Yoga


Today is Ganesh Chaturthi - the birthday of 'elephant-God' Ganesha, worshipped by followers of the Hindu religion (myself being one of them). Hindu religious festivals are mostly based on the lunar calendar. This one is no different in that the festival is celebrated on the 4th day - (sukla) chaturthi in Sanskrit is 4th day of the (waxing) moon - of the Bhadrapada masa (which is the 6th month in the lunar calendar), which roughly comes mid-August - mid-September in the Julian calendar.

While I tend to be religiously neutral, I cannot but help appreciate and admire the various intricacies and profundity embedded in various religions. Hinduism, probably due to its age, contains numerous nuggets that, when looked with a skeptical (but not cynical) eye, holds a lot of treasures that are relevant even today. It is sad that such important lessons are lost today because most of these symbolisms are taken literally.

Ganesh Chaturthi is one such festival in the Hindu religion that holds a number of interesting symbolisms that are relevant today. Here are a few to my knowledge:

Eco-worshipping
Ancient Indian practices have been amazingly eco-friendly (possibly because plastic hadn't been invented yet!) In temples, food used to be served in containers made of leaf and other plant products, which are biodegradable. In Ganesh Chaturthi, eco-friendliness is taken to another level, where Ganesha being worshiped is made of clay and then dissolved in water once the festival is over, leaving no harmful residue.

The other beauty of this is that anyone with a little bit of clay can create the image quickly and worship Ganesha (Ganesha, by the way, is one of the easiest Gods to draw or sculpt!). This notion brings a level of equality that is seldom seen in other festivals or practices.

Unfortunately, over the years, both these symbolisms seem to have been lost or at least diluted. Nowadays, the size of Ganesha idol constructed and worshiped during the festival has become a status symbol, especially with political parties vying to have a big statue to show their party's affinity to the God. The eco-friendliness has also lost its meaning over the years, with Ganesha being painted in potentially harmful paints that may be water soluble, but not necessarily bio-degradable.

Super brain yoga
Recently, one of my friends forwarded a video in YouTube called Super Brain Yoga. Supposedly based on the works of Chinese accupuncturist Choa Kok Sui, the video shows how a certain action can potentially increase memory and brain power.

What is interesting is that this pose (or exercise), has been associated with Ganesha for hundreds of years. We have been taught as children to perform this 'exercise' a minimum of 9 times whenever we pray to Ganesha. Alternately, this has also been associated with Indian schools as a form of punishment!

While it is sad that neither the video nor Sui's website mentions Ganesha, there are some stronger symbolisms that I could not help but notice.

Ganesha has been associated with education in Hinduism. Moreover, Ganesha has an elephant form. Elephants, as we know, have an extremely strong memory. While I am not jumping to conclusions here, it is interesting that an exercise form supposedly proven to increase brain/memory power is associated with a God who is associated with education/learning and is symbolized as an animal that has strong memory!

I wonder how many other such interesting aspects are there embedded in every religion that has since been diluted or outright dismissed as superstition or blind-faith.

Saturday, August 22, 2009

The inspiration that is TED

Probably around a year back, I was introduced to the website TED (Technology, Entertainment, and Design) via the Presentation Zen blog. I have been hooked ever since. TED is a non-profit initiative whose intention is to disseminate "Ideas worth spreading". They host conferences and make all their talks available for free. The talks also come from other similar conferences as well.



The great thing about TED is the format - each talk is just 20 minutes long (sometimes even less), which is an easily-digestible format in today's world. The talks are given by experts in their area and in many cases, accomplished authors.

I have seen and heard some absolutely inspiring and fascinating talks here and strongly encourage you to take a look as well. It's definitely worth your time. The best way I found to listen to the talks is to download the videos to my phone and then listen to them while at the gym.

You can also subscribe to their RSS.

To get you started, here are my top 5 favorites:
  1. Sugata Mitra - How kids teach themselves. Sugata talks about his experiment where he found that kids can self-learn without much of an external help. This experiment is apparently the inspiration for the book Q&A by Vikas Swarup, which then went on to be made as Danny Boyle's film, Slumdog Millionaire.
  2. Pattie Maes - Sixth Sense. This is an amazing demo (only 8 minutes) where the head of MIT media lab shows her team member, Pranav Mistry's invention that takes social networking technology to an entirely different level. I can see this becoming a reality in the next few years.
  3. Hans Rosling - New insights on poverty. Hans shows how statistics can be inspiring, shocking, and definitely not boring. His passion is extremely contagious. Next time when you generate a report to your boss, think of Hans and how you can make the real statistic pop-out.
  4. Dan Ariely - Buggy moral code. An interesting perspective on why we do what we do. He is also the author of the book Predictably Irrational. He's quite funny and definitely thought-provoking.
  5. Elizabeth Gilbert - Nurturing Creativity. This is slightly different from the other talks. While some may find that her reasoning borders more on the intangible, I tend to agree with her theory, as I've found myself caught in the 'wave' numerous times. A few times, I have missed ideas without realizing that I was in the wave - hopefully I'll be better equipped going forward!
I am amazed at the breadth of the areas discussed and the depth of the expertise of the speakers. It is my hope and wish that one day I will be able to give a talk worthy of TED.

Monday, August 17, 2009

The developer's blame hierarchy

Having worked on a reasonable number of software projects, I come to realize that a sizable chunk of productivity loss is due to inappropriate placement of blame. In a team setting, it is natural to have confrontations and consequently, the mentality to be defensive, even if everyone is working towards the same common goal.

As a result, I developed a blame hierarchy that I normally mandate to my team before the start of a project and ask them to follow the hierarchy before raising the issue further. While it's true that there are some exceptions where the hierarchy fails, it works more often than not.

As per the hierarchy, if a developer finds an issue, the blame should be placed at a step only after clearing all the previous steps.
  1. Your module
  2. Your automated tests (especially if you didn't update the tests when the logic changed)
  3. Your team mate's module
  4. Stable custom framework
  5. 3rd party framework
  6. 3rd party libraries
  7. Network connectivity/Firewall rules
  8. Database
  9. JVM / Virtual Machine
  10. Operating System
  11. Infrastructure / Environment
Failure to follow this hierarchy, mostly because of "My code cannot be wrong" mentality, will result in significant loss of productivity, not to mention irritation, annoyance, and outright anger.

Also note that the hierarchy should be followed only after due diligence has been performed, such as checking logs and looking for error messages.

Saturday, August 15, 2009

How Sun could have made money off Java

I started out my career as a Java developer. While I have branched out to Microsoft SharePoint recently, I still do a lot of architecture and development in Java and consider it to be quite handy.
I have always wondered why Sun could not make money off Java after having come up with such a cool and now ubiquitous software. True, they tried their luck with optimizing their servers for Java and so on, but none ever stuck and they have ultimately got themselves acquired by Oracle.
Recently, I started working on a project that essentially is a desktop application (Swing components) with Webstart as the deployment mechanism. I have used JGoodies intermittently for creating rich layouts before and got a chance to use it more thoroughly this time around. As a quick aside, JGoodies is an extremely well-written library and makes your screens look a lot nicer. Combined with a professional tool like JFormDesigner for visually editing the screens, I was able to cut down my design time from roughly 2 hours to 10 minutes!
While I was developing the application, I was able to think of two ways in which Sun could have really leveraged its expertise and thought leadership around Java without irking the open-source community that it has come to rely on so much.
Meta-libraries
First way in which Sun could've made quite a bit of money is by developing a set of higher-level libraries and selling them commercially at a moderate price. For example, developing database applications and managing objects in Java was cumbersome at best until Hibernate and Spring frameworks came into the picture. Sun could've come up with such high-level libraries on top of the core language and sold them commercially. Even now, Swing is relatively bare bones in nature and you have to do a lot of plumbing before anything meaningful is accomplished.
Ideally, if Sun had created such meta-libraries around various scenarios (such as database, desktop, web, etc.) and had developer and commercial licenses (say, $10-$20 for developers and $100-$200 for enterprise deployment), it could have formed a great revenue stream. Optionally they could have milked some more money for any major upgrades (say, from Java 5 to Java 6). I think these price-points would've been more than acceptable for both developers and companies. The core libraries and JVM themselves would still be free and available for all those who want to start from scratch.
Marketing via App Store
Recently Sun released the Java App Store taking cue from Apple and after sitting idle for almost a decade. The App Store is based on the Java WebStart technology, a core component of the Java Runtime Environment that has been around pretty much since the beginning (around 1999, I believe). WebStart is probably the most under-appreciated concept within Java, thanks in part due to the Internet boom that happened soon after its release.
Essentially, WebStart allows you to deploy Java applications via Internet on to your system without needing any .EXE files. Better, applications deployed via WebStart are Java applications that are handled and run by the JRE in the client computer and hence, can be run on almost all platforms that have JRE (which is pretty much every OS out there).
Sun could have used this technology to build an eco-system around the Java technology while marketing the virtues of the language more successfully. Eventually they could've built premium services around the app store creating another revenue stream.
Oh, well!

Transformation complete - Windows on Ubuntu

As I had blogged a couple of months back, I installed Ubuntu 9.04 on my server and have been quite happy since. The system is very stable, I get all the applications I need for free and don't have to worry about updating them (Ubuntu shows me updates periodically for all applications installed through its package manager - like Windows Updates) and have no dearth of functionality.
However, I still had my Windows installation on another partition - just in case - because, much as Ubuntu is cool, there are still a few applications that need Windows, and my wife hasn't warmed up completely to Ubuntu due to occasional hardware glitches (mouse stuttering for example).
Today I was generally browsing through the applications available via the "Add/Remove..." option in Ubuntu and came across a little piece of heaven called VirtualBox from Sun.
In the Windows world, the one application that I used fairly often was Microsoft Virtual PC. I believe it's one of the better products from M$ and more importantly, it was free. With Virtual PC, you can install any other OS to run 'virtually' on Windows, such as Ubuntu (although it had its issues).
VirtualBox is essentially Virtual PC for Ubuntu, only an even better version. It installed in less then a minute. Then I created a simple Virtual Machine and a Virtual Hard Disk using a fairly familiar user interface, pointed it to my Windows ISO image, and lo and behold, I had a Windows XP running on my Ubuntu in less than 20 minutes. Ironically, I felt XP installed faster on VirtualBox than even on Virtual PC - and the start-up time is roughly 10 seconds!
With this, I think my transformation to Ubuntu is finally complete, with the last piece of the puzzle tightly in place. Now, I can have Ubuntu and Windows harmoniously running. Even better, with Ubuntu's multiple desktop feature, I can simply full-screen Windows XP on another desktop. With that, all I have to do is to flick my mouse to go back and forth between the two OS.
Now, that's what I call comfort!

Friday, August 14, 2009

Hybrid Government

Here's an open-source idea that I am more than willing to donate to anyone who wants to implement it.

Of late there has been a lot of interest in renewable energy sources, more due to the sudden spike in gas (or petrol, as it's called in India), than due to any major concern about the environment.

Coming from India, pollution has been a part and parcel of my life, and so was fresh, clean air when I was young. When I went back to India from US for the first time (after 3 years), Bangalore and Madras suddenly seemed way more polluted and Bangalore more than Madras. I guess it's probably due to the sudden IT boom, resulting in elevating a number of folks to the upper-middle class sector, and consequently increasing their spending on vehicles that consume gas.

While politicians wax eloquently about how citizens should mind their carbon footprint and help the world, they seem to have ignored a carbon giant that they can control - the mass transit system (which includes taxis and buses).

To me, a citizen-based carbon-footprint is good, but is not necessarily the best solution for the following reasons:
  1. Normal usage of personal transportation is much smaller in a day compared to a mass transit system, which typically runs for almost the whole day.
  2. People tend to take better care of their own vehicles, such as constant maintenance, better gas mileage, etc. while the care is relatively less for a government-owned vehicle.
  3. People, while they tend to travel mostly near their locality, occasionally take a longer trip that needs more speed and significant refueling.
  4. Not all individuals can afford the relatively higher costs of owning a hybrid vehicle (at least not now)
On the other hand, a government-owned, sponsored, or subsidized mass transit system is a more controllable entity that can do with a lot of improvement.

I would argue that you can save quite a bit of the environment if the taxis in New York or the autos (kind-of like 3-wheeler coupes in India) are fitted with a hybrid engine, as they satisfy all the criteria above.

If you want to start a company, here's an idea: Create a hybrid engine that can be easily retro-fitted to existing taxis or autos at a reasonably affordable price. The resultant product can potentially be sold to multiple cities and hence can generate a reasonable revenue stream. If the government can be convinced, then you can always hope for some subsidy and even a portion of the initial investment - provided the government is interested and willing. Probably there-in lies the key.

Tuesday, August 04, 2009

Traffic Sniglets

On my way to office, I was stuck in traffic and was going slow. My mind started wandering around and landed up on Sniglets. Sniglets, a word coined by American comedian Rich Hall, means a word that does not appear in the dictionary, but should. My uncle (more like my cousin) showed me a book when I was probably in my 8th grade or so and I found it to be extremely fascinating.

While the intent of sniglets is mostly humor and dry wit, I think there is a lot of truth in it also - why do most of the actions/mannerisms we experience in the day-today world not present in a dictionary? Goes to show that there is a lot of scope in a language still!

Here are some samples I pulled from the Internet:

  • Bleemus (blee' mus) - n. The disgusting film on the top of soups and cocoa that sit out for too long.
  • Crummox (noun) - The amount of cereal leftover in the box that is too little to eat and too much to throw away
  • Laminites (lam' in itz) - n. Those strange people who show up in the photo section of brand-new wallets.
  • Phistel (fis' tul) - n. The brake pedal on the passenger side of the car that you wish existed when you're riding with a lunatic (or wife!).
Back to traffic, here are some I thought of, while waiting for the traffic to ease.
  • Blancoslug (blanko slug) - n. The big car/van that goes slowly in front just when you get into a lane with solid lines (so you can't cross)
  • Biggaslug (bigga slug) - Bigger the size of the car, slower it goes in the left lane (and does not move to the right).
  • Rubbaslugger (rubba slugger) - Person who slows down due to an accident on the other side of the road, even if he can do nothing about it, but congesting the traffic on his own side as a result.
As you can see, the running theme is drivers slowing down for apparently no reason!

Indexing Traffic and Transportation

Here's one more Index card (inspired by Jessica Hagy's Indexed).

I think the trend is mainly due to the following reasons:
  • In US, rules are more strictly adhered to, especially by truckers and hence they tend to stick to the speed limit (mostly). In India, while all the rules are there, enforcement is less, and more importantly, the punishment for violation is minimal.
  • Tata Nano is (as of now) purchased by middle-aged, middle-class folks who can finally afford a car. Hence, they tend to be more conservative in driving.
  • Hyundai Santro and the like are the preferred choice for BPO/IT folks, who tend to by 20/30 somethings and hence the speed is more.
The beauty is that all the three points (and more) can be simply expressed in the diagram - that's the power of visual thinking.

Here's another one.

Saturday, July 25, 2009

If only we learned from our past - Vishnu and Darwin

There is a famous quite by a Spanish philosopher George Santayana - "Those who do not learn from history are doomed to repeat it" - very true indeed. We humans seem to have a penchant to not learn from our past experiences, and more importantly from those of others - be it our daily lives, or our civilization. In most cases, we tend to ignore some very interesting thoughts that were penned by our ancestors, discounting them as ancient, irrelevant, or useless.

A prime example is a concept that is engrained in the Hindu religion, called the 'Dasavataram of Vishnu' or '10 avatars of Vishnu'. Vishnu, in Hindu philosophy is the God of protection and is one of the three primary deities (trimurthis) - Brahma (Creator), Vishnu (Protector), and Siva (Destroyer).

The thought is that Vishnu, being responsible for protecting beings in Earth, takes an appropriate form (avatar) once a while (usually once a 'yuga' or epoch) to provide guidance by example. The 10 avatars of Vishnu has been documented heavily in the Hindu scripts - I don't know how far it dates back, but have at least seen them in sculptures that age back to 1000AD and potentially beyond.

What is most interesting to note is that the 10 avatars of Vishnu coincide with Darwin's concept of evolution - ages before Darwin came up with the theory. I was first made aware of the connection when my brother wrote an article on it a few years back. Here are the 10 avatars, their symbolism, and my interpretation of the symbolism.

Source: http://commons.wikimedia.org/wiki/File:Dasavatar,_19th_century.jpg

1. Matsya
Fish
Aquatic (first species to evolve on earth)

2. Kurma
Tortoise
Amphibian (movement from the ocean to the land)

3. Varaha
Boar
Land creature (proper evolved mammal on land)

4. Narasimha
Half man, Half lion
A combination of man and beast (symbolises the transition from animal to human)

5. Vamana
Child
Child (Starting signs of intelligence and thought)

6. Parasurama
Plough-wielding man
Farmer (Starting of agricultural evolution and use of Iron)

7. Rama
King (with bow and arrow)
Fully evolved human (Use of bow and arrows, Evolution of governance)

8. Krishna
King (and peacemaker)
War and Peace (Evolution of politics)

9. Buddha
Saint
Peace (Establishment of a peaceful system. Emphasis on current life instead of moksha)

10. Kalki
Man on horse
??? (supposed to take form by end of this current epoch - in some sense signaling apocalypse and facilitating humans beyond the apocalypse)

As with any interpretation, you might say that I am fitting a theory into facts than the other way around, but I feel that the coincidence is just too strong to dismiss it as mythology. I wonder how many other such concepts are hidden in the earlier scriptures that we have discounted as mythology or paganism.

Also of interesting note is that out of the 10 avatars, only 3 are exclusively worshipped (Rama, Krishna, and Buddha - all of them in the most recent epochs) and 2 in some areas of India (Narasimha and Varaha), while the remaining 5 are more of historic interest.

A head nod to Indexed

A few months back, I was looking at books on visual thinking, inspired by Garr Reynolds' Presentation Zen and Dan Roam's Back of the Napkin and came across Jessica Hagy's Indexed.

At that time, while I found the book to be fairly intriguing, I didn't find it directly applicable to what I was looking for, as it did not have any instructions on how to be a visual thinker. Nevertheless, I put her blog in my Google Reader.

After having had a good background on visual thinking, thanks to the books I mentioned above, I look back and see the subtlety and depth in Hagy's diagrams. I am amazed by the level of creativity she has and the seemingly effortless way in which she can portray complex concepts in a simple x-y chart or a Venn diagram.

I thought I might as well make an attempt in creating such an index myself and here are a couple that I could think of.



I have been having interesting discussions with my Dad about religion and spirituality. He has his strong views, him being a devout religious person, and I, mine, trying to find a balance. While I won't call my diagram accurate, as the topic tends to be subjective in nature, I could see how creating a simple diagram can at least make thoughts a lot clearer and much more easy to understand. No wonder they said that a picture is worth a thousand words! It truly is.

Thursday, July 16, 2009

Performance Tuning in Java

Recently, a friend of mine asked me on how he can improve performance in an open-source Java application that he was working on. I was reminded of the past (i.e., circa 2003) when Java was being bashed for poor performance and when a number of books were written on improving performance of all most all parts of Java.

While it is true that an application running within a container will be naturally less performant than a native application, the question one should ask is whether the optimal performance they are getting is good enough for them, as opposed whether it is the best. When it comes to performance, in most cases, 'works for the situation' is more useful than being the fastest horse in the racetrack.

Coming back to the issue in question, I think there are some basic steps one can take to drastically improve the performance of a Java application with relatively minimal effort. In this case, the application was a data extraction tool that was writing thousands of small (1 - 5KB) XML files. Based on this, the following recommendations can be provided.

JVM Garbage Collection parameters
If the size of the XML is small, it is reasonable to assume that the application may be using DOM instead of SAX. As DOM is an in-memory XML model, it would create a lot of objects that live for a short period of time.

By default, a JVM has two parameters - Xms and Xmx, which is the minimum or start-up memory the JVM will use and the maximum amount of memory it can possibly use (beyond which an OutOfMemoryError will be thrown). By default, Xms parameter is around 40MB to 64MB for Windows systems and the Xmx is around 128MB - 256MB. The JVM would start with the Xms memory and if it hits the limit, will then keep increasing the memory till it reaches Xmx value in steps. The problem is that this incremental increase comes at a performance cost, especially if you start really low compared to the needs of the application. If you have a reasonable idea of your application's minimum memory requirements, or if your system has enough memory to spare, it's a good idea to boost this to a much bigger number.

In this case, the numbers were boosted to 512MB for Xms and 1024MB for Xmx. Additionally, it is a good idea to increase the -XX:MaxPermSize value from the default 32MB to a more respectable 128MB or even 256MB (which was the value used in this case).

Once these changes were done, the application, which took 1 hour 15 minutes to run, went down to 28 minutes - and all without changing a single line of code!

Choose your OS wisely
The second improvement came not within Java, but outside. This particular application was creating around 300,000 files under a single folder. Windows typically does not handle huge file volumes nicely within a single folder. The optimal value seems to be somewhere around 2,000 files. UNIX based systems on the other hand, have no such issues.

The application, thanks to Java's portability, was moved to a UNIX based system. The running time went down from 28 minutes to 13 minutes - again without changing a single line of code!

There are a number of other tweaks that can be made, and most without changing the actual application itself - hopefully for another blog down the road...

So, the bottom line is, don't blame the language/library without spending some time to fine tune the performance - more importantly, sometimes it just takes a few minutes of effort to make a big difference.

Friday, July 03, 2009

Using Critical Chain for software projects

Earlier, I had posted how the concept theory of constraints (ToC) can be used for effective offshore communication. Those familiar with ToC might wonder why not apply the Critical Chain methodology, which is a project methodology offshoot of the ToC, for the entire software project itself. I've seen this implemented in some companies fairly rigorously for software projects and think that it's a great idea, but with a few caveats.

Critical Chain Methodology
First, a quick primer on CCM. The project methodology that most of us are familiar with, thanks to Microsoft Project, is called critical path - where the time needed to complete a project is based on the longest sequence of events. The focus in this methodology is on tasks and their schedule. Any unknowns are typically factored into each task by means of a slight buffer. For example, if a task would take 2 days to complete, it's typically calculated as 3 days, adding 1 day for potential delays or distractions.

On the other hand critical chain methodology focuses on the resources involved in the project and on the longest chain of resource constraints that would be need to complete a project. The concept is quite good and has been reported to help projects get completed 10% - 20% before the estimated date.

The primary difference between the two is that with critical chain you pool the buffer time for each task rather than include it with the task itself. So, essentially, the schedule is created based on the 'pure' time needed to complete a task (called 'focus' time) and not on the 'buffered' time. All the buffers are then pooled into a 'project' buffer (at the end of the project) or a 'feeding' buffer (at the end of each chain of tasks). Thus, you don't essentially say you'll complete the project at a certain date, but rather within a range, where the end date equals the date you'd calculate using critical path.

The catch - Consultants and Offshore teams
This all sounds good. So, what's the catch? If your project is completely onshore and does not use any consultants, then there is almost no catch. The concept works very well once people are trained to understand the methodology -which is crucial to the success of the project. The methodology itself has its roots in manufacturing, where these assumptions are mostly true.

The problem comes when you introduce either consultants or offshore teams, which is mostly true in case of software projects. As I mentioned earlier, CCM is a resource-based methodology and hence, has a strong emphasis on the resources and their linkages. When offshore teams are included in the mix, the problem arises due to time difference. Since the project plan itself is time-based and on dependencies between resources, it is difficult to capture the dependencies incorporating the time difference as well. While this is not impossible to capture, it just needs a bit more planning than usual to include this. This is in some sense true even for Critical Path plans, but becomes a bit more apparent here due to the emphasis on resources.

The second issue is when you include consultants. In CCM, resources would constantly shift tasks based on what is more important at a given point in time (as the critical chain would keep moving depending on the constraints at any given day). This is fine if all the resources are part of the same company.

However, let's say you have one consultant and one employee working on two dependent tasks. If the employee decides to move to another critical task for a day or two and not worry about the task that the consultant is dependent upon, what should the consultant do for the two days? Therein lies the issue. Ideally, you have to pay the consultant for sitting around because he's just dependent on another resource, but it may be hard to digest for the sponsor and the knee jerk reaction might be to ask them to do something 'useful', which may in turn, affect some other activity. This becomes more complex when multiple resources and projects are involved.

The other issue on the consultant's side is to create an invoice for the project. Usually, project plans are created where resources start low, ramp up, and finally ramp down close to launch, so as to minimize the overall cost of the project. This is fine as long as the project length is fixed and you know roughly when to on-board or roll-off a resource. However, with critical chain, the project timeline is a range and is not fixed. So, you'd have to create a range in your invoice potentially with an 'early completion' bonus or something similar, because you won't be sure exactly when to on-board or roll-off resources. This becomes messy when some high-value resources are in demand on other projects that don't use Critical Chain.

So, the bottom line is that Critical Chain is a great methodology and one that works really well. However, when brought into a software project, the three constraints - 1) consultants 2) offshore team, and 3) training (for both employees and consultants) must be considered before implementing it. Otherwise, you'll have a lot of headaches.

Three Box Principle

As a software architect, my primary job is to define an architecture, framework, or a platform for my clients. The expectation is that the framework or platform will be generic, modular, and flexible as soon as it's created. It does not work that way.

For the sake of this article, I'll use the term 'framework' to define frameworks, architectures, and platforms and the implementations you would do on top of them as 'applications'.

When I started my career as a software consultant, my first gig was at Bell Labs - the famed R&D wing of Lucent (now Alcatel) technologies. As a young Java programmer imbibed with GoF patterns and other similar literature, I was ready to spit out architecture all around me! When I attempted one such 'framework' for the project I was working on, I soon realized that my framework was not as flexible or as modular as I had hoped it would be.

One day, while sitting at the library in Bell Labs, I came across a book (or article) that talked about the three box principle. The principle essentially is that it takes at least three attempts or revisions to make a framework generic.

I have attempted to reproduce the principle in the diagram below.

The principle has an important corollary - "You cannot build a framework without building sample applications that utilize or implement the system." Most IT teams tend to create an "architecture" team who would create architecture by considering the overall goal of the company and then impose it on the applications used within the company. Such elitist attitude is doomed to fail, as it does not consider the ground realities of the applications and eventually the maintainers of the applications will tend to find ways to circumvent the architecture rather than use it, beating the purpose of the architecture in the first place.

In contrast, the best way to build a framework is to work with the applications, including them iteratively while developing the framework itself, which is what the principle suggests.
By the principle, in the first box or phase, you pick one or two candidate applications and build them. At this point, you are not worried about the framework. You are just developing the applications with a vision of the framework in the background, but not really doing anything conscious about it. This phase should then be deployed and field-run for at least a few cycles (months, weeks, etc.)

In the second box/phase, you pick few more applications and try to add them to the first set of applications. At this point, some patterns will begin to emerge due to the commonalities between the applications. You still don't consciously build the framework, but rather refactor the common libraries and features so that they are more modular. You might end up following principles of inversion of control around this time. By this time, you would have also seen the feedback from real customers and noticed the pain points of the initial applications and would adjust the features accordingly.

In the third phase, you add some more applications to the system. At this stage, there will be enough common functions/features that you can modularize further and see a much stronger pattern that would enable you to separate out the framework and setup the applications on top.

I have personally seen both sides of this principles - the success stories when this was followed and the failures when it was not. So, next time when someone asks you to build a framework, try to set the expectation that frameworks are more like a pastry from a master chef rather than a frozen microwave dinner. It takes time and multiple tries to make the end-product perfect.

PS: I believe the book I read was Implementing Application Frameworks by Mohammed Al Fayad, although I couldn't find a reference in the book. Maybe it was an article from the same author - I am not sure. If anyone has read this article, I would greatly appreciate it if you can drop in a comment with the right source.

Friday, June 26, 2009

The big red blob

After a bout of flu and some hectic schedule, it's good to get a short break - intentional or unintentional...

It was an interesting junction of events today - My flight was hopelessly delayed due to weather and I was getting restless, and I was reading Getting things Done by David Allen, reading about productivity and in some sense, time management. In the middle of it all, I looked out the window and saw nature in its usual glory and a poem popped out of my head.

As I look out the plane's window,
I see The Big Red Blob...
Bathing the ground in its amber glow,
Reflecting off the rivers that flow,
Oh, how I wish that time would go slow.

I believe that a good poem is not one that has flowery words or sophisticated rhyme, but one that is a reflection of true feeling - and in the midst of all the 'wasted' time, I did wish that time would slow down for me to take in the scenery a little longer.

As I think a bit more (not a good thing for a poem), it feels better as a Haiku...

Plane on the runway
Waiting to depart
"Getting things done" in my hand
Waiting to be read
Sunset outside the window.