Sunday, December 15, 2013

Software troubleshooting "at source"

The title of this post is inspired by the Indian tax department's primary mode of tax collection -  "Tax Deduction at Source" commonly known as TDS. The word source takes the meaning of "point of origination" and shouldn't be confused with source code that software is built with. 

In his book "The Road Less Travelled", the author Dr. Scott Peck narrates an interesting experience. I don’t remember the exact details and the context where it was used but this is how it roughly goes. One a busy day morning, Dr. Peck's car refused to start. The author is by no means a car "expert" and more importantly he had scripted a mental block inside him that solving such problems are beyond him. Yet, on that particular day he decided to give a shot and find out what is wrong. He applies his time and his common sense to identify the problem and goes on fixing it. The decision to take quality time to look at the problem ended up solving it! He overcame something that would have otherwise damaged his day and in the process he found out an important natural principle. Solving problems in life may require only common sense for most of it and one has to apply his time to do that.

All of us face problems. Problems could pop up during our work or outside. To which we seem to have an innate tendency to react with frustration. If a gadget doesn't work, we get frustrated or sad, bang the keyboard with our heads or throw up our hands in the air. We form typical defence mechanisms to justify the frustrations. Some of them are like, "I don't have the expertise", "this is not in my domain", "I don't have the time and I am supposed to be doing something else". The emotional reaction to the problem typically makes solving it more difficult. How about just stopping and thinking briefly about the problem at hand and decide to spend some time in solving it? Our elementary knowledge of science, "time" and the gift of intelligence should suffice. Studies suggest that at least 50% of the issues can be solved this way. (Well, I made the figure up but I hope you agree with what I am getting at.)

Software now is a major part of our everyday lives and like life, software also has no scarcity of problems! The natural principle of problem solving mentioned in the above story applies to software problems just as much.

Generally, the person who is most affected by a bug, the biggest stakeholder in it is the one who finds it in the first place. The onus on making others understand the bug is primarily their responsibility. To communicate the problem well, it has to be defined well and this requires time, effort and energy. Looking at the problem carefully and some preliminary investigation might lead to a solution and even if it doesn't it could give valuable leads to the person who attempts to solve it for you.

There is a general misconception among software users that what they invest in troubleshooting bugs is not worth it and that those are someone else’s problems to solve. There is nothing farther from truth. Troubleshooting is a life skill and not a single moment of time that you invested in it is ever wasted. If you start exercising the troubleshooting "areas" of the brain on one part of your life, these "areas" get efficient on all others. You will be astounded to see how much difference you can make to yourself and others if you start enjoying the process of troubleshooting. It helps in the long run; I can assure you, the world will never run out of demand for problem solvers.

This is the premise of a talk that I intend to develop on the topic of “Troubleshooting at source”. In addition to a detailed argument to change the attitude of software users as outlined above, I intend to cover some key techniques that we software developers use to identify problems and fix them.

Tuesday, November 12, 2013

Why install Smartphone Apps for commonly used web applications

It is common for newbie smartphone users to access Social media and other web applications with the built-in browser. My brother was one of them and the other day he asked me why most of these web applications keep on suggesting users to install the equivalent smartphone apps for faster access. He was finding the gentle prodding that Android does before installing apps a bit intimidating and thus had reservations about installing apps. I prepared a rather lengthy response with the intention of creating a blog post out of it. Here is a copy-paste of it.

"Web sites of the olden days were typically more static compared to the high amount of interactivity that current web applications offer. Think of relatively static pages like hotmail and yahoo of the older generation and compare that to something like Facebook. Web applications of those days were written for browsers alone since there was no other way to access them. In browsers in a typical PC, there is no dearth of screen "real estate" to display data and the entire keyboard and mouse were available to input data and so websites were designed with no input or output constraints in mind.

Before the advent of smartphones in a big way with iPhones and Android, there were an intermediate generation of phones which could access data through slow speed data networks set up by the mobile phone companies. The web developers at this point realised the difficulties users have in viewing their websites in the small screens of mobile phones. To address this, they started developing versions of their websites which look better in small screens. And then when you access www.yahoo.com from such a phone, the web application will redirect you to m.yahoo.com behind the scenes which is a version better viewed in a small screen. Thus the industry evolved a solution for the screen "real estate" problem to a large extent. 

The era of smartphones brought in a whole new set of input options (Like touchscreen and software keyboards). It was coincidental that web 2.0 applications which are much more interactive started emerging at the same time. Mobile versions of existing websites were no longer enough for users of web 2.0 applications who also had much more capabilities in their hands now with their smartphones. Apple and Google understood this and exposed controls to their devices through Application Program Interfaces (APIs) to the developer community and brought in the paradigm of "App Stores" for software content delivery. With this new ecosystem, original web application developers got a new option to customise and optimise the entire user experience for their web applications. In other words, they started using the specific options given by the iOS and Android platforms to make input and output easier using customised "Apps". Instead of using a browser available with the platform to open a website and access/manipulate data there in microscopic fields, you can access the same data using an App. The App for a particular website makes use of the full capabilities of the platform compared to a browser which is generic for all websites. I am surprised that Apps claim faster access with apps. Maybe it is so because it will load only those information that needs to be and fits into your smartphone screen. But I do agree that in a smartphone, the user experience with an app is superior to that of using a browser.

I would suggest you to access Facebook through a smartphone browser (In your case, Chrome) and then with the Facebook App available in Android market. You'll understand this better. 

While installing apps, the Android (and iOS) platforms asks the customer a set of security questions. These are typically access to Location, memory, camera and calls. These questions serve as a last check against malicious intent which some apps might have. But this is not something that needs to be worried about. If you install an application from the Google Playstore (or Samsung's equivalent), they already run quite a few checks to filter out malware. But it is advisable to check the ratings of the applications in the market. Genuine apps will have good ratings and can be installed almost blindly. If it is an unknown application certain amount of caution augurs well. Don't give access if you are not comfortable.

Some of the guidelines for installing apps are:
For applications like Facebook and linkedin, there could be multiple apps developed by multiple entities. Select the top-rated one from that and they would be bonafide. 
Check the privileges that the app is requesting and uncheck them if you are not comfortable. For e.g., when installing Facebook app, it might ask for your location. The app might then have a default setting which makes the location to get added to all posts. 
Don't install apps from unknown locations unless you know the source"

Thursday, August 22, 2013

Invictus - അജ്ജയ്യൻ

Recently I tried my hands at a Malayalam translation. That of the famous English short poem - Invictus written by William Ernest Henley.

അജ്ജയ്യൻ

അന്ധകാരം മൂടിയ ഈ നിശാവേളയിൽ
അജ്ജയ്യനായൊരെൻ ആത്മാവെനിക്കു നൽകിയ
ദൈവങ്ങളെ! നിങ്ങൾ എന്തു തന്നേയാകട്ടെ
നന്ദി ചൊല്ലുന്നു ഞാൻ, സ്തുതിക്കുന്നു ഞാൻ

ദുസ്സാഹച്ചരത്തിൻ ധ്രംഷ്ട്ടകളിൽ അകപ്പെട്ടു
കുതറിയില്ല ഞാൻ, ഒന്നുറക്കെ കരഞ്ഞില്ല
വിധിയുടെ കൊടും പ്രഹരങ്ങൾ വാങ്ങിയിട്ടും
കുനിചില്ല രക്തം പൂണ്ട എൻ ശിരസ്സ്‌

 കണ്ണീരും ക്രോധവും നോവിനുമപ്പുറം
കാണുന്നു ഭയാനകമാം മരണത്തിൻ നിഴൽ മാത്രം
എങ്കിലും കാലത്തിൻ കെടുതികൾ കണ്ടെത്തും
നിർഭയനാം ഈയുള്ളവനെ എന്നെന്നും

എത്രമേൽ കഠിനമാം പാതയാവട്ടെ,
എത്ര നിറഞ്ഞതാവട്ടെ വിധി ശിക്ഷകളാൽ
ഞാനാകുന്നേൻ വിധിയുടെ അധിപൻ
ഞാൻ തന്നെയാകുന്നേൻ ആത്മാവിൻ നായകൻ

Invictus was written by the Henley some time in the mid Nineteenth century. One feels that the words have come out from the deeps of his heart while he was suffering the pains of physical ailments. It has ever since been a daily dose of fortitude and motivation for many including Nelson Mandela during his jail days. The poem hails stoicism in life and is a reminder to all that the final frontier and the most valuable of all freedoms - that to choose our response to whatever cards life deals to us is with ourselves.

Saturday, June 22, 2013

My Grandfather had an elephant - Vaikom Mohammad Basheer

Basheer belonged to the golden age of Malayalam Literature. His writings exude wisdom that he gathered from a life filled with rich experiences. His life was one of sheer variety, spent along with sufis, Indian freedom fighters, jail time and even mystics in the Himalayas. The times were that of hope,  romanticism and humongous change hitherto unseen. Having suffered from mild bouts of schizophrenia occasionally, his writings unsettled those who swam about in the well of insanity that normal life is. These factors combined and the malayali was blessed with some masterpieces of literature.

The language Basheer used in his books was that of the layman. The endearing lingo of the Malabar combined very well with the sophisticated humour that the villages of Kerala has abundantly. As a kid and a student of Malayalam, Basheer's books had captured my imagination and in a school project where we were asked to study and present about an author, Basheer was my choice. I do remember making a speech about his work and the impact that it had on an age old society grappling with new realities. But time (and a career in engineering) has withered away the details.

It was perhaps my subconscious pulling my attention to what it wants, but a couple of years back while visiting DC Books in Cochin along with my Dad, my eyes fell on Basheer's books again. It was duly purchased and transported to Bangalore, but then in the battle of conflicting priorities, the little book lost. The book "Ente Uppuppaakkoraanendaarnu" (Translated: My Grandfather had an Elephant written in the Malabari Malayalam Lingo) was gathering dust in a cosy corner of my bookshelf until finally last month it came out. All I took was a couple of hours to finish reading it.

The story is about a girl brought up in an atmosphere of conservatism, shallow mindedness and dogma. From a little girl ever so enthusiastic about life, as the novel progresses, she turns to a pretty teenager who wonders at the meaning of various customs, traditions and values that's typical to her society. She tries to understand them and come to terms with them but to not much success. As a young adult towards the end of the novel she meets the love of her life - a fine, self-assured young man with a modern outlook. As she grows up, there are a series of unsettling and turbulent events that happen at the household which has a dominant say in the evolution of the story and that of the protagonists.

The point of this post is not to summarise the plot of the novel, so I am not going to divulge any more details. But any guesses on what's the significance of the book's title? There was a time when owning an elephant brought lot of prestige to the owner and his family. Only the richest of the rich could afford and the owner was seen nothing lesser than a lord. And such 'lords' generally had descendants who would be just not up to it, lose sight of reality completely and all that they have is false pride in their lineage.

Through the innocent eyes of the main protagonist, Basheer throws open the windows to a society that exults in its lineage but has lost sight of reality. The book is a harsh criticism to the dogmas and irrationalities of a society and a stern reminder of its uselessness. Through powerful sarcasm, razor sharp wit and the courage and conviction of truthful thoughts, Basheer will shake you up the way he shook the society a generation ago.

Friday, April 05, 2013

Aaj Rung Hai - The day Amir Khusrow met Hazrat Nizamuddin Auliya

Transport yourself to the 13th Century for a brief moment while I take you through a very small leaflet out of Indian history. It would have been so different then. Yet it would have been so alike to our times, for in spite of whatever changes you see in the surface, the interior world of men has never changed and never will. Passage of time has made this part of legend and like any other legend, it is fantastical. But what is true is the feelings of the main protagonist of the story which he has captured so beautifully well in a musical composition. There it has been preserved for eternity.

A young (destined for greatness) Amir Khusrow is sent to the great Sufi saint, Mehboob-i Elahi (Beloved of God) Hazrat Nizamuddin Auliya for spiritual instruction. Khusrow spends time with Hazrat Nizamuddin and in the process realises that he has finally found his Guru. He is elated with the relief that his search is finally over. His stilled mind rejoices his new found conviction of faith and love. And a triumphant Khusrow composes a song to convey his feelings to his mother after reaching home. There is Colour Today, Mother. For I have found my Teacher and my love - Hazrat Nizamuddin Auliya.

This song is one of the most famous qawwalis and is regularly sung at places including the Hazrat Nizamuddin Dargah in Delhi. The video below is a rendition of this song by Fareed Ayaz and Abu Muhammad sung in Coke Studio sessions. The raw elements of qawwali are masked by technology and modern western instrumental sounds. But as I said earlier, those are changes on the surface. In the interior world, to a listener so far away in the 21st century, it evokes the same feelings that the great man felt that day.

Listen and Enjoy.


Saturday, March 16, 2013

The national pledge and it's relevance


We have repeated our National Pledge for more than 10 years, judiciously after our school leaders at the daily assembly. Atleast those of us who were born after Jan 26, 1969 would have.

http://en.wikipedia.org/wiki/Indian_National_Pledge. Check the link out, there are some things there that you never knew.

We have been exposed to it constantly for more than 10 years. Yet it hasn't got imprinted. Perhaps it was during school days. I was a much better individual when young and in school - most of us were. As we grew, we become not-so-nice versions of what we were. The memories of the pledge that we have taken so many times seems to have faded away and whatever faint strains have stuck around are surely in some archive location. (I have remembered only the joke about how Rajiv Gandhi took the "brothers and sisters" part too seriously and thus married an Italian.)

When left to our instincts, our conscious being is overrun by factors such as greed, ruthlessness, lack of discipline and adopting the easy way. We compete with each other seeing life as a zero-sum game and with a decided lack of co-operation. There is a marked inability in us to enlarge the pie that life has to offer. There are many reasons why it is so. The brain as every other system has an increasing entropy unless energy is actively applied. When left at as it is unmanaged and uncluttered periodically, it gets chaotic. Also, we have evolved as strategic players trying to make the most with the least of available resources in the game of survival. While this innate talent is definitely important, if all of us go about with similar strategies, sub-optimal outcomes are inevitable.

Mankind has perpetually been in a war with the basal nature of itself. Religion historically has had a large role to keep the animal part in leash. We need to be constantly reminded that we ought to co-operate for creating a better alternative future. In our national pledge, we have the right dose of daily spiritual medicine that is simple enough that the entire nation can understand. It is not affiliated to any religion so there are no holy cows involved. It is designed for kids. But adults are no different, most of us are just overgrown kids.

Reading out the pledge daily and striving to act on it would make much more sense should we do it in our adulthood rather than childhood. It is as adults that we go about with the real business of life. Our capacity to create damage is on a much higher scale when are grown up. I know that I sound naive, but civility and courteousness as a base nature of a country is a reality and not governed by economics. You want evidence, see Japan.

Look carefully at our pledge once again. It reminds us that India is our country and that we love it. It tells us that everyone we interact with are as good as our brothers and sisters. A subtle suggestion to put our country and fellow beings one step above ourselves. It asks us to be proud of it's heritage and strive to be worthy of it. We have a strong heritage handed down to us. Be it Philosophy, Music, Literature, fine arts or cuisine, the subcontinent is mindbogglingly rich. We seem to have enough of (false?) pride associated with it so I am not going to talk about the pride part. But behaviours constitute that being worthy of our heritage. Does It mean that some amount of our efforts and pursuits as an individual should be in strengthening this heritage? Does it mean that we should never feel self pity and demotivated looking around? To me it means that our race has survived very long as a continuous and unbroken line. We have been exposed to differing global realities and we have survived. Great sons have come out setting the direction and context every time when it was required and that will happen again. It reminds me that we are standing on the shoulders of giants so get motivated to do whatever is in my powers, always. The next part of the pledge reminds us to treat our people with respect and courtesy. Being treated well and treating others well - what more could make life happier. So many a times we have been rude and discourteous to the meek and injured our own hearts. We never get happy by treating others shabbily, we never get happy when our own conscience is hurt. It is in others' happiness and prosperity that our own lies. And who is not in the pursuit for happiness and prosperity.

Archimedes once said - "Give me the right lever and the right fulcrum to place it and I will move the earth". He was exaggerating to drive home the concept of leverage. I was wondering whether investing some effort and energy to remind our country men of our own pledge could be a key leverage point to create maximum effect in the system. Marketing science would have come up with tools for doing this. But whatever it is, it would involve tremendous costs. Costs that can't be born without profit generating activities. In the late eighties and early nineties, the Government used to spend with efforts on national integration using Doordarshan. I don't think they will be interested in any of it now. They have far too much of fire fighting to do. They are not in a position to be creative or invest in long term strategies.

At the risk of sounding like a hero from Rajkumar Hirani movies, I propose the use of paid advertisements on dailies for creating leverage. How about printing the national pledge in the newspaper everyday along with an earnest note (from some celebrity?) to the reader to read and apply it. It could make everyone think and act a little different than what they would have otherwise. There could be a massive virtuous cycle that this would set going. It would be really worth trying out.

Tuesday, December 18, 2012

Communication Gaps and Inter process communication

For the longest time, I was never listening to others. While the other was talking, I would typically be validating it against my templates and rejecting or accepting it outright. Or even more dangerously, I would be getting defensive or offensive. The entire process would get complete in no time and by the time the talker even completed his sentence, my verdict would be already out. And the poor talker doesn't even realize how much of his energy got wasted in this process.

I had no clue as to how much unfair and disrespectful this was to the other party and I have no idea how much it would have offended and pained them.

Since the last year I started consciously listening more and trying to ingrain what others were speaking before opening my mouth. I started thinking on the responses that people give as a habit and then I started realizing how painfully ineffective 2 way communication really is. It is rendered ineffective by myriad and unfathomable factors. I have come to believe that predominantly it is ego, age, sex and intelligence. Now, this is not something new that I am writing about, there are already loads and loads of material available on the subject of effective communication. I for one am quite skeptical whether it's really useful or not. For one, there is no way one can memorize all of those at will and start employing such methods picked from memory at will when an actual communication is happening. Even if someone with a superhuman intellect does manage that, it still remains that the sheer diversity of human factors will keep on outrunning the known literature on the subject of effective communication. Generally there is precious little of time at our disposal before the subconscious mental processes inside the listener's brain takes over. I have personally struggled with the biggest predicament of them all - where the other party doesn't even realize that there is so much of dynamics involved in communication. (I am reminded of a joke - A man advises a boy when he is about to venture out for a night in the forest. If he encounters a lion in the forest, to point his flashlight straight on the lion's eyes to scare it off. And to this, the boy asks - Does the lion also know this?)

Being a software programmer, I always have a tendency to look at computer architecture and human brains for everything. I was thinking about the differences between inter-process communication for computer software and that of human software. Both employ protocols for communication. The difference is the crystal clear way in which software marshals data out and how fuzzy the way humans do. While in software there is a clearly coded way in which data has to be taken out from packets (of communication), in humans this process is extremely complex and much difficult to alter. Each person reads out data in the communication the way he has "coded" his brain with his emotions and judgements starting from experiences beginning at day 1 of his life. On a lighter note, there are no OSI layers, webservices or APIs for human to human communication.


The complex processes in the human brain is the source of all the creativity and resourcefulness of the species even though it is at the root of the problem being discussed. Once its mastered at one's personal level, there should be some way it can be harnessed for effective communication.
Deep listening and crystal clear, emphatic communication for change, would be key skills for any person who is in a journey of discovery and personal mastery. It has to become a habit and come out from the subconscious with constant practice. I am not oversimplifying, this is not something that you practice for a few days and become a maestro of - like driving. This takes a lifetime of practice and contemplation, but the underlying principle is the same.