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.

Wednesday, March 27, 2013

I hate JavaScript.

JavaScript is bad.  AWFUL.  If you don't believe me, pick up any book, watch any video, read any tutorial on learning JavaScript and wade through the intro that apologizes for all the bad parts of JS.  Even one of the most recommended books for learning JS clarifies that it's about "the good parts."

Unfortunately, as they say "it's the language of the internet."  Eventually, we all come in contact with it, whether we want to or not.  I'm just making this post to link to all the resources I find that help make sense of the world's most prevalent and terrible language.

JavaScript:
Getting Started (the good parts): http://amzn.com/0596517742
Evangelist: http://yuiblog.com/crockford/
Detecting null/undefined/non-existent: http://lisazhou.wordpress.com/2008/06/17/javascript-detect-null-object/

Popular JS Frameworks:
http://backbonejs.org/
http://marionettejs.com/
http://handlebarsjs.com/
http://twitter.github.com/bootstrap/
http://jquery.com/
http://jqueryui.com/
http://meteor.com/
http://angularjs.org/
http://emberjs.com/
http://embeddedjs.com/
http://expressjs.com/
http://meteor.com/

CSS:
Style Inheritance: http://www.vanseodesign.com/css/css-specificity-inheritance-cascaade/
Style Reset (remove browser defaults): http://meyerweb.com/eric/thoughts/2007/05/01/reset-reloaded/
 SASS (better way of writing CSS): http://sass-lang.com/ 
Compass: http://compass-style.org/



Additional Tools:
Server-side JS: http://nodejs.org/
Grunt Task Runner: http://gruntjs.com/
NPM (Node Package Manager): https://npmjs.org/
Underscore JS library: http://underscorejs.org/ 
Wrapping it all together with Yeoman: http://yeoman.io/
Angular Tutorials: http://egghead.io/
Angular with Express and Node: http://briantford.com/blog/angular-express.htm
Full Stack for Node: http://towerjs.org/


Additional Info:
Video and Book about Single Page Web Applications: http://www.youtube.com/watch?v=OrIFaWJ9Glo