Crockford on JavaScript

CrockfordThings are turning upside down! I never though I’ll ever spend one more minute on JavaScript, and now… I don’t know. I just completed the 5 sessions lecture of Douglas Crockford on JavaScript, Crockford on JavaScript, and I’m quite intrigued by what I found out.

10 years ago Douglas met JavaScript with the same disregard and distaste as most of us did. Now he is Yahoo!’s JavaScript architect and a member of the ECMA committee designing future versions of the world’s most popular programming language.

Is JavaScript a real pain in the… rear? Yes. Is JavaScript broken? Yes. Will JavaScript die? Hmm… Not so soon. JavaScript turns to be a high level language, higher than expected, more related to Scheme (a dialect of Lisp) and Self (an object oriented language based on the concept of prototypes), fully capable of functional programming. From Java it inherited some syntax and, by a sequence of events, the name.

Even if Douglas looks like a real programmer, (in the above picture he holds a punched card, and he confessed to enjoy assembly programming!), he is not only a very knowledgeable guy, but also a great showmen.

He is fun to watch, he is alert when he needs to, he surprises the audience with plenty of jokes, he makes fun of Netscape, of Microsoft, of everybody, including Yahoo! (“… Say you go to Yahoo! Search, [pause] or Bing, or Ask, or anywhere else, and you google for something…“). On the stage he brings a dummy dressed in a soviet uniform, and he starts with “Greeting Comrades!“. He names all 5 sessions using different naming schemes. But he mainly makes fun of JavaScript. He is a really smart guy.

Crockford on JavaScript

The first of the sessions (“Volume One: The Early Years“) is a great history lesson. He starts with Jacquard Loom, the Hollerith Card Tabulating Machine, assembly language, teletypes, IBM, minicomputers, 8080 and Intel, early programming languages, Apple HypeCard, the Xanadu project, World Wide Web, and finally discovers… JavaScript.

The second session (“Chapter 2: And Then There Was JavaScript“) unveils the origins of JavaScript, as an implementation of Apple HyperCards for the Netscape web browser (LiveScript then). Then he presents the Netscape – Microsoft saga, and how we ended up with ECMAScript (“maybe the second worst name ever put on a programming language“).

The next session (“Act III: Function the Ultimate“) is a bit more technical, and presents JavaScript functions from the perspective of functional programming (“the very best part of JavaScript“). Function objects in this language are first class. Functions use closures, a very subtle but powerful concept. Functions are objects, are dynamic and you can manipulate them in many ways. Functions make JavaScript a very powerful language.

The fourth session (“Episode IV: The Metamorphosis of Ajax“), starts with the history of the first invention called Ajax (back in the 16th century, during Queen Elizabeth I time), and by knowing this we also have now an idea why Ajax ‘smells’ so bad. :-) Then comes the Netscape DOM, another ‘bad smelling’ thing. “Then suddenly Ajax happens… the Ajax Revolution gave JavaScript a second chance. The Ajax Revolution succeeded because of the goodness that was in JavaScript”.

The final session (“Part 5: The End of All Things” – after Volume One, Chapter 2, Act III and Episode IV!), surprises us again, since Douglas is dressed in a tuxedo! He celebrates 10 years since he met JavaScript. He then makes some important security considerations regarding current Ajax libraries, presents undergoing changes in future versions of to the language, performance considerations, and valuable advices for programmers.

Although in the beginning the whole lecture looked intimidatingly long (5 sessions!), it turned out to be a very exciting and captivating experience. It did not change my conviction that JavaScript and Ajax should be avoided as much as possible, but “allowed me to make the first important discovery of the 21st century, which was that JavaScript has good parts“. :-)

Great experience, if for no other reason at least for the historical details. Recommended!

[Credits: many thanks to my friend Dan Maiorescu for pointing this out]


About Liviu Ionescu (ilg)
Hi! My name is Liviu Ionescu (ilg, ilegeul or eunete for colleagues and friends) and I’m a senior IT engineer. Or should I say a real programmer?

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

%d bloggers like this: