The Bungee Blog

News, updates and rants around The Bungee Book (the landmark book on Prototype and script.aculo.us)

Archive for the 'Debugging' Category

No more excuse not to upgrade to 1.6!

I finally find a moment to spread the good news: Tobie equipped Prototype with a deprecation/removal assistance layer. This extra deprecation.js file, to be loaded right after Prototype, spews clear, detailed, advise-replete messages in your Firebug console whenever your scripts use a now-removed or deprecated feature from earlier versions of the lib.

It’s a great help for migrating, and migrate you should. Get the whole details, usage recommendations, and grab the file on the relevant post at the Prototype Blog.

No comments

The Ghosts of Absolute Uncertainty

Right.

So I get my first review on Amazon.com, and what do I learn in there? That my ghosting example b0rks. Dang! The code is simple, so what gives?

Well, it so happens that my own code in Scripty’s ghosting support for non-absolutely-positioned elements is flawed: it relies (for a reason I can’t fathom in retrospect) on expandoes, and attempts to remove them when it’s done, which IE (both 6 and 7) does not support (it lets us removeAttribute it though).

As a reminder, an expando property is a custom property you slap onto an unsuspecting DOM element. You can think of it like a custom attribute on an HTML tag, but at the DOM level.

This issue was noticed before, too, and a ticket was opened in Trac a month ago, but I sadly confess I have no time these days to monitor anything in the Trac but the changesets.

Since expandoes are unnecessary in this very context, I stripped the superfluous indirection in the source code, created a patch, updated the ticket and my book’s online codebase (both the expanded file and the archive files).

So feel free to grab the new files and go along! I can only hope Thomas will apply the fix soon, so the official release is in sync.

Update Jan 21: Thomas applied the patch. You can grab the edge version from Subversion trunk.

No comments

Leveraging the powers of Firebug

Joe Hewitt himself seems always taken aback that his dear little extension is such a big deal to Web developers. As he once put it when chatting with me back in July at TAE West, “it’s just a bunch of scripts!”

Right.

I, like tons of other web devs, strongly believe that Firebug should be a critical implement in every serious web developer’s toolkit. It’s not just a “bunch of scripts,” it’s a cohesive, effective toolset able to spare us tens of hours of debugging-in-the-dark.

Still, I feel like lots of people under-use it dramatically. It’s not just the DOM-based HTML view, or the JavaScript debugger, or the console. It’s so much more. Perhaps that endemic under-use is due to the fact that a lot of people “learned” Firebug when it was in 0.4 or something, and didn’t quite take the time to delve into the countless improvements in 1.x.

So I’m glad to see so many docs pop up online, most of them pretty good and tutorial-like, so that more and more users get a chance to really squeeze the sweet power out of one of our most beloved extensions.

  • Phil Rees, for example, as a developer of the Google Mashup Editor, uses a mashup creation demo as a story to go through many of Firebug’s critical features. I like the running-example approach, it just works well.
  • Firebug’s website itself features quite a bunch of tutorials, demos and screencasts in its documentation section, which I urge you to read through.
  • Michael Sync has been writing a series of tutorial articles on his blog, starting on September 8, 2007, which are also a good help.

There’s no good dynamic webapp development without Firebug, lads. Get on it for real.

And hats off to Joe.

No comments