Understanding “Prototypes” in JavaScript
For the purposes of this post, I will be talking about JavaScript objects using syntax defined in ECMAScript 5.1. The basic semantics existed in Edition 3, but they were not well exposed. A Whole New Object In JavaScript, objects are pairs of keys and values (in Ruby, this structure is called a Hash; in Python,...
Understanding “Prototypes” in JavaScript
For the purposes of this post, I will be talking about JavaScript objects using syntax defined in ECMAScript 5.1. The basic semantics existed in Edition 3, but they were not well exposed. A Whole New Object In JavaScript, objects are pairs of keys and values (in Ruby, this structure is called a Hash; in Python,...
Understanding JavaScript Function Invocation and “this”
Over the years, I’ve seen a lot of confusion about JavaScript function invocation. In particular, a lot of people have complained that the semantics of `this` in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other...
Understanding JavaScript Function Invocation and “this”
Over the years, I’ve seen a lot of confusion about JavaScript function invocation. In particular, a lot of people have complained that the semantics of `this` in function invocations is confusing. In my opinion, a lot of this confusion is cleared up by understanding the core function invocation primitive, and then looking at all other...
Using SproutCore 2.0 with jQuery UI
One of the goals of SproutCore 2.0 is to make it trivial to integrate the tools you’re already using together with SproutCore. One way that we do that is to make it possible to drop a SproutCore app into a small part of your existing page. Greg Moeck did a great job demonstrating this functionality...
Using SproutCore 2.0 with jQuery UI
One of the goals of SproutCore 2.0 is to make it trivial to integrate the tools you’re already using together with SproutCore. One way that we do that is to make it possible to drop a SproutCore app into a small part of your existing page. Greg Moeck did a great job demonstrating this functionality...
Getting into arguments with JavaScript
The arguments object in JavaScript looks like an array, but really it is just an array-like object. It has a length property that returns the number of arguments supplied to the calling function. And callee, which actually returns the calling function....
Self Awareness (an exploration of the JavaScript Module Pattern)
In starting a new JavaScript plugin, my coworker (Enrico Rubboli) and I began by looking at various design patterns to determine what would best suite our needs. After a bit of research we decided to go with the self executing module pattern. For examp...
Announcing Handlebars.js
For a number of years, I’ve been about as active in client-side development (through jQuery) as I have been active in server-side development (through Merb and then Rails). Recently, I’ve released a couple of libraries (jQuery Offline and Rack::Offline), designed to make it easier to build applications that can withstand both flaky connections and a...
August 26, 2010: Some New Stuff
Book Status RSpec chapter draft handed in to edit. It’s going to need a better conclusion. A lot changed in this one, relative to the Lulu version — this is probably the chapter most affected by my own personal experience since it’s original version. Links Haven’t done a link set in a while, this is...
July 8, 2010: Who Needs a Hero?
Book Status Beta 4 should be going out Real Soon Now. As far as I know everything is ready and we’re just waiting for it to actually be generated. Still working on legacy coding chapter. Links A couple of links about hiring today. One debate is between Ben Orenstein and Brian Liles about whether you...
July 2, 2010: Cease and or desist
Book Status And now I turn my lonely eyes to the chapter on testing legacy code. I liked this chapter in the original book, and it’s something I get asked about pretty consistently, so I really want to make it great. Links I’m personally going to spend a lot of time with David Chelimsky’s post...

