Archive for March, 2006

(Yet Another) Microsoft Internet Explorer Rendering Bug

Tuesday, March 21st, 2006

For years, standard operating procedure for developing a web application would be to design and implement it with Microsoft’s Internet Explorer as the test bed. You’d pick a version and tell everyone that they needed to use it and that was that. I have to admit that even I committed such sins.

These days, I want my pages to be usable on as wide a variety of web browsers as possible, so I use Mozilla Firefox for development, and then just check MSIE at the end to see if anything is amiss. Yet, with MSIE, something is almost always amiss…

I’ve had trouble with good-looking logos and mastheads for a long time. Back in the day, tables were the way to go. More recently, CSS is the preferred (and really the only) way to do layouts. The trouble is that MSIE has some schizophrenia when it comes to CSS. The folks that wrote MSIE implement only part of the CSS specifications, and often took shortcuts whenever they wanted.

A few days ago, I noticed that MSIE was acting strangely when viewing one of my current projects. It appeared that the text in my masthead wasn’t being displayed. Perhaps I had some conflicting CSS styles that were giving my text the same background and foreground colors. I checked, and everything was okay. Reload after reload, application server restart after application server restart didn’t solve the problem. Mozilla Firefox never blinked an eye and rendered the (quite simple) page without a problem.

Then, I noticed that scrolling the page past the fold and back again would mysteriously reveal the text. That’s not something that can be done using CSS.

Check out this movie that demonstrates the problem:

Screenshot of MSIE Rendering Bug

It’s definitely a bug. The markup is validated correct strict XHTML 1.0 and the CSS is also spick-and-span clean.

The markup is fairly straightforward; there’s a div surrounding the entire masthead (both the topmost blue bar and the bar containing the tri-colored regions), and then a divcontaining everything within the topmost blue bar. The blue bar contains a form containing the login form. All the other text elements are plain-old h1 and h2 h2elements. The tri-colored regions live in their own divand are made up of the surrounding div(black background) and two nested divelements with appropriate background colors.

The styles are also straightforward; colors, margins, borders, etc. I didn’t even have to use the ‘line-height’ trick to get MSIE to display an empty div(for the tri-colored regions).

It turns out that the problem can be solved by adding a simple non-breaking space between the blue-bar and tri-colored-bar divelements. MSIE interprets this change by finally giving me what I wanted in the first place. Unfortunately, it adds a small vertical space before the tri-colored-bar which I would prefer not to have… it looks like unnecessary padding in the blue div.

I have a virtual machine running Microsoft Windows XP with MSIE 7 beta running on it, so I decided to comfort myself with the fact that MSIE 7 had probably fixed this bug. It hasn’t, at least not yet. I hope the MSIE engineers really try to get CSS right this time.

Terre Haute Tribune-Star Snubs Hometown School

Monday, March 13th, 2006

The Terre Haute Tribune-Star, a puplication I rarely think of since I graduated from college, is running a story about how Indiana State University (in the ‘Haute) will be the “first public university in the state to require all students to have notebook computers“.

After mentioning ISU’s new plan, the article goes on to say that ISU is only “one of a handful of institutions nationally, including the University of North Carolina-Chapel Hill and Clemson University, to institute similar mobile computing initiatives“.

Apparently, the author of this article did not do their homework, at least not very well. The article seems to come directly from the Tribune-Star; it’s not an AP report or reprinted from another publication, so they should have known about this: Rose-Hulman Institute of Technology, a well-known university in town, has had a mandatory laptop program since the class of 1999 began as freshmen in 1995, making that program over 10 years old.

UNC-Chapel Hill appears to have discussed this back in 2004 and has probably implemented it since then. Clemson University started requiring laptops in 2003, and University of Denver (mentioned in the comments) implemented their program back in 1999.

The author not only completely misses the fact that Rose-Hulman has a laptop program, and that it is over 10 years old, but also that there is actually a rather long list of universities that implement laptop programs such as these. The statement that ISU is one of “a handful of institutions nationally” to implement laptop programs is preposterous.

Oddly enough, there is no attribution for the Tribune-Star piece.
I wouldn’t want my name on it, either.

Something’s been bugging me…

Friday, March 10th, 2006

For a few months, now, Katie and I have been repeatedly finding a certain bug in our house. Our building has a history of cockroach
infestation, but we hardly get them way up on the 8th (top) floor
of our building.

The Western Conifer Seed Bug

These are not cockroaches, at least I was pretty sure they weren’t. I don’t know alot about bugs, so I wasn’t sure if these things were momma cockroaches or something else entirely.

Katie emits a blood curdling scream whenever she sees a bug (like this house centipede that we found in our bathtub one day. Totally creepy, this thing has a 3 inch body (~7cm) and legs everywhere, which made it seem much bigger. Fortunately for us, the tub was too slick for it to escape and feed on our succulent brains.

Anyhow, we found one of our new friends, dead, on the floor, today. Usually, I end up killing these guys with plenty of paper towels so I don’t get icky bug juice on me. Besides, I’m no outdoorsman. Since we had a dead specimen that hadn’t been turned into a streaky mess in a paper towel, I decided to investigate him. I’m generally too creeped-out to take a look at a live one, especially when I don’t know what the hell it is. It might be a Peruvian Eye-Gasher for all I know.

I decided that I had to find out what these things were, because they were appearing every couple of days. If they were roaches, I was going to deploy bait traps every 18 inches until they stopped showing up.

I searched around teh intarweb for a while, and found a great site: whatsthatbug.com. This site is all about identifying creepy things that one finds in and around one’s house. It takes the form of submissions of the type “I photographed this thing on my wall/floor/cabinet/dog/toilet, and I want to know what it is”. They archive what looks like to be every submission they’ve ever gotton, along with an explanation of what the thing is. You can search and/or browse, so I did a little of both.

Meanwhile, Katie was trying other sources of information — they appeared to be more academic in nature — with not too much luck. She found a few things that might have been related, but I wasn’t confinved. They looked too dissimilar to the corpse before me on my desk.

It didn’t take me long to find an entry about the Western Conifer Seed Bug, which is our bug. Some of the pictures of the WCSB on What’s That Bug‘s True Bugs page are not very good (except the one that was taken from below, where it looks like the bug is either on a window or is skydiving at the photographer). So, I decided to take my own (see above).

For some reason, my camera wouldn’t focus properly on the bug when at close range, or even far range with a high zoom. I simply couldn’t get the camera to focus properly. So, I used my extensive knowledge of optics to engineer a solution: I put a large magnifying glass between the camera and the bug, and the results were very good.

So, the Western Conifer Seed Bug is nothing to fear, apparently. They’re still creepy, and I’m likely to kill those found in my home, especially if I find my wife standing on a chair screaming.