Category Archives: Javascript

The language that makes whiz-bang features work (or not) in a web browser.

Simple Node Server

Here is an example of a very simple lighttpd/nginx-style web server written in NodeJS.

I’ve called it simple-node-server or “sns” for short, and you can fork it on my github account.

There are a lot of folks building SSJS clones of Django and WSGI and Rack the like. However, Python and Ruby have blocking IO, and …Read More

CSS vs Tables: You’re Doing It Wrong

Definitions first.


A specified set of columns and rows with cells that automatically and fairly smartly expand to fit their contents; cells can span rows or columns; the table as a whole can be treated as one block, and cells can contain tables. A table is a metaphor for visually laying out 2-dimensional content.


cascading style sheets; …Read More

The Haiku OOO Email

When I started at Yahoo on the Games team, there was a custom that resonated deeply with me, which was started by Dean Yu.

All “work from home” emails or “out of office” emails had to be sent in the form of a haiku. This rule was not enforced, but it’s the kind of thing …Read More

YUI’s “Module Pattern” vs. Prototype’s Class Function

Via Geoffery Moller, I came across this article on Matt Snider’s blog. I’m surprised that no one noticed what (to me) was the most relevant difference in the libraries that he evaluated.

The “YUI method of class creation” is not distinctively YUI—it’s just what Javascript gives you for free. You can use the “Module …Read More

Javascript Style Tip: Use “in” and “delete”

Javascript provides two very handy operators, in and delete.

Consider this code fragment:

var obj = {

 foo : ‘quux’,

 bar : ‘baz’,

 doSomething : function () {

  // do something…



So, we’ve created an object, and then some other things happen. Later in the code, we want to remove the “foo” property, so we do this: = undefined;

Still later, we …Read More

Memory Leaks in Microsoft Internet Explorer

I originally posted this at on Monday, October 23rd, 2006.

Memory Leaks.

What are they? How do they happen? What can be done about them?

This is a great question, and a topic that has a lot of mysticism surrounding it. Like most Javascript issues, there’s been a lot of very bad “authoritative” suggestions.

If …Read More