Categories
JavaScript Venkman

Crockford on JSMin and Obfuscation

Douglas Crockford knows a thing or two about compressing JavaScript. He wrote JSMin which IMHO is the simplest and fastest JavaScript minifer out there today. Coupled with his lint checker JSLint you’ve got two really good tools to write good solid code. I used JSMin to optimize digg.com’s homepage a few weeks back. As more and more AJAX apps start to take advantage of JavaScript the size and footprint grows dramatically. Even more so when folks import the various AJAX toolkits as a starting point. This means that tools like JSMin become a required part of the build/deploy process for those that are serious about optimizing end-user experience. There are other excellent minifer tools out there including Alex’s ShrinkSafe which is based on Rhino. ShrinkSafe takes an aggressive approach to not modifying the API’s as it uses a real JavaScript compiler/run-time to shrink the code. This is important when you don’t want your public API to change as is true for any JavaScript toolkit developer. Crockford makes the point that obfuscation is really just a small hurdle and any serious programmer, given time can extract the useful bits. This is especially true for JavaScript where no matter how much mangling of the code is done before it’s sent to the browser it’s still sent in plain text. So it’s trivial to attach a debugger like Venkman and walk through each line of code. Glad to see Douglas putting focus back on JavaScript as noted by his many recent updates to JSLint and now his first blog entry on the Y! UI blog. I’d also guess that Yahoo’s focus on JSON for their REST api’s is in part due to Doug joining them.

ref: Minification v Obfuscation » Yahoo! User Interface Blog

Kevin Henrikson
Kevin Henrikson is a seasoned technology executive and entrepreneur with deep expertise in building productivity tools and scaling engineering teams. After serving as Vice President of Engineering at Instacart, where he led the Shopper & Fulfillment Engineering organization, he became the founder and CEO of Dust Labs. Prior to Instacart, Kevin co-founded Acompli, which was acquired by Microsoft; there, he led engineering for Outlook on iOS, Android, and Mac. Earlier in his career, he played key roles at Zimbra, contributing to its acquisition by Yahoo! for $350 million. Kevin is also the co-founder and former CTO of Alpha Brand Media, a digital media publishing company. As an angel investor, he supports entrepreneurs working on disruptive solutions in mobile, crypto, enterprise SaaS, and consumer internet sectors.
Kevin Henrikson
Kevin Henrikson

Latest posts by Kevin Henrikson (see all)

By Kevin Henrikson

Kevin Henrikson is a seasoned technology executive and entrepreneur with deep expertise in building productivity tools and scaling engineering teams. After serving as Vice President of Engineering at Instacart, where he led the Shopper & Fulfillment Engineering organization, he became the founder and CEO of Dust Labs. Prior to Instacart, Kevin co-founded Acompli, which was acquired by Microsoft; there, he led engineering for Outlook on iOS, Android, and Mac. Earlier in his career, he played key roles at Zimbra, contributing to its acquisition by Yahoo! for $350 million. Kevin is also the co-founder and former CTO of Alpha Brand Media, a digital media publishing company. As an angel investor, he supports entrepreneurs working on disruptive solutions in mobile, crypto, enterprise SaaS, and consumer internet sectors.