kvetch kvetch javascript kvetch
Nov. 27th, 2006 04:14 pmOkay, all the times I have complained about Java? Multiply them by "annoying" raised to the power of "stupid" when it comes to JavaScript (which, despite the name, is no relation).
Seriously, who wrote this? The javascript runtime engine goes to enough trouble to auto-generate a Radio object that contains all the information for a set of radiobuttons in a form, and will let you programmatically alter their state and has event handlers for gaining and losing focus, but it doesn't bother to actually figure out what the current selected value is, despite the fact that that selecting it is, like, the entire point of radiobuttons even existing, and is therefore the single most likely to be used piece of information about the damn thing?!?
WTF! Dude!
Addendum: Who wrote this? Brenden Eich wrote this. He is a big dope.
Seriously, who wrote this? The javascript runtime engine goes to enough trouble to auto-generate a Radio object that contains all the information for a set of radiobuttons in a form, and will let you programmatically alter their state and has event handlers for gaining and losing focus, but it doesn't bother to actually figure out what the current selected value is, despite the fact that that selecting it is, like, the entire point of radiobuttons even existing, and is therefore the single most likely to be used piece of information about the damn thing?!?
WTF! Dude!
Addendum: Who wrote this? Brenden Eich wrote this. He is a big dope.
no subject
Date: 2006-11-27 11:22 pm (UTC)I tell my students that if you need scripting that is not being written for you by what ever web design program you are working in (assuming you can't avoid it entirely) you should just pay someone one lots of money to do it while being very nice to them.
And make them cookies.
no subject
Date: 2006-11-28 08:50 am (UTC)no subject
Date: 2006-11-28 12:24 am (UTC)JavaScript implementations (let's call it Interhyde Explorer) suck a giant salty moldy potato. They name common objects differently. They implement queer subsets of whatever standard you want to propose and the workaround for one implementation doesn't work at all on another implementation. There is a good debugger, but it doesn't work on the implementations that deviate far from standards, so you have no way to figure out just what completely standards compliat piece of code you wrote broke other than popping up an alert dialog after every line.
JavaScript programmers (let's call them l0sers) learned how to program by reading a 20-page tutorial and looking at other l0sers' web pages. They don't realize how evil and despicable Interhyde Explorer is. They don't know what a prototype-based language is. They don't know why "passing a function" is cool.
Software engineers who write JavaScript (c.f. Google) are aware of the theoretical underpinning beneath JeckylScript's features. They also realize that you use HTTP headers to determine a user's browser type and deliver a JeckylScript file designed for that Interhyde Explorer implementation rather than having conditional logic based on browser detection inside every function. They also realize that if you have your JeckylScript call a HolmesService you can have a real programming environment do the important work.
Framework designers who create JavaScript hooks (c.f. Konfabulator, Apple's Dashboard, recent Yahoo! desktop offerings) realize that if you provide a single implementation and provide a rich API, JavaScript authors can spend less time running in panic from hyde and instead make usable interactive components.
JavaScript is sort of like a nice kid with a few problems who got introduced to drugs and had no parental supervision at a critical point in his life. He's made some better friends and kicked most of his habits, but his past still haunts him.
no subject
Date: 2006-11-28 03:17 pm (UTC)no subject
Date: 2006-11-28 01:09 am (UTC)no subject
Date: 2006-11-28 05:44 am (UTC)have you checked these people out?
Date: 2006-11-29 01:17 am (UTC)no subject
Date: 2006-11-28 03:25 am (UTC)no subject
Date: 2006-11-28 05:40 am (UTC)no subject
Date: 2006-11-29 01:36 am (UTC)no subject
Date: 2006-11-29 03:34 am (UTC)no subject
Date: 2006-11-29 01:38 am (UTC)Who knows.
Probably the best thing you can do for javascript is to find a list of the bugs. If you can afford to write your code multiple times, (see elsewhere), write it correct for each browser.
But most importantly, if you can help it, design things so you don't need to use it. Failing gracefully is easy to do, but it takes a few small tricks.