Stages of JavaScript grief

This is one of my favourite blog posts of all time. It is no longer published, but I found it on the wayback machine (internet archive). I am reposting it here for your enjoyment. I hope the original author doesn't mind.

Originally by By Dan Lee, 9 September 2010.


The typical beginning of an Enterprise Developer’s JavaScript education is involuntary in nature. In many cases an engineer with a strong background in Java, or other strongly-typed languages, is informed that their next project requires JavaScript. Like all forced actions, this will be a bumpy road. So bumpy in fact, that the Enterprise Developer will go through a grieving process as they leave behind their beloved strongly-typed language and plunge into the duck-typed world of JavaScript. This process of grief has four distinct stages.

Stage One: Doubt

As I discussed earlier, the Enterprise Developer’s usual introduction to JavaScript is less than stellar. Rightly so, when a developer hears that the next ‘Big Project’ will be done in JavaScript, their first thoughts are of the skeptical variety.

  • Sufferer will indicate that the prospect of using JavaScript will certainly lead to folly.
  • Sufferer will be heard saying things like, “JavaScript? Isn’t that the thing hackers use to screw up your Back button so you can’t leave a page?”

CTO: We've got a sweet new JX-RS REST API in the works and you are going to rewrite the front-end using Dojo! Developer: You do know that Dojo is JavaScript, right?

Stage Two: Hate

Forced to learn JavaScript, the former-Java programmer decides that their 10 years of working with Java is more than enough experience to dive right in. Frustration of the highest order soon follows.

  • Sufferer’s cubicle bookshelf is completely devoid of any books on JavaScript.
  • Sufferer has web browser tab open to W3 Schools.
  • Sufferer’s JavaScript code has been bent, battered, and forced to conform to the look-and-feel of Java.
  • Sufferer’s screams of frustration are easily heard over hum of white-noise generator.

.1 + .2 = .300000000000004!? How in the world was Gmail written with this garbage!?

Stage Three: Begrudging Appreciation

The most important stage. If the Enterprise Developer does not quit in spectacular fashion, the only other choice is to request time from management for some much-needed JavaScript education. Once the fundamental aspects of JavaScript are learned, productive results soon follow. Our Enterprise Developer recognizes that JavaScript has some good stuff in it, has discovered a great JavaScript toolkit like Dojo, and is producing efficient, cross-browser code. To be certain, the developer still hates JavaScript, however, this emotion has been put in check for the good of the project.

  • Sufferer’s cubicle bookshelf contains both JavaScript: The Definitive Guide and Dojo: The Definitive Guide
  • Sufferer has become proficient at debugging problems with Firebug, and cannot fathom a world without it.
  • Sufferer’s code still looks a bit Java-ish, but contains healthy doses of lambda functions, asynchronous callbacks, and other JavaScript goodies.
  • Sufferer begins to think about problem solutions in terms of JavaScript. Periodic returns to the Java world begin to feel awkward.

Meh, I can make the browser do whatever I want.  Still can't believe the whole internet runs on this stuff.

Stage Four: Love

The final stage of JavaScript grief is one of gushing adulation. Most developers will remain indefinitely in Stage Three, but there are exceptions. The developer that reaches the ‘Love’ stage of JavaScript Grief has completely looked past all of JavaScript’s short-comings and finds joy in its powerful concepts.

  • Sufferer’s cubicle bookshelf contains nothing but JavaScript books. Directly below bookshelf, sufferer will often build a shrine to Douglas Crockford and John Resig.
  • Sufferer’s interest in JavaScript has moved beyond the browser. Sufferer will actively look for ways to add JavaScript into other parts of a software stack, usually in annoying fashion.

Server Team; Watch out, here comes JavaScript Fan Boy #1.  Developer: Oh! Hey guys! I was just looking at your JAX-RS code.  I had totally forgotten just how *verbose* JAva is!  I think it's time we took a serious look at rewriting our server-side stuff with Node.js...