My Software Notes

Useful things I discover

Archive for December 2010

JavaScript: I Repent

leave a comment »

I admit it – I have sinned.  I’ve been proud and arrogant.  

For years now I’ve had “JavaScript” listed on my resumé as one of the languages I know.  I listed it because, you know, JavaScript “isn’t really a language anyway” and I can “get by” with what I need to do with it because “nobody really develops with JavaScript” and anyway “JavaScript sucks”.  

Oh, the justifications for my arrogance.  It’s embarrassing now to look back and realize that I was daring to use a language that I knew virtually nothing about.

Well all that has changed.  I repent.  I have seen the light. (Praise dee Lord.  Hallelujah.  Etc., etc., etc.)

I will now admit the truth:  JavaScript is a real programming language.

And (until just a few days ago): I don’t really know how to program with it.

I think Douglas Crockford says it best in his brilliant book “JavaScript: The Good Parts“:

JavaScript is most despised because it isn’t some other language. If you are good in some other language and you have to program in an environment that only supports JavaScript, then you are forced to use JavaScript, and that is annoying. Most people in that situation don’t even bother to learn JavaScript first, and then they are surprised when JavaScript turns out to have significant differences from the some other language they would rather be using, and that those differences matter.

I just read that book from cover to cover and I can now honestly say for the first time that I actually understand JavaScript.  It IS a language and (when you use only the “good” parts) it’s quite an amazing language and (other than its syntax) it is NOTHING LIKE Java or C or C#.

How I program  JavaScript has changed dramatically – there is just no comparison to what I was doing before.

I’ve been regarding jQuery as the “solution” to JavaScript, but now I realize that jQuery is the solution to the DOM and that understanding JavaScript vastly improves my ability to use jQuery well.

If you haven’t read the book “JavaScript: The Good Parts” or watched the video series “Douglas Crockford JavaScript Master Class” then you don’t understand JavaScript well enough to use it correctly and you will be using it as if it is some other language and  making dumb mistakes (just like I did) that will be driving you crazy and making you curse JavaScript and wishing it would be cast into the pit along with whoever came up with it.  

So read the book and watch the videos and you too will see the light. Hallelujah!

Written by gsdwriter

December 19, 2010 at 12:04 pm