Sunday, December 8, 2013

Search of beauty in letters and code - Vikram Chandra’s Mirrored Mind

My reading of English fiction as well as non-fiction isn’t great and I had never heard of Vikram Chandra. But a chance reading of Vikram Chandra’s interview in Indian Express supplement made me buy this book called “Mirrored Mind – my life in letters and code” and read it immediately. He is a famous, critically acclaimed writer that worked as programmer in the past, kind of thing I aspire for.

Mirrored Mind is a semi-autobiographical and researched account of both the passions (writing and programming) of Vikram Chandra. He starts by explaining how both the fields coincide and how programmers claim their profession to be an art. He then takes us on short trip through history and culture of programming, elaborating on how differently that culture is viewed in America and in India.  

Language is core to both programming and literature. Sanskrit, nowadays considered to be most appropriate for programming as well, is brilliant case to consider. Drawing on accounts from ancient Sanskrit philosophers and aestheticians Anandvardhana (820-890) and Abhinavagupta (950-1020), Vikram Chandra explains the (difficult but not impossible) process of enjoying a work of art (i.e. poetry) and related aesthetics. He tries to relate that with coding that programmer does and how it should suggest things beyond flexibility, maintainability etc.

In between, Vikram Chandra also gives us historical perspectives of philosophical depth of tantric culture in India that existed before westernization, its vilification and (sort of) annihilation by westerns, loss of rich Sanskrit heritage, westernization of Indian culture etc.

Book spans various fields, touches various topics, provides lot of references and made a wonderful reading. Chapters on aesthetics did seem bit abstract and difficult for un-initiated reader like me, but crispness of Chandra’s writing kept things understandable and relevant.

To speak aesthetically (taking inspiration from the book itself), reading of this book reverberated inside me with Adbhutam rasa. I might not be able to explain what that means exactly, because as writer says, to experiencing work of art (in this case reading book itself) is best way to enjoy it.

To say the least, this book has indeed provided me lot of motivation to study further and also renewed sense of pride in my profession of programming.

Saturday, July 21, 2012

To OOP or not to OOP

My original objective was to just check what best ORM solution is currently for Microsoft technolgoies, then find out a good sample and customize it for my purpose. I stumbled upon number of articles. Notable amongst them were: “Object-Relational Mapping is the Vietnam of Computer Science” and “Why Objects Suck.
These articles, even if old, seemed relevant to me. It took whole lot of time to read them (incluiding referred and linked articles) and understand. Especially the Vietnam analogy article by Ted Neward takes lot of patience to read (but its interesting anyways). 

I thougth its worth writing about my learning after having read so many things.

First of all, object oriented programming is not a magic silver bullet. There is literally a war going on between proponents and opponents of OOP. Summary of opponents’ opinions is:
  • OOP makes things complex for simple stuff
  • there is insufficient justification to use it on real world problems given the frequent requirement changes (reworks in inheritance etc) and,
  • problem of OR mismatch impedance is too difficult to get away with in real world domains  
Of course, proponents have their own views along with favorite languages and tools that solve problems for them. But I felt opponents had stronger and generalized voice.

Secondly, OR mapping is really stupid thing to worry about. It is matter of choice and comfort of programmer. Now, I am really doubtful that people in our team are using either object orientation or OR mapping techniques (be it LINQ or ADO.Net or NHibernate) that extensively. However, as a group lead of programmers working on different applications, I need to make sure that there exists common understanding between the team and code is written is such a way that it can be transferred to other developers easily. Moreover, given the nature of data centric outputs demanded out of applications that we develop, sticking to relational philosophy seems more appropriate.

Finally, to work in OOP fashion or not is most often the matter of technical consensus within team or the authority of architect or tech lead to drive it.

Lastly and frankly speaking its really unjust to decide programmer's (whether fresh or inexperienced) ability based on his knowledge of OOPs concepts and unfortunately I still hear interviewers reject candidates based on this premise.

Friday, July 20, 2012

Indefinite existence - a stretch of imagination

Sometimes I fear the idea of death or in general, non-existence. Why do I have to cease to exist? Why can’t I live or exist indefinitely? Every time I thought about it, I found myself stuck. So I decided to try thinking other way round. What if I started living indefinitely?

Ok. Let’s stretch the imagination that I start living indefinitely. Either I would be alone living indefinitely or everybody would be living indefinitely.

If I am alone, it would be miracle of nature. Even if it is a miracle, I still would be subjected to that weakening of body due to old age. I wouldn’t expect reversal of age that happens in curious case of Benjamin Button. So let’s imagine somehow my ageing stops. My body cells keep on replacing each other periodically. But socially and personally I would be only one of my kind; becoming envy of others. People would keep on dying around me; my loved ones, my near ones and dear ones everyone will be gone. That would make me very lonely in world that remains, irrelevant, unknown and sort of cast away.

Moreover, I’ll be subject of intense investigation to medical fraternity. They would want to know exactly what’s happening with me that holds my age in time. That would take my privacy away from me.  Doctors would appeal me to share and subject myself to medical investigations in the larger interest of society. They would want to know what makes me immune to ageing. Important assumption here is that I would also be immune to other diseases as well. That pretty much means my life wouldn’t be normal at all. I will be so famous that I wouldn’t be able to lead normal life at all. I would be subject to constant curiosity, jealousy and may be hatred.

On positive side, I might try to contribute to humanity positively by doing something constructive like writing stories or making films or by adopting newer ways of life one generation after another. Last part of adopting newer ways of life seems bit difficult. How will I make myself behave normally given so many changes around? If I want to behave normally, I will have to disguise myself and try and act like whatever generation that might be. Even if I manage that well enough wouldn’t that become a boring routine? In the end, I might get frustrated with that act of getting myself accustomed with changes around and I would want to retire in my own shell and privacy. And there will be huge cost of my privacy given the medical interest in my “condition”, which could be affordable only with sacrifice of some part of privacy and normalcy itself. What a pity that would be?

If, on the other hand, due to advanced medical research, everybody starts living indefinitely, there would be huge problems in the world. World wouldn’t remain as it looks today. There would be population explosion. Moreover, after some time, this immortality will be considered as costly privilege given the increasing cost of living. Only few would be able to afford it and that too only if they can earn it. That means one who chooses to live indefinitely must have unlimited wealth that remain constant. And he will have to work pretty hard to keep that wealth constant.

So, there would be huge competition in generating wealth and using it to remain immortal. Assuming that immortality solution is also unlimited (something like manufacturing that medicine from air and water), there will be lot of companies or corporations providing that solution and cost of solution will keep on increasing given the increasing demand for it.

Governments would impose huge taxes on immortality. There would be abundant thieves who would steal or manufacture themselves that immortality solution. And after some time society and government would be compelled to make laws to terminate such people who illegally try to remain immortal.

Socially, relations between older and newer generation would become defunct after some age. Every family will have 10 or 15 aged people surviving with that immortality solution. Everyone would become selfish in keeping himself or herself alive. Newer births would become lesser and lesser.

It is really difficult to imagine the world where solution to immortality exists. World would be grand chaos, not at all fit to live in.

So miraculous but tiresome life of intense scrutiny devoid privacy versus a grand chaos are the only possibilities of becoming immortal. There is really no point in living either of the worlds. Nature has excellent mechanism of recycling. Point worth trying is experience oneness with nature. Understanding nature… how hopeless that word “understanding” seems. “Experiencing oneness” that’s the only phrase that I feel is worth living or existing for. Only then I might find some freedom from that fear of non-existence.

Saturday, April 7, 2012

Vikram and Vetaal

Quite a few times, when someone calls “Hey Vikram”, he or she unknowingly adds “so where is Vetaal”. Such deep rooted is connection between Vikram-Vetaal (or Baital) in minds of Indians. Thanks to Chandamama (originators Chakrapani and Nagi Reddy to be precise) and Ramananda Sagar’s TV serial “Vikram aur Vetaal”, every average Indian tends to relate Vetaal with Vikram.

As avid reader since childhood I was also fascinated by stories in Chandoba (in Marathi or Chandamama commonly). Vikram-Vetaal stories made regular appearance in it, but I never cared to check their origin. Now that curiosity had dawned upon me, I started searching. I checked with some literature-fan friends but without success and then googled it.

Originally called “Baital Pachisi” they are compilation of 25 Sanskrit stories attributed to Somadeva who compiled katha-sarita-sagara (ocean of stories) in about 11th century based on earlier traditional stories.

King Vikram (or Vikramaditya) is historically dated back to 1st century BC as ruler of Ujjain (currently in Madhya Pradesh, India).

Story in brief is that king Vikram is asked to capture Vetaal by a tantric. After lot of struggle Vikram was successful in capturing Vetaal. On their way out of forest Vetaal started telling stories that posed some moral or practical question at the end of each story. Condition was that Vikram should not speak. But Vikram answers the question out of ego and Vetaal went back to his forest tree in protest. This pattern of capture and release continued on 24 occasions. Hence its collection of 25 stories (pachisii). Various versions portray conditions or restrictions on speaking differently. It would be interesting to read all the stories.  

Some interesting things that I found are:

-          Katha-sarita-sagara (Vikram - Vetaal stories) stories were compiled for the entertainment of queen Suryamati, wife of king Anantadeva of Kashmir.

-          According to some Hindu mythology, Vetaal is regarded as brother of goddess Shantadurga of Konkan. Some temples of Shantadurga also have temple of Vetaal alongside.

-          Vetaal is also considered head of all the spirits and ghosts. His more intense variation is agya-vetaal (or agni vetaal, who carries flames in head)

-          Richard Burton and Isabel Burton, who exposed Vikram-Vetaal stories to Europeans, called vetaal as vampire in their translation. Interesting!!

-          One literature teacher tried to cite Vetaal as one of the inspirations of vampire of Dracula stories alongside East European folklores.

-          Another guy, in his blog, has compared them to MBA case studies as case studies also have questions at the end. Not so interesting!!

Ok. Diving deeper in thoughts, why was I searching for Vikram - Vetaal stories’ origin? I guess, I was interested in story telling aspect of those stories. I started wondering why and how come Vetaal told those stories. Probably, this question is irrelevant. In essence Vikram - Vetaal stories are just stories that are deep rooted in traditions and passed on from generation to generation since very ancient times.

Last story in the original set that stumps Vikram is an interesting one. Father and a son, in the after-math of a devastating war, find the queen and the princess alive in the chaos. They decide to take them home. In due time, the son marries the queen and the father marries the princess. Eventually, the son and the queen have a son, and the father and the princess have a daughter. The vetala asks what the relation between the two newborn children is.

I find that very interesting!! So, even very old Indian tradition could imagine the relationship tangle arising out of fatal attractions that defy social norms. I remember someone (proud of Indian tradition) citing such story with Americans as immoral excess of Western culture. What a misunderstanding!!!

(P.S. This quest of Vetaal informed me about various personalities starting from Vikram, Vetaal, Somadeva, Bhavabhuti, Richard Burton, Isabel Burton and gave me glimpses of their lives)