JavaScript Pretty Date

One method that I’ve been wanting for quite a while now was a simple way to format old JavaScript dates in a “pretty” way. For example “2008-01-28T20:24:17Z” becomes “2 hours ago”. Here’s some more examples: Note that I only care about dates in the past (by far the most common use case) and only dates […]

Comment · Posted: January 29th, 2008

Analyzing Timer Performance

A big push of Firefox 3 has been to improve its overall performance (memory, speed, ui responsiveness, JavaScript, etc.). One thing that I wanted to see get a little love was the performance of timers (setTimeout and setInterval). However, in order to make my case, I had to do some analysis. I built a super-simple […]

Comment · Posted: December 18th, 2007

JavaScript Array Remove

I have another handy method, that I recently developed, that allows you to simply remove an item – or a group of items – from an array. Like with my implementation of JavaScript Method Overloading I wanted something that was concise, elegant, speedy, and highly effective. So here’s the method that I came up with: […]

Comment · Posted: December 3rd, 2007

JavaScript Method Overloading

In a side project that I’ve been working on I built a quick-and-dirty function for doing simple method overloading. For those of you who aren’t familiar with, it’s just a way of mapping a single function call to multiple functions based upon the arguments they accept. Here’s the function in question: and here is how […]

Comment · Posted: November 13th, 2007

Easy PDF Sharing

So everyone has been breaking my back over using SlideShare to distribute my presentations – and for a good reason: It’s not open and it uses a proprietary distribution format. Don’t get me wrong, I love SlideShare, but for what I was using it for (a way to embed presentations into a blog post), I […]

Comment · Posted: November 11th, 2007

JavaScript Engine Speeds

Recently, I’ve been spending a lot of time analyzing the speed of pure JavaScript engines, looking at how well they perform and what their particular strengths and weaknesses are. To start with, I analyzed the bleeding-edge code from: Rhino Spidermonkey (Firefox 3) Tamarin (Firefox 4?) JavaScriptCore (Safari 3) Right now I’m only looking at pure, […]

Comment · Posted: September 17th, 2007

Bringing the Browser to the Server

This weekend I took a big step in upping the ante for JavaScript as a Language. At some point last Friday evening I started coding and didn’t stop until sometime mid-Monday. The result is a good-enough browser/DOM environment, written in JavaScript, that runs on top of Rhino; capable of running jQuery, Prototype, and MochiKit (at […]

Comment · Posted: July 9th, 2007

Fuel 0.2 Progress

In case you missed it, Fuel 0.1 recently landed in Firefox 3.0a4. Fuel 0.1 focused on building a solid foundation for further development; laying a good application and events layer, and building out Preference management. Much of our original plan was scaled back due to the nature of how JavaScript APIs need to be written […]

Comment · Posted: May 18th, 2007

Next entries » · « Previous entries

Secrets of the JavaScript Ninja

Secrets of the JS Ninja

Secret techniques of top JavaScript programmers. Published by Manning.

John Resig Twitter Updates


Infrequent, short, updates and links.