Thursday, September 23, 2010

Downhill Furniture Race and 30th Birthday Celebration

In a little more than a week, I'll be turning 30, which means I have precious few days of my 20s left to do stupid things and chalk it up to "emerging adulthood". What kind of stupid things, you ask?

Downhill Furniture Race and 30th Birthday Celebration

When: Saturday, Oct 2 - 2pm onward - Couches start rollin' at 4pm, sharp!
Where: Woodlawn Park - Shelters 4 or 5
What: Wheels + Furniture + Steep Hill
After party: Smokin' Petes BBQ in Ballard or UW Medical, as appropriate

Anyone who has known me long enough can tell you that I have a soft spot for putting wheels on things and racing them down hills. Basically, the following thought bubble pops into my head every few minutes:

We've got some furniture we want to get rid of and thus a dream is born.

For Racers:

Want to join the fun? We'll be setup starting at 2pm in one of the shelters on the map, working on our vehicles. I'll have a couch and chair, some wheels, some tools, and some crazy ideas. Feel free to join in. You'll be amazed what a few bucks will buy you at the Goodwill. If you do plan on racing, bring a helmet. Note that brakes and steering are encouraged when contemplating your design. Races officially start at 4pm, rain or shine!

For Observers:

Don't feel like death defying? Come watch the mayhem anyway. We'll be setup from 2pm onward working on the furniture. Feel free to come hang out. Refreshments and snacks will be provided. Races officially start at 4pm, rain or shine!

For the glory:

What's at stake here? How about the illustrious Winner's Cup!

Also, after the racing and assuming anyone is left alive, we'll be after-partying at Smokin' Pete's BBQ in Ballard and probably drinking away our troubles in some Ballard bar after that.

Planning on coming? Planning on racing? Drop me an email at bdferris@gmail.com to let me know.

Monday, February 1, 2010

Nerd: Trouble with Google Maps API, script tag, and jspx

I use jspx in a couple of places for OneBusAway, which is an XML-ified version of the venerable Java Server Pages (jsp) standard. I recently had a mysterious issue where I couldn't get a page to load properly that was referencing a <script> element for loading the Google Maps API. It turned out to be a problem with the way a jspx file is treated as an XML document. In my source file, I had something like this:

<script type=\"text/javascript\" src=\"…\"></script>

However, when that snippet is parsed as XML and spit back out again, it ends up looking like:

<script type=\"text/javascript\" src=\"…\"/>

That's a problem, because the Google Maps API does some script injection in the head of the html document on loading that seems to break if you use <script/> instead of <script></script>. Why? I don't really know. However, it was an issue on Firefox 3.5 that almost drove me insane.

Thankfully, there is a simple hack to fix the issue. Just insert a CDATA section in your own script tag and it won't be collapsed by the XML parser:

<script type=\"text/javascript\" src=\"…\"><![CDATA[<!-- -->]]></script>

Did the trick for me. I post it here so that Google might index it and help out somebody else out there some day.