Impressions of FITC / Toronto

April 26th, 2007

This was my first trip to Canada and to FITC — I didn’t know what to expect at first, but I left inspired and ready to work. FITC was a good conference — but I would suggest to anyone that expects wants an extremely technical conference to find another conference to attend. The design track is amazing, but the technical aspect leaves a lot to be desired if you want some down and dirty info.

My favorite sessions:

John Maeda (www.maedastudio.com) – very eloquent speaker — if you’ve never seen his body of work it’s quite incredible. He was inspiring, funny, and for me he really nailed a point that it’s not the finished work itself that is the most impressive at times, it’s the idea and the passion behind the work that makes it shine.

Evan Roth (www.graffitiresearchlab.com) – I’ve always loved subversive art, and you can tell he’s for real. He works with Eyebeam, which I hope to one day apply to as a fellow as well. Great speaker, loved the work, funny — I particularly like the video of them tagging over the perier projection. As a projectionist, I really was inspired by this project.

Mario Klingemann (www.quasimondo.com) – Most of you know of him already, but he’s really funny, and easy to relate to if you’re a nerd. He tried to pack a lot of into into his session, but he somehow merged a talk about image recognition, art, and evolution. Took a while to get there, but his end results were very strong. Big Kudos.

Papervision – I know about the project, but didn’t know how far along they already were. Good speakers — and we love the international guys (and clickable 2d fish)

A note to the technical speakers: Now I may be wrong here, but I think technical discussions should be more targeted and less wide open. I noticed a lot of AS3 talk concerning the Flash 9 DisplayList and basic Vectors — I think technical speakers should be talking about ideas and apis that aren’t 1) on the internet and widely documented, 2) something they couldn’t necessarily find or do on their own.

—–

On another note, I demoed Onyx at the DemoCamp Toronto and was pleasantly suprised when there were about 100-150 in the room. I got a really gracious welcome, and seemed like there was a lot of interest in the project. If you’re in Toronto, and have a cool app, for sure, demo it there. Kudos to DemoCamp, Toronto

Simple automated way of removing debug code / another optimization for production swfs

April 14th, 2007

A way to remove debug-code from your production SWFs by using Flex metadata

Many times when pushing swfs to production we have to remove debug traces — an easier way I’ve found is to use flex metadata and ant builds to remove it automatically. The basic idea is using Ant’s RegEx capabilities to remove lines of code that aren’t necessary in the final swf, but the lines of code will still exist for developers. Where this is particularly useful is not pushing lines of code that are specific for other developers — such as: Tink’s blog about simulating Abstract Classes by throwing errors, removing trace statements, and custom toString() statements. The basic idea looks like:

public class Abstract extends EventDispatcher {

	/**
	 * @constructor
	 */
	public function Abstract():void {

		// test for creation of an abstract class:
		// per http://www.tink.ws/blog/stricter-abstracts/

		[DEBUG_START]
		if (super.toString() == '[Object Abstract]') {
			throw ABSTRACT_CLASS_ERROR;
		}
		trace(this, "created')
		[DEBUG_END]
	}
}

From there we can create an ant build that removes those code elements and republishs the swf, which will reduce swf size, developer-centric error checks, and reduce the memory fingerprint for classes. If you’re a stickler for performance, this is for you. This method should be 100% QA/QE safe, as it is designed only to remove code that is specific for developers. This also gives developers a way to give hints to other developers about what not to do when creating an instantiation of a class. For instance, if we have a class called LoadManager, and don’t want it’s property duration to be referenced until it has been loaded, this sort of metadata can be given to other developers without adding it to the production swf. For example:

public function get someMethod():SomeObject {

    [DEBUG_START]
    if (!_someobject){
       throw new Error('_someobject for this class must be set before calling someMethod()');
    }

    trace(_someobject);

    [DEBUG_END]

    return _someobject;
}

All that needs to be done when pushing a code to production, is running an ant build on the project, and using ant’s regex capabilities to create a new swf. No need to go running through your projects removing all your trace statements now before you publish your swfs. I’ve included the ant build below — this particular example compiles a SWC library and then a SWF (which I’m sure many of you are doing in your builds)

(more…)