Don’t learn DOJO nor Prototype. In fact: Just use them.

Another article about javascript libraries was posted today. This time by Simon Willison. His point is that Joel Spolsky’s article “The Law of Leaky Abstractions” is head on the nail, I say you should read it and you will agree on most of it:

The law of leaky abstractions means that whenever somebody comes up with a wizzy new code-generation tool that is supposed to make us all ever-so-efficient, you hear a lot of people saying “learn how to do it manually first, then use the wizzy tool to save time.” Code generation tools which pretend to abstract out something, like all abstractions, leak, and the only way to deal with the leaks competently is to learn about how the abstractions work and what they are abstracting. So the abstractions save us time working, but they don’t save us time learning.

This is of course true. But on what abstraction level do we need to learn? Do I need to learn how the algorithm on replication between to Notes Servers are coded? Do a fellow web-programmer really need to understand the logic behind a window.open()?

I don’t think so, it’s perfectly okay to just know that window.open() opens a new window in the web browser. If something then is doing unwanted things, ok, let’s start learning on this specific piece of code and make sure your organization has the proper tools for knowledge sharing so that not everyone needs to track down the same bug.

So, on what abstraction level should the average web developer be then? It’s of course an impossible thing to answer because it differs. On my company we don’t have any specific ‘levels’ that you must be on. Someone is awesome on complex OOP in javascript, another knows all the IE-Hacks etc there is to know in CSS, a third is king on setting cache-rules in the HTTP headers. It would make no sense if everyone had to learn this the long and manual way, instead I just copy some CSS code from our repository and my images floats away nice and decent, without me understanding why. After some copy’pasting and slightly modifications I will gain more experience in the field without costing the clients to much.

The same thing must go for the as well, I’m certain that it’s much better to learn the features in one of those libraries than it is for (everybody) to examine and learn the code in the same library.

Leave a comment

Your comment