Sunday, January 31, 2010

Pre Initialization Technique

An interesting piece of code which does a pre initialization.

XMLHttpRequest = (function () {
try { return new ActiveXObject("Msxml2.XMLHTTP.6.0"); }
catch (e1) {}
try { return new ActiveXObject("Msxml2.XMLHTTP.3.0"); }
catch (e2) {}
try { return new ActiveXObject("Msxml2.XMLHTTP"); }
catch (e3) {}
try { return new ActiveXObject("Microsoft.XMLHTTP"); }
catch (e4) {}
throw new Error("This browser does not support XMLHttpRequest.");
})();

Wednesday, January 27, 2010

Rough Waves

The past month has been the worst ever. Previously I have been very confident of the code I write or even what I say. But now, the confidence has gone haywire. I create atleast 4 bugs for every line of code I write.  Its very depressing and I feel lost now. A very much needed revival is necessary. Let me see what I can do about it. Leaving the past behind and enjoying the work may be a way to go.

Monday, January 11, 2010

Path to follow

This post, after along time, is long time pending. I have been traveling constantly through a road without any aim. I just traveled the way the road goes. Some times the road diverts leading to a road with shades and comfort. Taking that road may not be upto the liking of your parents, but you still wander through these roads. We divert back to the main path because we are afraid of the consequences / we dont know what waits for us. I would have preferred to have taken this road. Now I understand that the shades are unreliable and dont care for the traveler.