prototype.js broke my hashes!

As of this morning, I finally tracked down a bug that was biting me for the last 2 weeks and preventing progress on a personal project.

The long version is too long to bother to post, but the short version is that this article knows what it’s talking about :)  Prototype.js extends a bunch of built-ins, including Array, so some code I had iterating over the keys in an array broke.

http://ajaxian.com/archives/javascript-associative-arrays-considered-harmful

A nice side effect is I’m much better with javascript debugging in firebug and VWD now. :)  Another argument for doing your javascript code in Ruby (or whatever – Script# works well from what I hear, and I’d imagine GWT works well for the Java world) and letting the javascript get generated – at least for those of us that, as GWT’s page says, “don’t speak browser quirks as a second language”

About these ads