Google Closure Library and Optimizer
November 06 2009
Google has open-sourced the javascript library and optimizer they use in gmail and other web applications. They call it "Closure" and you can read about it here. While the optimizer looks very cool, I think the library is most... read moreMy Ruby Book on your iPhone. Cheap!
August 24 2009
O'Reilly has just released The Ruby Programming Language as a standalone iphone app! Looks like you can get your hands on it for just $5 (The cover price of the print edition is $40.) I don't have an iphone, but... read moretypeof, isFunction vs. isCallable, now and in ECMAScript 5
August 24 2009
Function objects in JavaScript are callable: you can invoke them. Other, non-function objects are allowed to be callable, however. Host objects in IE (things like Window.alert()) are callable, but are not native function objects. (Other browsers implement DOM methods as... read moreArray.some is like forEach() with an early termination option
August 19 2009
I was recently writing some documentation for the Array.forEach() method (part of ES5, but most browsers other than IE support it now) and worrying about the fact that there is no clean way to terminate the iteration prematurely. Nothing like... read moreGood algorithms are better than clever code
August 18 2009
Yesterday, I posted an entry about a clever way to implement string multiplication in JavaScript using Array.prototype.join() In comments, redraiment challenged me, suggesting that an implementation based on string doubling would be more efficient. Sure, I thought, for really large... read moreString Multiplication in JavaScript
August 18 2009
In Ruby, the "*" operator used with a string on the left and a number on the right does string repetition. "Ruby"*2 evaluates to "RubyRuby", for example. This is only occasionally useful (when creating lines of hyphens for ASCII tables,... read moreProposed coding convention for closures
May 15 2009
By now, many of us have gotten used to using closures in JavaScript to define a scope that holds private variables and utility functions so that we don't have to put these in the global namespace. The idiomatic code... read moreNew version of Jude, plus Java 1.5 server JVM bug
April 27 2009
I've just released Jude version 1.07. This is a relatively minor bug-fix release. Thanks to B.L. for reporting the bugs and helping to isolate them. Interestingly, one of the bugs reported against the previous version was an ArrayIndexOutOfBoundsException at a... read moreNew ECMAScript version numbering scheme
March 30 2009
Per a post today on the es-discuss mailing list, the next version of the JavaScript standard will be ECMAScript 5. This version was previously called ECMAScript 3.1, and is a relatively small and long-overdue update to the language. Version 4... read moreNovember 14 2008
While researching Ruby's new-in-1.9 Object methods untrusted?, untrust, and trust, I discovered something I did not know about the $SAFE variable: in addition to being Thread-local, it is also Proc-local. Proc objects (both procs and lambdas) have their own... read moreNovember 06 2008
President-elect Obama sure writes and delivers a great speech! My favorite line from his victory speech last night: put their hands on the arc of history and bend it once more toward the hope of a better day. I... read moreOctober 28 2008
I've migrated my site to a new webhost, and am now trying to upgrade my blogging software... Comments are broken, and other stuff is too!... read moreOctober 28 2008
The comments on my last post about method chaining in JavaScript were spectacular, and I want to publicly thank all who took the time to read my code and think about it. The final version of the code (which you... read moreMethod chaining in JavaScript inheritance hierarchies
October 28 2008
In the 5th edition of my JavaScript book I made the embarrassing mistake of recommending a constructor and method chaining technique that only works for shallow class hierarchies--it works when class B extends A, for example, but not when... read moreOctober 28 2008
The Ruby Programming Language has been gratifyingly well received by readers and reviewers. In addition to glowing reviews at rubyinside.com and slashdot.org, it has been reviewed ten times at amazon.com and I proud to say that all ten reviews... read more