Thursday, June 19, 2008

What's in a name ?

Folks, this is going to be yet another of my quick grumblings (you can call it a tech post if you like) connected closely with IE and Javascript yet again. I recently came across a requirement where I had to toggle the visibility certain elements (which happened to be TRs in my case) and not failing the tradition, yet again faced inexplicable problems with IE. Most naturally, I used the function getElementsByName for this purpose. Oh, no! For once, IE cannot be blamed this time around. The method getElementsByName was the core of the recent problem I faced. This method comes is specified as a part of DOM1 Core whereas it has been moved from core to HTML in DOM2 ( Reference). However, the all benevolent FireFox continues to provide this method to all the elements quite unlike its counterpart. So while IE wont accept elements in the DOM structure to be picked up by their names, Firefox gleefully does the same.

Now that we know the problem, what is the solution ? As is the case with most of the javascript fixes, it is a hacky solution which can be easily observed from the code frag given below :

The simple idea is to use some other identifier to recognize the elements that you want to get hold of -

HTML:

tr id="blah_1" name="blah"
tr id="blah_2" name="blah"
tr id="blah_3" name="blah"


Javascript :

var elts = document.getElementsByTagName("TR");

for (i=0; i< elts.length; i++)
{
if(elts[i] != null && elts[i].name != undefined && elts[i].name.indexOf("blah") >= 0)
{
//got the element !!
alert(elts[i].id);
}
}


That's it folks ! If the elements are not of the same tag type, you can as well use .className or any such identifier to fetch the elements that you would want to :)

~Titan.

Tuesday, June 17, 2008

Dasavatharam.. An intricately carved design

It's time I donned the garbs of a critique yet again. Thankfully, in the recent past, not many movies had moved past benchmark required to make me think about writing a note on it. If you had been a regular follower of my reviews, you would even suspect me to be a very captious critic. But then, so is the nature of the job and I am but a faithful follower of the decalogue pertinent to this fraternity. No suprises, this time around friends, this is going to be another abstract set of observations from Kamal's latest flick, Dashavatharam. The first feel that you get immediately after the movie is that of vacuum, not awe, just the general feeling of discomfiture at the hanging pieces of screenplay that you had just witnessed.

The crux of the movie revolves around the well known Chaos theory, in particular the Butterfly effect (Chaos theory ). With such a dicey concept as the baseline, it has to be agreed that Kamal has done a remarkable job of constituting a story out of it. The entire movie is based on the conceptual premises of the cause-effect system. Kamal has done a excellent job in the characterisation of all the ten different roles that he dons. However, it should also be mentioned that some of the roles could have been a mere fabrication to increase the count to 10. If you think it is just a ploy to justify the title, then I'd ask you to read further through the post, just in case your thought needed a revision.

The actor in Kamal has done a resplendent job with regards to the acting, appearace, demanour and dialogue delivery. The job is more than merely well done, it is a class act. Each of the character is distinct, beautifully accented, cleverly masked and well placed. Among the flurry of characters, Nambi, Fletcher, Naidu, Shingen Narahashi and Poovaraghan deserves special mention. The character of Naidu which combines intelligence with wit, accentuates the comical flavour in the movie. Nambi is the epitome of "Bhakthi" with all the characteristics of a blindly devout man. Fletcher dons the most important role for any movie, the villain. Action and comedy are given their due respect and are magnificiently executed. Of course, there are a couple of places where you would still find the hero flying the air and doing somersaults, which are so much an integral part of South Indian movies. All things said and done, you would still feel a couple of characters to be a mere count incrementors. For Non-Kamal fans, the number might be a tad Kamal-Overkill.

The movie is extremely fast paced with Fletcher giving Govid the chase until the end. Thankfully, there are no redundant comedy track that runs between the story line. Neither do we have any dream sequences or songs that seem out of place with plot of the story. The BGM are neat and cleanly done. However the songs are quite unlike the traditional South Indian ones that you would expect from such movies, they definitely show traces of Modern North Indian touch that one cna hear blaring across the street. The most common comment that I have heard from people who watched id was "Disconnects". Yes, the movie definitely doesn't provide you with the connects but leaves it to open interpretation. Which brings me to tell you what I had interpreted (there were some perceptions that aren't mine, the ones that I couldn't connect to).

As I had initially mentioned, the key to perceive the connection in the story is the chaos theory. A set of seemingly insignificant events contributing to a much larger phenomenon. Similarly, a set of distinct, insignigicant characters contributing to a greater cause of saving the world from a bio-chemical infection. The scientist, Govind comes across so many characters and forms a part of the intricate pattern which conspires to bring the plot into effect. To follow a simple chain, Govind got knocked off the railings to fall into the package that went to India. He meets the mentally unstable lady, Krishnaveni paati, who drops the infectious vial into the idol. Comes Shingen, who, for the sake of revenge protects Govind. Similarly, all the characters in one way or the other, knowingly or unknowingly helps Govind's cause. It fairly conforms to the chaos theory that we have seen earlier. Kamal has also touched the concept of re-incarnation in the form of Govind and Nambi, if you had noticed the similarities among the two characters including a scar in the forehead :). Asin's dual portrayal is just another allusion to the same fact. The concept of Karma has also been dealt with deftly. In the previous life, Asin was ready to give up God for the sake of her husband's life whereas Nambi was too attached to let go off. In the later life, they swap places where Kamal says, "It would have been great if God were there". Also they re-unite in the same place where they were separated, another implication of the chaos theory and circular pattern of events. The idol that was immersed ignobly into the ocean wedged itself between the tectonic plates triggering the Tsumani at the easiest provocation of the phenomenon. Another instance of the chaos theory.

The ten characters in the story can be roughly mapped to the mythological dasavatharams by Lord Vishnu. Some of the most obviously visible juxtapositions are

* Kalki - Govind, the humanitarian out to save the world.
* Balarama - the name is indicative enough, Balaram Naidu.
* Matsya - Nambi, who went into the ocean with his Lord's idol.
* varaha - Krishnaveni paati who hides the vial inside the idol.
* Rama - Avtar singh who is ever devoted to his wife, ready to sacrifice his voice for his wife.
* Krishna - The dark complexioned, compassionate Poovaraghan says it all. Like Lord Krishna, he dies due to a foot injury!
* Parasurama - Fletcher, who else ?? :). A killing machine, just like Parasurama whose purpose was to eliminate the Kshatriyas.
* Narasimha - The name Shingen Narahashi, does it ring a bell ?
* vamana- Kalifulla who is as gigantic as the Vamana ?

Well, these are just some interpretations that I managed to secure from various sources and the choice is upto you to reject them. As you can see, there is a lot more than mere screenplay and fast paced action that you can see obviously in the movie. I would really not know if these facts were introduced into the movie consciously, but if it were, Kudos to Kamal !! If not, perhaps, yet another example of chaos theory ! ;-)

Monday, June 02, 2008

Inflation ?

There is no time to stand and stare. Last week was one of the rare occasions when the social 'server' in me woke up. I was out buying our meagre weekly stock of vegetables, wondering at the rising prices of common commodities. It hit me when I realized that 'rising' had long ceased and it was now rocketing ! Believe it or not, a Kg of Carrot that used to cost me 22 bucks not long ago now costed me 64 bucks! That was the inspiration for me to come up with this blog. No mincing of words people, I WANT this to be an eye-opener to anyone who's not been aware of this mercurial rise in prices.

For those of you who have been following newspapers - you might have come across the Govt. officials quoting a 8.1% increase in inflation. Doesn't that strike a chord in you ? Didn't a mere 8% rise seem too ridiculous to believe ? You can see for real that the prices of carrots have gone up by almost 300% and still the official rate indicates 8%... If you now think that the figure 8.1% is absurd, THEN, you really are thinking..it is INDEED absurd !. Okay, that said, what does this 8.1% indicate ? what is the trick employed here by our financial magnets ?

Bingo ! India uses the Wholesale Price Index (WPI) to calculate and then decide the inflation rate in the economy. WPI is the index that is used to measure the change in the average price level of goods traded in wholesale market. Now you can sit and wonder which one of us would buy anything on a wholesale price. Perhaps the barely surviving middle-class are the ones who buy wholesale commodities!! Now you know how inflation rate in India has been projected.

If you think that's the limit, there's more in store for you. This WPI is not calculated for all commodities, but only for a chosen few commodities. Some of the commodities that I found in this wonderful list was coir-fibre, raw-silk, Fodder, Papaya, Guava, Hessian-cloth, tyres, Medical X-ray films, Excavators, Cranes, Jeeps, Truck chassis. Getting a feel of what is happening around here? The proportion of commodities that are used by the common man are less compared to the commodities that go for bulk consumption. It struck me to see that none of the commodities in the housing, entertainment and the education sectors comes into picture here. Given that India is definitely a service economy, where did all these entities disappear? I would want each of you to be aware that the 8.1% that is projected in the official figures can be subjected to severe manipulation. Please go through the list available to see the entire list. (http://www.eaindustry.nic.in/). Ask for proofs and I'll point you to your very own expenses ledger of the yester years and you'll clearly see that the expenses indicate the rise to be a greater than 8% atleast by a few orders.

A few of you might argue that CPI would provide more reasonable statistics and I would completely agree with you. But please remember that the basket of commodities still remain the same. India is the only major country that uses a wholesale index to measure inflation. Most countries use the CPI as a measure of inflation, as this actually measures the increase in price that a consumer will ultimately have to pay for. On the top this, the recent food crisis has led to further increase in the price of all basic commodities.

Result - the lower income group find themselves not able to afford carrots. Even trivial entities like chillies have registered an dramatic increase of 400% (50 gms of chillies now costs 4 rupees). People like me, who typically "buy" food would seldom realize the gravity of the situation. With such a drastic shot of price rise people are going hungry by the thousands with each passing day. A family with a monthly income of Rs.2000 would find themselves on half-empty stomachs for most part of the month. I hate to end this post on such a grotesque and sordid note, but I couldn't help saying this.. Govt officials expect the "WPI" to reach the 10.1 mark very soon.