Show all feed information | Ping Blog Update
There's been a lot of discussion this week about the "hashbang", that ugly little bit you find in the middle of URLs like this one: http://twitter.com/#!/ded/status/18308450276 . I wanted to provide a rebuttal to the arguments that the hashbang is bad for the Web, based on a lot of discussions …
Included in the laundry list of new features that are descending on the world of web development with HTML5 are two quite nice ones: History Management and the hashchange event . These two features allow for much richer and faster JavaScript applications. Let's start with a quick overview of …
The engineering culture at Twitter requires tests. Lots of tests. I haven't had formal experience with JavaScript testing before Twitter, so I've been learning a lot as I go. In particular, a number of patterns I used to use, write about, and encourage have turned out to be bad for writing …
When writing unit-tests for code, a common technique is spying , where you set expectations on a method's invocation, run some code, and verify that the method was invoked as expected. This is pretty straightforward. Here's a simple example using JsMockito : function foo(a) { return a; }
foo = …
The most common complaint with using closures to keep private variables in JavaScript is that it makes debugging harder. This complaint definitely holds water, and the loss of easy debugging and inspection using the Module Pattern is a serious concern. This is where one of JavaScript's …
Like most object-oriented programming languages, JavaScript provides built-in ways to convert between objects and primitive values, by way of the special toString and valueOf methods. This article will cover the basics of these methods, but then dive into the details of how this stuff really …
One of JavaScript's most convenient features is the object syntax. Objects are so easy to work with. You've got a lot of ways to make them, although the object literal syntax in particular kicks ass. You can access and assign them with either the dot operator or dictionary syntax. Missing …
"JavaScript: Better and Faster" is the name of a presentation I gave at Slide last week. It was generally well-received by the Slide crew so I decided to put a (slightly edited) copy of the accompanying slideshow online (runs in your browser). It's not particularly dense, and doesn't get into …
The module pattern is a common JavaScript coding pattern. It's generally well understood, but there are a number of advanced uses that have not gotten a lot of attention. In this article, I'll review the basics and cover some truly remarkable advanced topics, including one which I think is …
One particular weirdness and unpleasantry in JavaScript is the set of equality operators. Like virtually every language, JavaScript has the standard == , != , < , > , <= , and >= operators. However, == and != are NOT the operators most would think they are. These operators do type …
Ben Cherry
Entrepreneur, Engineer, Formerly at Twitter. Fond of JavaScript. Dating the awesome @maggdominguez. http://t.co/q6ctO9y
@assaf Hmm, aren't zombies insanely slow, and their head/brain is the critical component? (Zombie looks great!)@bcherry
San Francisco, CA