Monday, August 9, 2010

De(con)struction and (De)bugging

Over the past few days, weeks and months, I've been involved in the arduous process of debugging my code to make it work. As anyone before me who's done the same can attest, it is a process that can test the very limits of your sanity. Interestingly, it does offer some interesting insights, which I noticed today. One of the most important parts of debugging, atleast to me, is to try and understand where and which of our assumptions breaks resulting in the bug. Which is interesting as you have to try and think why you did everything you did. The part about retracing your steps and trying to reason your decisions gave me an idea of one place where this idea needs to be used more.

Recently more than ever, we've heard phrases like "like god intended", or "like the forefathers/founders intended" tossed around for every thing from gay marriages to immigration. These are some of the most irritating phrases one can hear, cause to be so bold as to claim that you know exactly what went through someone else's mind is naive at best, completely stupid at the worst. There's an old anecdote which goes "Only fools are certain", which rings true at this juncture. The biggest problem is that most people never stop to examine their assumptions and check if what they're thinking isn't based on something spurious. Deconstructing the series of choice one made to reach a conclusion, and the seeing the underlying assumptions is something most people are incapable of. The best example of it is a sportsman trying to recover his "form", since he didn't know the reason why he was good in the first place, he can't figure out how to get back at it. The irony is that for most such people, the reason they were so good was that they weren't paying attention and letting their instincts guide them, instead of coaches. That is an inherent risk in trying to deconstruct a chain of reasoning, that one might simply get lost in the intricacies that we didn't pay attention to, but were snuck under the rug, under the guise of an assumption. Most people are unaware of the number of assumptions we work with everyday, which is a good thing, cause it's our mind's way of coping with the excessive amounts of data it faces. The point when it starts to become counterproductive is when we ignore the checks in place which are supposed to tell us when we're using an assumption, and when it's based on fact. A simple example, if someone comes up and says that by reading one book by an author, he can completely understand the author's mind, we'd know that person's insane. Even better, if one were to say this after reading one of the helper notes like cliffnotes to such a book, you can rest assured the person's quite a loony (or maybe a genius, but the a loony nonetheless). Substitute the person making the claim with any religious authority, and the book by any religious text, and you start to get the picture of why blindly trust clergy with interpreting the will of the god(s) (assuming you believe there is one or more to begin with) is nothing short of lunacy. The same logic holds good for people advocating against gay marriages and the lot using such arguments of faith and religion, cause extrapolating what's written in a text when the author isn't present to clarify the context, is placing too much faith in your understanding or that person or god.

People bashing aside, most texts present this weakness because they're intentionally vague to cover as many bases as possible. Now if a religious text were to try and explain why something should or should not be done, it would be clearer and more easily understood, not to mention the hordes of mathematicians and the like who would admire the completeness of the doctrine. Ok, maybe expecting that from religion is a bit of a stretch, but certainly expecting this from the laws of the land isn't. We have such complicated laws that we need a whole court system to interpret these laws. Now, different judges still have different interpretations of each law, and interpretation often clouds the actual purpose of a law. It would make sense for lawmakers to include a reasoning and context for which a law is being based, so as to circumvent any loopholes that may present themselves to be exploited. Though this would present extra work for lawmakers, as well as the lack of loopholes which could be exploited for extra income and gratification, it is something in the interest of the people who are expected to enforce as well as follow these rules. Even more so, it would help to demystify laws to the layman and remove this sense of loss of clarity when trying to comprehend the reason for submitting forms in triplicate. To be honest, it is what is expected of major software undertakings, so that different people can collaborate on a single project. Then why do laws never give reasons or explanations on why they are as they are. After all, if professionals are expected to do this, is it too much to expect our government to be a little professional?