6.3.08

Firebug firepalooza

Today I discovered two fantastic extensions to Firebug.

First, I discovered that Steve Souders (creator of YSlow, another excellent Firebug extension) wrote LiveCoder, which allows you to edit and save your code on the fly. It has been on my wish/todo list for a while now, as I use Firebug pretty heavily for testing changes on the fly (especially CSS). Pretty handy when you're making pixel-perfect (emperfect?) layouts or trying to decypher a bug. Seems natural that you should be able to save your changes once you've made them, no? WYSIWIG, people, it's obvious.

I hesitated about posting twice on the same day because... well, I want to watch Lost. But I just came across Firecookie and I really think you people should check both out. Firecookie allows you to tinker with your cookies (not that you couldn't with other extensions) within Firebug.

Firefox 3 and JavaScript 1.8

I finally grew a spine and decided to take the plunge into Firefox 3 beta. Half of my extensions don't work, but only one of them is something I use/need: CS Lite (update: available on addonsmirror). All of these work: Adblock Plus, Firebug (1.1.0b10), GMarks, Google Notebook, Greasemonkey, Secure Login and Stylish. Not bad.

About 15 seconds into my adventure I crashed it. Well, I crash everything pretty quickly after I start using it, I think it's a gift. My dad called it "duodenum hands", although back then it wasn't about programs, it was about... objects in general. Wikipedia says this is where most chemical digestion takes place. As in, destroys everything.

From the what's new in 3.0b3 page, I promply went to "New in JavaScript 1.8". First thing on the list: Expression Closures.

Are you serious? Expression Closures? Ok, it's not obvious what it is. It just means you can do: function (x) x*x instead of function(x){ return x*x; }, when you're using a function as an expression, like: setTimeout(function(){...},10);. It also means it's useless!

First, the only advantage of this feature is that you'll save exactly 8 characters. That's it. Then, nobody supports it. Well, that's understandable, since it's JavaScript 1.8... however, I didn't just mean browsers, I meant IDEs. That's right, you'll be all happy coding along your fancy expression closures and your Aptana will balk, whine and nag. Expression Closures!

Next on the list: generator expressions. Sweet! Surely you understand that Array Comprehensions were available since JS 1.7. Particularly noteworthy, as you know, is that generators aren't run until needed, unlike an array comprehension which is calculated ahead of time. This can be a ginormous performance difference... and you already know this since this is in your every day's cup o' Python.

Hm, that doesn't work as well as Java. Java sucks anyway. Just kidding. But not really.

Skip a bit further down, and you'll see JSON decoding and encoding. While it's not here yet, it's quite interesting. It heralds further adaptation of the next wave of applications: faster, more robust and sort of working in IE11 or whatever :)

Take the plunge. It's fast.