About Nicholas C. Zakas

Recent Posts

Mozilla JavaScript extension: __noSuchMethod__

Mozilla’s JavaScript engines have always been a bit different than those from other companies. SpiderMonkey and its Java port, Rhino, had long contained extra features designed to make JavaScript more robust. One such feature is the __noSuchMethod__() method that is available on native objects. In most JavaScript engines, calling a method that doesn’t exist simply... […]

Book review: Learning Dojo

I usually don’t do technical book reviews unless 1) I’m specifically asked or 2) I really like the book. I do this to avoid putting up too many bad book reviews because there are so many bad technical books out there.  When I was contacted about reviewing Learning Dojo, I warned them that I have... […]

JavaScript variable performance

One of the most common pieces of advice regarding JavaScript performance is to favor local variables over global variables whenever possible. This advice has been around for at least as long as I’ve been working web development (nine years) and is never questioned. The basis for this theory is the way that JavaScript handles scoping... […]

New site design

It’s been a long time coming, but I’ve finally updated my site’s design. My contest failed to deliver enough designs for there to be a real competition so I just decided to do a very simple evolution of the previous design. The primary goal for this redesign was to improve the readability of the blog... […]

Speed up your JavaScript, Part 4

Over the past few weeks, I’ve been exploring the various techniques for speeding up your JavaScript. Part 1 covered how to deal with loops that are doing too much. Part 2 focused on functions that do too much and taught techniques such as queuing and memoization to lighten the workload. Part 3 expanded the conversation... […]

Speed up your JavaScript, Part 3

Recursion is the enemy of fast-running scripts. Too much recursion can cause the browser to grind to a halt or quit unexpectedly, and so must be addressed a serious performance problem in JavaScript. In part 2 of this series, I wrote briefly about handling too much recursion in a function through memoization. Memoization is a... […]

Speed up your JavaScript, Part 2

Last week, I covered the first reason why JavaScript can take too long to execute: too much happening in a loop. There’s a similar problem with functions in that sometimes they’re just doing too much. Usually this means there’s too many loops (as opposed to too much happening in a loop), too much recursion, or... […]

Free excerpt from Professional JavaScript, 2nd Edition

Just wanted to post a quick note that Eric Miraglia has posted a sample excerpt from Professional JavaScript, 2nd Edition over at the YUIBlog. The excerpt comes from a chapter called Advanced Techniques, in which I explain, well, advanced JavaScript techniques including function currying, advanced timers, and more techniques that every professional front end engineer... […]

The YUI 3 revolution

In the world of software engineering, the emphasis is typically on evolution. You build a good small thing and layer more functionality on top, slowly evolving the framework into something bigger and better than it was originally. This takes a lot of upfront planning, to make sure that the framework has enough hooks to allow... […]

Speed up your JavaScript, Part 1

In my last post, I talked about the conditions under which the dreaded long-running script dialog is displayed in browsers. Browsers will stop executing script either when they’ve executed too many statements (Internet Explorer) or when the JavaScript engine has been running for a specific amount of time (others). The problem, of course, isn’t the... […]