Fog Creek Software
Discussion Board




Broken Javascript on big sites

I just went to MONEY/CNN and there was a small error alert in the corner.  I clicked it, and as usually some object did not exist.  Obviously someone is tinkering with code other people wrote, and from the object names I can see how they forgot to remove it.

But I see this problem ALL the time.  I understand that big companies are a mess sometimes and it's hard to get people to communicate-but does anyone know why errors like this are SO common.  It sure makes me less of a company that they can't fix some little obviously thing like this than if their server crashes because they've been slashdotted.  It probably happens a couple of times a day on this or that reputable site.  Obviously the pages are dynamically created, but are they writing code for the client-side that's contingent on the server-side query or parameters?  And is this like a moving target that eventually causes the error? 

Why don't companies just not use client-side Javascript if they can't keep track of their code?  The errors don't phase my IE explorer, but I know it can send AOL browsers crazy sometimes.

razib khan
Tuesday, February 26, 2002

In at least a few of the cases where I've seen this, the problem is actually in the $#%@! banner ad. Whatever ad serving company they're using actually committed the error, and the site is just including whatever the ad server is giving them.

Chris Tavares
Tuesday, February 26, 2002

I've seen this also from scripts written to comply with 4.x browsers that are then thrust into 5.x browsers. Since the newer browsers are hopefully more standards compliant, references to proprietary object models are (and should be) flagged as errors since they reference objects no longer in the name space.

Alex Russell
Wednesday, February 27, 2002

I think the main problem is that web development, both server-side and client-side, is still not perceived as being real programming. This has two significant consequences:
1. The people doing the web development are often not programmers and do not have real training in SW development.
2. This is no testing/QA process.
It's a good thing that the web is so forgiving. Otherwise its simply wouldn't work.

Dan Shappir
Wednesday, February 27, 2002

> It's a good thing that the web is so forgiving. Otherwise its simply wouldn't work.

I do not agree with Dan here: it is a bad thing, that the web is so forgiving. Otherwise they would have to spend a little more effort on it to make it work and then hopefully, make it work correctly :-)

I would not say, that those "not-so-much-real" programmers doing web sites do a worse job than many "real" programmers out there, though. I do not think code quality is generally lower in web sites. Maybe it is just that mistakes and ugly workarounds are easier to spot than in a normal application. This is not meant as a "Keep it that way, web guys, you are doing fine!", I just think we could all do with a little more qualtiy in our code, couldn't we?

Have fun,

Jutta Jordans
Wednesday, February 27, 2002

ten bucks says McNealy's blaming MS.

I feel a full page ad in the Post coming on....

;-)

Richard Childress
Wednesday, February 27, 2002

It happens all the time to big AND small companies. A basic cost-benefit analysis would show that it's not worth fixing immediately or even QAing enough to find it in the first place.

I totally disagree with the notion that web forgiveness is a bad thing. In fact, it is the singular reason why the web has been such a phenomenon. It's is so simple to develop and iterate a web app and know that it'll work pretty well for most users.

pb
Wednesday, February 27, 2002

The reason I was confused though-it doesn't take that much QA to detect a Javascript error.  In fact, one some of these sites, 1 million people a day have the potentional to see the little Javascript error symbol in the corner.

Granted, most of them don't understand it and don't care, but enough probably do that maybe 10,000 people will click to see what's going on.

razib khan
Wednesday, February 27, 2002

*  Recent Topics

*  Fog Creek Home