JavaScript: Even Loose Women Deserve Respect

by Larry Spencer Sunday, June 2, 2013 8:38 PM

I have always regarded JavaScript, with its loosely typed ways, much as a Puritan would regard a loose woman. It was to be avoided, and if that were not possible, then interaction should be kept to a minimum and always on my terms. 

Whenever I was forced to do a little JavaScript, I would guess my way through as if I were programming in C, cursing every time one of JavaScript's oddities got in my way.

Then I read Douglas Crockford's JavaScript: The Good Parts. Gosh! It turns out that the loose woman is an actual human being with worthwhile things to say!

I've been interviewing to hire JavaScript developers lately and it seems I'm not the only one who has failed to appreciate JavaScript for what it is. Although my candidates are marketing themselves as JavaScript developers, most of them have no idea what closure is, what happens if you call a function with too many or too few parameters, how JavaScript's scoping rules differ from C#'s, or how to structure a large JavaScript program to keep it from getting out of hand.

Their experience with JavaScript is generally limited to client-side validation and making small tweaks to the UI.

In the next several posts, I will explain features of the language that are apparently outside the experience of many professional JavaScripters, but would be useful to all.

Along the way, I hope to show my fellow C-sharpers that yes, it is possible for a real programming language to have a name that ends in Script.



Add comment

About the Author

Larry Spencer

Larry Spencer develops software with the Microsoft .NET Framework for ScerIS, a document-management company in Sudbury, MA.