Sunday, March 31, 2013

Why I hate JavaScript.

Okay, I feel like I should elaborate on why I hate JavaScript, so THIS post is going to be a collection of JavaScript failures from around the net.  True, you may say that they're the result of poor programmers writing bugs, but I'm going to do my best to show examples where it's probably not the programmer's fault.


CASE ONE: DUO LINGO

Duo Lingo is pretty good.  Certainly, it seems to be well coded (though, in all fairness, it's not excessively complicated client-side).  Howerver, sometimes it fails, and when it fails, it fails hard.  Here's a screen where the user is supposed to type what is spoken.  Unfortunately, it doesn't play anything.  Not even when you click the button.  Why is this?  I think maybe it's because JS is terrible and the code to play the sound may have failed to load in one way or another.

Here's how to continue on despite this setback, if you're interested.  In Chrome, right-click the speaker button (#1 in the picture) and select "Inspect element" (In other browsers, you're going to have to find the code for the speaker button.  You should just have to view > source and search for "speaker-audio").  This will pop up the panel above.  Then, right-click the link (#2 in the picture) and select "open link in new tab" (on other browsers, copy and paste this link into a new tab).

And voilĂ  (I just looked up how to spell that... I'm learning Spanish, not French...)!  There you have it.  The sound is there.  The link is in the code.  The button exists.

JavaScript sucks.

No comments:

Post a Comment