Flash on Tap

I’ll be speaking at Flash on Tap this October 7-9 in Boston. This should be a great conference: Flash + Beer = Nothing to Fear? Or something. Anyway, the speaker line up is top notch. I’m pretty psyched to be included in such an impressive group. My topic is Five Minute Design Patterns. Description below…

Screw eight minute abbs. We’ll be learning a new design pattern every five minutes in this high-impact non-aerobic session. That’s ten whole patterns: Adapter, Template, Singleton, Factory, Strategy, Facade, Iterator, Command, Bridge, and Composite. Why so many in so little time? Because patterns are used for many things, but, mostly they are used to impress other developers. So volume counts. “Composite your tree structure!”; “Facade those classes!”; “UML your bridge!”; and “Iterate this!” are just some things you might say after you’ve paid a little bit of attention during this session. Feel the burn!

We’ll see if the preso works (I think it will be fun), but, hey, if it doesn’t, what do you care? You get to drink beer.

Google Data Viz API

Google has released a data visualization API. Some of it is Flash - specifically the code they got when they purchased Gap Minder.

Update: Infosthetics has a good post about this as well.

Election Update

Entered the latest state info from CNN. Again, I can’t figure this data out: Is it wrong? (state totals don’t add up to overall totals) Is it sloppy? (Texas 12 superdelegates, but, 12 to Clinton and 9 to Obama) Well, it’s updated anyway. I changed the colors a bit - don’t love them, but, at least Clinton and Obama colors are consistent.

Also - the source is a mess, but, if anyone’s interested - here’s the xml file adn the xsd. If you make a chart, please send me an email.

Dashboard here.

AS4, ES4

Colin Moock posted his “What’s new in ECMA Script 4” lecture. Looks great. Personally, I can’t wait for array types and overloaded methods. I guess there’s no guarantee that Flash will support all the new functionality, but that would be my guess.

Official (40p) pdf of the ECMA spec here.

toXMLString

File this under either RTFM or “can I get that hour of my life back”, maybe both. To trace xml that is simple (e.g., one node), you need to use toXMLString.

public var myXML:XML =<root>
<item id=’1′/>
<item id=’2′/>
<item id=’2′/></root>

public function init(): void {
trace(myXML);
trace(’*************@mID_n==2**************’);
trace(myXML.item.(@id==2));//traces 2 nodes
trace(’************@mID_n==1***************’);
trace(myXML.item.(@id==1));//traces nothing
trace(’***************************’);
trace(myXML.item.(@id==1).toXMLString());//traces the node
}

For Each Is Fastest

I was doing some coding where optimization really mattered and made a little loop test. The ‘for each’ loop is the fastest - even when you need an index.

Also of note, the debug player has ‘incrementing while’ as faster than the ‘do while.’ And both as faster than ‘for each with counter.’ There is a huge difference between the performance of the debug and the release player in Flex. (Using the Flex Beta 3 Release 3 here.) Check out my friend James’ test for more info on the diffs. He has a lot of benchmarking around typing vars here. Those posts completely refute some earlier, widely read, posts that suggested you should never use int. Lesson here is, make sure you test performance with a version published for release. Unfortunately, that means you can’t trust trace statements for your benchmarking. You need to put your time displays in a text field.

Also, I did some tests, and it appears that ‘for each’ preserves order - which is obviously very important to know. If you have found different, please post a comment. Example here. View source enabled.

Physics Engine

This looks pretty cool. Box2DAs3 Physics Engine.

(via polygonal labs)

Other physics engines:

APE

Motor Physics

Flare

This looks pretty great…

flare

open source visualization tools in AS3

(via wellFormedData)

Data Viz Talk Files

Here are the files from my BFPUG and Harvard Flash User Group talks. I can’t upload the applications I showed of Visual i|o work, but here’s everything else.

Presention File:

A lot of the middle slides I didn’t even show, but, used as notes while I was demoing the apps.

Download - 10MB rar file. Extracts to Open Office doc.

Here is a PowerPoint version compressed as a zip.

Sample Code:

AS2 Bar Chart - code set up for Eclipse using FDT - to run from Flash IDE - import Main.as and run Main.main(); It also uses SOS for tracing.

Flex Chart Bar Chart example (by Peter deHann) - a great example of how easy it is to chart in Flex. I was going to port the above AS2 example to AS3 - but I’m busy and Flex charting is excellent.

Links to sites I mentioned in the talk:

Intro:

Lokesh Dhakar - Coffee Drinks

Edward Tufte

Khi Vinh - Think Like a Dog

Gapminder World Chart

Patraeus Charts - Iraq by the Numbers

Indo European Languages

TuneGlue

MOMA Tall Buildings

BabyTracker

National Geographic Ethanol Story

NY Times

Visual i|o data Viz Wak Throughs

Can’t post what I showed - but here are some examples of our work:

Bubble Chart

Baseball - Pull the Pitcher

Trends/Mashups:

Google News Map

Chart to Art:

Alex Dragulescu - Spam Architecture

Jev Bratt - DataBase Imagery

Jason Salavon

Martin Wattenberg - Shape of Song

Stamen - Digg Labs

Flickr Related Tag Browser

Findr

Flex Charting

Hans Rosling Ted Talk 2006

 

Design Patterns Page

I put together a page listing all the design patterns meetings and presentations we’ve had so far. Here it is. As you will see, many of the presenters are not sending me their presentations. Keith Peters even claims to have lost his. Unfortunately, I missed the last meeting so I couldn’t bug everyone. Anyway, hopefully soon, this list will be more complete.

Also, credit for the group goes to Sam Robbins for starting the group. Although, even he hasn’t emailed me his presentations.

Next Page →