Mocking the Web-challenged

I used to use an extension in my browser called ForecastFox to give me a heads-up on upcoming weather. I never liked that it used accuweather.com for its forecasts, and I always wanted finer control over a million things, but it was pretty handy. I finally had to get rid of it, though, because it would sometimes get stuck in a state where it was trying to update its info, and it became a CPU hog. Frustrating, but oh well.

These days I get my forecast from channel 9’s site, a poorly designed site but usually a fairly reliable forecast inasmuch as Syracuse has such a thing. But when there are severe weather alerts their site is useless, so in those situations—or when I want a ten-day forecast, as I sometimes do—I turn to the Weather Channel’s site, weather.com. Even though they do the stupid naming-winter-storms thing.

The other day we had some wind advisories, so I headed over to weather.com—and encountered a crapload of blank gray boxes. No real content at all, except for a few menu headers. This was the result of a content loading script gone horribly wrong. It took very little time to find the culprit: A script on the site was trying to use my browser’s geolocation feature, which is disabled, and as a result that kept all the other scripts on the site from running. (As of this writing, it still isn’t fixed.)

As a programmer, I know what it’s like to make a big mistake, but a mistake of this magnitude from a site with a major online presence like that one—and one would assume multiple developers—is really, really inexcusable.

First off, the bigtime Web design professionals are always on about failing gracefully, falling back when certain options aren’t available. It’s hard these days to have a site run well without some JavaScript, but a common design goal is to at least try. Cookies are another thing sites need to learn to live without, at least when logins and shopping carts aren’t involved; little is more infuriating than a site that won’t behave until you enable cookies for it, even though it does literally nothing of value (to you) with those cookies. But for a feature that ties in with privacy, you ought to expect that it’s going to be disabled sometimes and that different browsers may disable it in different ways.

In my case, the value of navigator.geolocation is null. That’s what’s causing the script, which doesn’t check for that case, to choke. And when it chokes, all the subsequent scripts fail, because they didn’t put in precautions against this predictable scenario.

This is bad Web development. Again I know how easy it is to make a mistake, to miss something in testing, and even to be blindsided by the way one browser does something differently. But this seems like it should have been a very, very avoidable case, especially given the manpower and budget involved. Most properties of the navigator object should be considered iffy as a general rule, especially if you take into account that the property in question is the kind of thing a user might disable.

I reported the problem late Monday night. I finally got a response today that their development team is looking into it. In spite of the fact that other users noticed this days before I did and they too discovered the “solution” (re-enabling geolocation), this has gone unfixed in all that time. I would tend to think feedback along the lines of “Your site isn’t working at all for some people” would be triaged a little higher than that.

And this should be a very easy fix, because all the developers have to do is literally open a JavaScript console in the target browser and reload the page. The error pops out plain as day. Sometimes when a script malfunctions because a variable is null, it’s because the null was completely unexpected. As a survivor of the days when IE 6 roamed the land, I don’t know how you can use a navigator property—especially one tied to privacy—and not expect that it could be null.

As a man more than capable of making mistakes myself, my usual inclination is to cut them some slack, but we’re talking about a trivial fix to an issue that they should have seen coming, with the resources to act on it right away. It’s just not excusable for the problem to have dragged out this long.

I’m sure they’ll get it eventually. But dang is it frustrating. These guys probably make a lot more than I do, and yet they failed Real-Life JavaScript 101.

Advertisements

About Lummox JR

Aspiring to be a beloved supervillain
This entry was posted in Uncategorized and tagged , , . Bookmark the permalink.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s