Blog
At a fundamental level it’s important to understand how JavaScript timers work. Often times they behave unintuitively because of the single thread which they are in. Let’s start by examining the three functions to which we have access that can construct and manipulate timers. var id = setTimeout(fn, delay); – Initiates a single timer which […]
Comment ·
Posted: February 24th, 2008
It’s that time of year again – the annual South by Southwest conference is nearly upon us! This year I submitted two panel topics and had one accepted: Secrets of JavaScript Libraries. Secrets of JavaScript Libraries This is going to be a stand-out panel, I can feel it in my bones: This talk will delve […]
Comment ·
Posted: February 22nd, 2008
After my earlier post on analyzing JavaScript timer performance a lot has changed, especially in Firefox 3. An excellent patch landed the other day which is giving us some excellent performance improvements – not the least of which is related to timers. If you remember from before I took a look at how responsive JavaScript […]
Comment ·
Posted: February 21st, 2008
When doing DOM-based performance testing you frequently need to pick a sample HTML document to work against. This raises the question: What is a good, representative, HTML document? For many people a good document seems to file into one of two categories: A large web page with a lot of content. When we did our […]
Comment ·
Posted: February 20th, 2008
A great blog post, for me, was one written by PPK back about two years about in which he explained how the contains() and compareDocumentPosition() methods work in their respective browsers. I’ve, since, done a lot of research into these methods and have used them on a number of occasions. As it turns out they’re […]
Comment ·
Posted: February 19th, 2008
I was playing around with timers the other day, trying to see how different browsers handled different edge cases, when I stumbled across a fascinatingly bizarre quirk in Internet Explorer. I wouldn’t call it a bug, per se, since that would imply that there was an excepted result, but there is not. The code: setInterval(function(){ […]
Comment ·
Posted: February 16th, 2008
I’ve had the pleasure of interviewing a number of people to work for Mozilla and plenty of developers for the jQuery core team. There’s a lot that I’ve learned about what makes a good candidate and I’d like to point it out, as it’s generally quite different from most organizations looking to hire. Also, even […]
Comment ·
Posted: February 15th, 2008
Partially applying a function is a, particularly, interesting technique in which you can pre-fill-in arguments to a function before it is ever executed. In effect, partially applying a function returns a new function which you can call. This is best understood through an example: String.prototype.csv = String.prototype.split.partial(/,\s*/); var results = "John, Resig, Boston".csv(); alert( (results[1] […]
Comment ·
Posted: February 14th, 2008
Next entries » ·
« Previous entries