Wednesday, December 31, 2008

Happy New Year! And welcome back, Zune-sters!

Amazingly, someone has already determined the flaw causing all those Zunes to lock up today.

When I checked this MAKE magazine article describing the bug (part of the free runtime library provided by Freescale), all the code was rendered as left-aligned text in my browser.

year = ORIGINYEAR; /* = 1980 */

while (days > 365)
if (IsLeapYear(year))
if (days > 366)
days -= 366;
year += 1;
days -= 365;
year += 1;

I couldn't see the flaw. Can you?

I reformatted the code in TextMate, and the problem became apparent.

year = ORIGINYEAR; /* = 1980 */

while (days > 365)
  if (IsLeapYear(year))
    if (days > 366)
      days -= 366;
    year += 1;
    days -= 365;
    year += 1;

Can you see it now? Thought so. I wonder how many people will complain about their Zombie-Zunes on Dec 31, 2012?

Monday, December 8, 2008

Free Flex and AIR resources? We can haz!

Free AIR and Flex training. Bring it on!

Fellow Vancouverite Duane Nickull informed me that the sessions he was running at both MAXen (MAXes? What is that the correct pluralization? Where's RubyOnRails when you need it!) are now available online.

The AIR Boot Camp session is intended to give you an overview of how you can leverage your existing Web developer tools to create desktop apps using the AIR platform, including the recently released AIR 1.5 runtime.

The Building Flex service clients session gives you an overview of consuming web services from a Flex app, with links to preconfigured WAMP and MAMP stacks to test against.

Also, make sure to check out the great Tour De Flex app, available both as a standalone AIR app, and an eclipse/FlexBuilder plugin.

Don't be fooled by the default view in Tour De Flex. At first glance Tour De Flex looks like a less full-featured version of the Flex Style Explorer, but check out that combo box that says "Flex Core Components". Other choices will reveal live apps and sample code for consuming well over a dozen popular clouds APIs like Twitter, Flickr, and Amazon, as well as demos/samples for Google/Yahoo/Mapquest maps.

Got something cool to share? Submit it to the form and it may show up in the next publish phase.

Friday, October 17, 2008

Quickly change the font size in Eclipse: Handy for presentations!

The internet fairies were kind to me today.

Over a year ago I whined in this blog about how much time was wasted in conferences / presentations / code walkthroughs while trying to change the font size of the text editor in the IDE so that people at the back could see.

And last night, out of the blue (the interwebs are blue, right?), I received an email from Adrian Kuhn in Switzerland saying "Wish granted!"

Download the jar Adrian has posted here and copy it to your Eclipse/FlexBuilder plugins folder and restart your IDE.


Now you can quickly increase/decrease the font size of both the editor and the console window without interrupting the flow of a presentation. It's a small thing, for sure, but it's a beautiful small thing.

Apparently this has been tested on Eclipse 3.3+ and Java 1.5+. Works for me!

Monday, April 28, 2008

C U @ PV3D Vancouver this weekend!

I'm excited to get some Papervision3D training this weekend from John Grden. We might decide to make him an honourary Canadian and buy him an extra vowel or two for his last name.

Obviously, the appropriate Canadian letter would be a 'U', since we have so many of them lying around these days. "Color?" Never heard of it. "Colour?" Yeah, baby. That's more like it!

Anyway, if you're from out-of-town and want to blend in, the correct pronounciation is "Vang-couver". Yup, us locals add a nearly silent "g" into the city's name.

I hope to see you there.

Saturday, March 15, 2008

Boo-hoo! I have to miss 360|Flex Milan

Unfortunately (for me, at least), I've had to pull out of my Cowbell Hero session @ 360|Flex Milan. I can't make the conference any longer, and I'm feeling very, very sheepish (as opposed my usual "moose-ish") for canceling so close the conference.

Tom and John have been great about it. They really have the coolest conference going these days.

But just because I can't go, it doesn't mean you shouldn't (my absence might even be *more* of a reason to go!). You simply will not find a better value for your 360 Euros than in Milan, April 7-9.


PS: Cowbell Hero is still a go, and I'll be posting details on this blog as development progresses.

Tuesday, March 4, 2008

Come see Cowbell Hero @ 360|Flex Europe!

I'm excited to be presenting at 360|Flex Europe in Milan, Apr 7-9.

When I first talked with Tom & John about the Milan gig last August, I said that I had wanted to present something that integrates hardware and physical interaction with the Flash platform.

So over the past year I've been working on a number of home projects centered around the Arduino, a low-cost open source hardware platform, which fittingly was designed in Italy.

The Arduino is a 16 Mhz Atmel microcontroller with a USB interface and a number of digital I/Os and analog inputs. You can purchase a fully assembled Arduino controller for less than $40. And open source IDE is available for Mac/Windows/Linux.

So $40 plus a few spare LEDs and simple components can yield some interesting stuff.

Cowbell Hero with an Arduino

This Christmas my son got an Xbox 360, and I got Guitar Hero. Now my son (15) and daughter (11) routinely kick my butt at this game (but at least they unlocked Trogdor! for me).

When I was planning for 360 Milan, I was trying to think of a fun way to engage the audience, and I thought it would be fun to create game in AIR. Natuarally, this game had to be Cowbell Hero.

We'll be hooking up my Mac to the projector, the Arduino, and the sound system, and rocking out like Bruce Dickinson would want.

So sign up now for 360 Flex Europe, and I'll see you in Milan!

Thursday, January 31, 2008

Pixton revealed at Vancouver Flex/AIR tour

The fine folks at Business Objects hosted the the recent Vancouver stop of the Flex3/AIR Prerelease Tour. Local Adobe Evangelist Duane Nickull was bravely demoing a 4-hour-old build of Flex Builder, showing off the new features to a crowd of of about 60+ developers / designers. About half were new to the Flash platform (welcome to the party!).

Duane's quote of the night came at the Yaletown Brew Pub afterwards: After telling him that I think that Flex is the crack-cocaine of programming languages, Duane quipped "Adobe considers Flex to be the gateway-drug to AIR". Brilliant.

Star of the evening - Pixton

Local developer Clive Goodinson demoed a new online comic site called Pixton. This super awesome site was created by Clive in just two months, and includes a Flash CS3 front end married to a PHP back end. Pixton is incredibly visually appealing, plus it has very immerisive and intuitive editing capabilities. Drag a character's arm to reposition it, and the joints all move correspondingly, in a very natural manner.

You can also remix the content of other Pixton comics, if the original author permits. Duane has already used Pixton to mock co-worker Ted Patrick. Most excellent.

My new mashups book is out!

Please help support this blog and buy this book. It was seconds in the making!

Saturday, January 12, 2008

Labels everywhere often means that the design sucks

This blurry picture is a camera-phone snap (scratched lens! grrr!) of the elevator control panel at my previous gig, before I joined EffectiveUI. The pic is blurry, but you can still make out the details.

There is just no affordance or discoverability in this button layout. I was working onsite for a couple of months, and I saw everybody continue to struggle to figure this thing out. I'm not talking just visitors (who also struggled), but people who had been working there for years! I was also tricked by the strange layout a couple of times a week.

Now, to be fair, the building was a little oddly shaped. It was built into a steep hill, and was terraced. An elevation perspective looked like this:

| 2 |
Gnd | 1 |
| | Patio
+------------------+ Ground level
| Parking P3 |-------\
+------------------+ \
| Parking P2 |
| Parking P1 |

Things I found bad about this design:

"Main" (1)  (2)
(P3) (M) "Roof Garden"
(P1) (P2)

  1. This panel is ordered right-to-left, instead of left-to-right. The standard layout (at least in North America) is for two-column panels to start with the top floor on the upper-left, and then decrement floor-by-floor in a left-to-right, top-to-bottom sequence.
  2. Floor 1 (street level entry) is also labeled "Main", but there is an "M" button!
  3. The mezzanine floor has the confusing "M" button, which everyone thought was the main level. "M" should only be for main.
  4. To fix the above, the mezzanine floor is labeled "Roof Garden". Roof? In the middle of the building? Call it a patio and avoid the confusion already!
  5. The parking levels are not ordered according to the standard. Underground parking levels should start with P1 being the level just below the main floor. So P3 should be floor furthest down, not at the top.
It's a tough design problem, for sure, but I think that the person responsible for this just gave up and said "This will do", thereby condeming all future occupants to confusion.

How would you solve the layout problem?

(PS: Can you tell I love ASCII art?)

No, I haven't died in a blogging accident

Just in case any of you were wondering. Man, you gotta love XKCD. Too many fluff posts like this are skewing the results.

Wednesday, January 2, 2008

DryerFox - Updated for Flex 3 Beta 3

I made a few minor tweaks to DryerFox a few weeks ago, but I thought I should post them.
  1. Updated the code to resolve breaking changes.

    The WebKit control was reworked a fair bit for Beta 3. mx.controls.HTML no longer delegates the heavy lifting to flash.html.HTMLControl. So this meant a code sweep to change snippets like:

    • html.htmlControl.historyBack() becomes html.historyBack().
    • html.htmlControl.window.document.title becomes html.domWindow.window.document.title.
    • HTMLUncaughtJavascriptExceptionEvent becomes HTMLUncaughtScriptExceptionEvent.

  2. Updated the -app.xml

    Another beta, another -app.xml schema.

    All the same values are set, but the precise location and names within the XML have changed again. I can see in the SDK that there is a template for these in sdk/templates/air/descriptor-template.xml. I just wish that Flex Builder provided a config panel interface to set this stuff, just like it does for the HTML wrappers.

  3. Updated the badge installer

    This beta included another update to the badge installer, so I have included this in the source update.

  4. Added the new EverythingFlexAIR.SWC library

    DryerFox was already using Rich Tretola's UpdateManager class, and Rich has now packaged this (and other useful goodies) in a SWC, available here.

  5. Updated SWFObject to v2 RC1

    SWFObject has moved to a release candidate, so I updated my copy. No other changes required.
Source for the latest DryerFox can be found here. App can be installed via the "Install Now" button at the top of the sidebar.