If you are wondering what happened after March 2005, well, Null Pointer moved to its own home. Please do follow me there.

Tuesday, December 30, 2003

The Badshah of quzzing!

Aaj Tak is going for a public issue and they suddenly realized that the brand has emerged mightier than the TV Today insignia, so their typical "B&W Hindi archaic movie ishtyle" stupid advertisements were back to tell the viewers that Aaj Tak is an offshoot of TV Today and not the other way round. I was really taken aback that for one they actually succeeded in roping in one of my idols Siddartha Basu (frankly I am not aware if the opposite happened because the channel is shown as one of his clients at Siddartha's website).


Siddartha BasuTalking of Suddarth, people of my age-group who were into quizzing have been ardent fans of Basu since his Quiz-time days at Doordarshan (DD). For me it was a magic phenomenon as it flamed my interest in quizzing, I hosted two shows of my own at Schools and won laurels in several. I was really awestruck by the professional packaging of his shows. He was the pioneer to introduce IITian gizmos into quiz scoring.


For those of you who don't know, Siddartha had a background in English theatre. He played the spoilt child of a millionaire in a DD TV serial called "Purvai" (though, must confess, his hindi diction was pathetic). He also produced many TV plays, of note was "Kauwa chala hans ki chaal" in which I first noticed Raghuvir Yadav. But his and his company Synergy Communication's primary focus has been quizzing and they certainly are badshah of the format. Offcourse KBC was the pinnacle of their achievement where they were able to coax-in BigB to play the host and the rest is, as they say, history.


In 1994-95 I was at Delhi to appear for a competitive exam and decided to meet Siddartha personally with my friend Shreekumar who was then teaching at Father Agnel's Polytechnic. We somehow got his telephone number and called him up on an afternoon. Anita, his wife, picked up but alas he had just gone to sleep. Then I was occupied for the day and the idea slipped off my mind. I could only call him up from the Nizammuddin station while I was heading home. To my surprise he came on the phone promptly (now that I think of it I realise that those were the days he was easily accessible). Synergy wasn't born then perhaps and he told about his shows for DD. When I asked about his theatre activities he said that it continues side by side. "Thanks for calling" he said in his typical style as we concluded the conversation. But those who have met or talked with a celebrity they adore can very well guage how I felt at that moment. Unfortunately with Mastermind on I haven't really followed his career, but Siddartha still remains one of my idols.

Monday, December 22, 2003

Sometimes you have to be evil!

Many times the most innocuous aspects of programming create lot of trouble. Take the innocent Properties file. These avatars of Hashtable are collections of key-value pairs, frequently used by applications for their need for external resources and configuration settings. Now pointers such as these tell you that reading the Properties file using java io is evil, owing to the fact that it warrants absolute file names and that in turn poses hinders application portability. So we have the recommended ways to use the ResourceBundle class or classpath resources. Nothing wrong with this!


Or so I thought, till I had to work on a web-interface to create, modify and delete Properties files. I realized that when loading a Properties file using the Classloader and ResourceBundle and after I modify my files and store() the values, the changes won't reflect to the user. The same old properties were displayed despite the fact that some of them had been changed. The reason it seems was the fact that the classloader somehow cached the Properties. While this would be termed most efficient and desirable when reading the properties, this perhaps wouldn't be so in an Property File Editor application like mine.


In a nutshell what I ultimately had to do was to take the evil route and use java.io to load the files, as below:




//Do not load the properties file as Resource stream or ResourceBundle
//if caching is not acceptable
//InputStream in = loader.getResourceAsStream(name);

//Load it using direct I/O, obviously we need the file "path" here, which can be
//retrieved using the ServletContext
in = new FileInputStream(path);

//rest is usual
if (in != null) {
Properties objProps = new Properties();
objProps.load(in);
}


Since this is a web-application I am fetching the relative file-path of the Properties file (situated along with other classes in a package structure) using the ServletContext (getRealPath()), this works well in Tomcat, I am not sure if this approach works for all containers.

Saturday, December 20, 2003

First Steps!

Mitali just rang me up to inform that Tanmay has taken his first bold steps by himself. Pray, there is no looking back for him. May God bless him!

World's first Hindi blogzine

I feel elated in presenting Nirantar , World's first Hindi blogzine. It has been the result of untiring efforts of so many Hindi blogger...