Friday, March 25, 2005

Lunch

Lunch

Lunch seemed interestingly photogenic today.

Monday, March 21, 2005

Protesting To The Gods

After what seems like ages, I turned on television today, and happened to stop by at the local cable channel. The screen, instead of showing the latest Bollywood movie, showed scrolling text on a black background.

Due to the sad demise of Mr. Sanjay Gupta (Cable Operator / Distributor) of New Bombay. We will unanimously keeping the cable channel shut in protest.

Wednesday, March 09, 2005

Firefox's USP

During an idle conversation with a friend this afternoon:

She: You know, these days I get pop-ups with Firefox.
Me: Yeah I know. Those darn advertising guys. They've found a way around the pop-up blocker.
She: But the pop-up blocker was the greatest thing about Firefox. I'm afraid there's not much difference left between Internet Explorer and Firefox this way.

I considered starting an argument about standards, and how Firefox is going to save the world, but I knew that was futile. For the lay-person, Firefox gave a better experience when surfing. And now, that experience is threatened.

She is terrifyingly correct.

Tuesday, March 08, 2005

Script Tag In Internet Explorer

After a sleepless night or two, I just discovered this bug in Internet Explorer the hard way.

I was bascially including a JavaScript file in my XHTML document. The scripts in this file were meant to attach to my XHTML elements unobtrusively, and this file was a unit by itself. So I didn't have any JavaScript within my script tags. This is how my tag looked.

<script language="javascript" type="text/javascript" src="script.js" />

This works like a dream everywhere, except in the world's most popular browser. In IE, the entire page is just blank! The markup is downloaded properly (I can see it when I view source), even my CSS background-color is applied to the page, but there's absolutely nothing on it! I blamed my content-negotiation scripts first (I am serving HTML Transitional to IE and XHTML everywhere else), and then on IE's support for CSS (I thought I made a grave little mistake somewhere). However, on removing this tag, everything worked fine in IE.

Turns out, IE doesn't like the script tags if they are using element minimization. I got the page rendering just as I intended by changing the tag to look like this:

<script language="javascript" type="text/javascript" src="script.js"></script>

Doing some research, I came across this post in theList by Eric Vitiello which clarifies this more. Apparently the DTD declaration for the script tag says <!ELEMENT script (#PCDATA)>, and the XHTML specs says (under Appendix C. 3):

Given an empty instance of an element whose content model is not EMPTY (for example, an empty title or paragraph) do not use the minimized form (e.g. use <p> </p> and not <p />).
So, I guess this isn't really a bug in IE. I'd think instead, that this is a bug in the DTD itself. The script tag doesn't have to contain #PCDATA (in fact, I consider it graceful if it doesn't), and forcing it is, well, stupid.

For now, I am explicitly closing the script tag with a seperate closing tag, and everything seems to be working well. Does anyone have any idea about handling this better, preferably with minimized element closures?

Monday, March 07, 2005

Knopfler Leaves A Mark

Knopfler Leaves A Mark

It was one hell of a night. We had to smuggle in the Vada Pavs and the Bacardis and the Wills and the matches and the ... well, you get the idea. But they managed to catch us when we were smuggling the water in. Damn! Had to waste a whole bottle!

Anyway. I was hoping that he'd play some more of the Dire Straits and atleast one little song of The Notting Hillbillies, but I had to be happy with about 40% of his solos and the rest almost exclusively from Brothers In Arms and Money For Nothing. But who's complaining!

Sorry for the cheezy pic. I had clicked pics at the show, of course. (I had smuggled my cam in too.) But let's just say that the shots turned out to be a little shaky.

Friday, March 04, 2005

Help Me Escape This!

Help Me Escape!

Yup, today is one of those days. I spent my last 10 minutes staring at my text editor, thinking that the syntax highlighting looked trippy. Then I got up to drink some water. When I came back I checked and double checked if my white-space and indenting was correct and consistent. Then I thought I'll get some chips from the kitchen. When I got back I started thinking how I can add more comments to the code to make it readable. Then I was deciding if asterisks work better than slashes as the thing you put before and after a line of comment in the code.

I guess it's fair to say that I am having an utterly unproductive day today. Do you have such unproductive days too? What do you find yourself doing on such days?

ShareThis