An Argument Against JavaScript Minification

Developers learn by example. This is no secret. The first advice given to new developers is to read a lot of good source code and the best advice given to experienced developers is to read a lot of good source code. Canonical texts for many languages let the source code say far more than the text. I’m thinking of text’s like Kernighan & Ritchie and Friedman & Felleisen.

When the world wide web was in its infancy view source was the best tool for wannabe webmasters learning their craft. Sure, bad designs and bad decisions propagated quickly. But good designs and good decisions propagated too. Those who really wanted to learn found best of breed web sites and quickly copied, edited and pasted their way to a beautiful site, learning much about web design in the process.

I would argue that JavaScript is still in its infancy. Developers are building complex web applications and in the process distilling years of hacking experience in to solid design. And we are hiding all this knowledge from the public for performance gains. The irony is that the JavaScript developers writing the best code are the JavaScript developers that minify. In effect we are hiding the best public source of information on JavaScript web development behind nebulous performance gains.

Is it worth it? Google serves billions of pages a day. Do you?

See also

comments powered by Disqus