Web developers. You suck.

Well, JavaScript developers, specifically. In order to aid in development of my own websites, I enabled JavaScript debugging in Internet Explorer a few weeks back.

To my horror, I have quickly experienced what seems to be complete disregard for serving syntactically correct JavaScript on the open internet.

No, I’m not just talking about a few niche websites, run by amateur programmers. I am talking about industry-leading nerd-friendly powerhouse websites that should know better.

To list a few examples of websites coated with syntax errors (at the time of writing):

  1. http://slashdot.org/. Slashdot for god’s sake!! On the homepage!
  2. http://digg.com/. Try posting a new dig article with a thumbnail.
  3. http://www.computerworld.com/ come on.
  4. http://www.somethingawful.com/
  5. http://www.pcmag.com/
  6. http://www.washingtonpost.com


The list really does go on. With script debugging enabled, the internet becomes an almost unusable, frustrating place. Especially if you couple this with a delightful bug in Internet Explorer, that causes it to freeze if two of your open and loading tabs both have a modal JavaScript error box waiting for a response.
Anyone who writes production JavaScript should always have script debugging enabled. If not just to help catch your own mistakes - but also to see how infuriating it can be to simply use the internet while being forced to close millions of error dialogs.

This alone should convince you to write better JavaScript.

To enable script debugging:
Tools/Internet Options/Advanced/ - Un-check "Disable Script Debugging"

When disabled, this will cause a small error box to show if there is a syntax (or execution) error in any JavaScript code.

Slashdot: 15 July 2008

If you wish, you can click the “Debug” option, and this will offer you the option of opening visual studio, letting you step through the broken code.

I’m sure you’ll all agree that correct JavaScript should not be a lofty goal to aim for.

Dave




Source: objectreference.net


Technorati Tags: ,



Related Posts by Categories



Widget by Hoctro

Enter your email address:

Delivered by FeedBurner

Followers



Source Code

Tips