At nerd camp

My wife got an email from Nate‘s wife with a picture of me at the Flex Bugquash.   Thankfully, without an identifying caption.

That’s my rickety old Gateway laptop  sporting Windows Vista.  I think one other person there had an HP with Windows, but otherwise it was wall to wall Macbooks.  Unfortunately, that meant I spent a lot of time troubleshooting problems without tech support.  Wifi didn’t work for me either at the Adobe campus, once all the Macs showed up.  Apparently there’s a prioritization.

Anyway, there were lots of snacks (I had 3 times my share of M&Ms), lots of hacking, and while I didn’t get a patch submitted to fix a bug, I learned how to hack the Flex SDK, and got some unit tests around DateFormatter running.

I’m now a lot more comfortable in Flex and am incorporating what I learned with Sprouts and Fluint.  I finally feel comfortable enough to work on automating a Flex build & test suite.

Using Flash 10 debug projector in Flexbuilder 3.3

Here’s how I set up Flexbuilder 3.3 to use the flashplayer_10_sa_debug.exe.

(I still haven’t figured out how to get it to launch full screen, and you may need a commercial app that wraps projector to do that — though it’s probably possible with the open sourcing.)

Download the debug standalone flashplayer 10 here:

http://download.macromedia.com/pub/flashplayer/updaters/10/flashplayer_10_sa_debug.exe

or whatever the current version is from:

http://www.adobe.com/support/flashplayer/downloads.html

Locate a swf and lauch it directly, choosing flashplayer_10_sa_debug.exe when prompted by windows for the application to use.  This will set up the Windows registry to associate the player with .swf files.

Set up your run configuration in Flexbuilder to open the project .swf file at c:\path\to\YourProject-debug\Whatever.swf (instead of http:\\localhost\YourProject-debug\Whatever.html)

flexbuilder_run_configuration

This is a bit of a hack, since it needs done for every project, but oh well.

Now it will launch, but you’ll get a pesky alert like:

Flex Builder cannot locate the required version of Flash Player.  You might need to install Flash Player 9 or reinstall Flex Builder.

Do you want to try to run your application with the current version?

flexbuilder_flashplayer_error

To get rid up this and use Flash 10 (and the new Flex SDK), first download the SDK:

http://flexorg.wip3.adobe.com/flexsdk/3.3.0.4852/flex_sdk_3.3.0.4852.zip

or get whatever the latest version is from here:

http://opensource.adobe.com/wiki/display/flexsdk/Download+Flex+3

To have Flexbuilder use the latest SDK, open Windows > Preferences > Flex > Installed SDKS

flexbuilder_install_sdk

and add the downloaded SDK, setting it as default.

Open the Flex build path, click on the Library Path tab, and delete playerglobal.swc from Flex 3.3.  Then click “Add SWC” and locate the playerglobal.swc in  path/to/new/sdk/frameworks/libs/player/10

flexbuilder_build_path

Then specify the flashplayer included in the SDK download for the project (again, a hack that needs repeated for each project).  Right click on the project, select “Properties”, and select “Flex Compiler”

flexbuilder_require_flash_version

Then enter 10.0.0 in “Require Flash Version”.  This should work.

See also the following links, which helped me out:

http://panellabs.net/2009/02/18/flex-builder-running-applications-in-projector-standalone-flashplayer/

http://rantspace.net/u/redwyre/2008/12/01/flex-builder-and-flash-10/

Also see:

http://stopcoding.wordpress.com/2008/06/17/hellfire_compiler/

to use the HFCD which pre-loads the compiler in a daemon to speed up compile times.

And http://multidmedia.com/ for the Zinc Flashplayer laucher which can resize the projector on launch (among other things.)  The price is a bit steep though ($300), if that’s all you want to do.

And here’s a blog post about setting up a free Flex development environment:

http://blog.brokenfunction.com/2007/01/29/how-to-develop-for-flash-on-any-os-for-free/

Flexbuilder and SVN

I almost thought I had something there.  Here’s what I did:

Attempted to install subversive from:

http://download.eclipse.org/technology/subversive/0.7/update-site/

Got the following error message:

Subversive SVN JDT Ignore Extensions (Optional) (Incubation) (0.7.7.I20090224-1900) requires plug-in “org.eclipse.jdt.core”.

Installed Java Development Tools from Eclipse software updates:

Europa Discovery Site
Java Development
Eclipse Java Development Tools 3.3.2r33x_r20080129-..

This hung while using IBiblio.   I restarted FlexBuilder and tried again.  This time using xmission.  Much better, and successfull.  FlexBuilder rebooted and then I went to the polarion update site above for Subversive and successfully installed.  Rebooted again, and right click on my project:

Team > Share Project

Entered my credentials, but then, bam:

Share project was failed.
Share project was failed.
Selected SVN connector library is not available or cannot be loaded.
If you selected native JavaHL connector, please check if binaries are available or install and select pure Java Subversion connector from the plug-in connectors update site.
If connectors already installed then you can change the selected one at: Window->Preferences->Team->SVN->SVN Client.

Selected SVN connector library is not available or cannot be loaded.
If you selected native JavaHL connector, please check if binaries are available or install and select pure Java Subversion connector from the plug-in connectors update site.
If connectors already installed then you can change the selected one at: Window->Preferences->Team->SVN->SVN Client.

The duplication is odd, but I don’t know if it’s symptomatic of anything.

U can’t believe FlexBuilder doesn’t have support for subversion, but I can believe Eclipse is borked enough to fail on something trivial like this without any help from Adobe.

My first Flex bug

I just logged my first bug against Flex:

http://bugs.adobe.com/jira/browse/FB-18017

I’m not sure if it’s actually a problem with the compiler or with FlexBuilder.  My guess is that a compiler bug is not properly handled by the UI — which makes it hard for me to track down, since the UI problem may be masking the underlying issue.

No doubt, the root cause is some bad coding on my part.  But bad code shouldn’t be able to break the compiler, and a compiler failure shouldn’t be able to break the UI.  To be more specific, it doesn’t break the UI, but it seems that there’s no way to correct the error, recompile and continue.  Once it breaks, I need to restart FlexBuilder to be able to recompile.  But if the code that triggers the compiler bug isn’t fixed, it’ll come back up on restart.  Not very useful for debugging. I suppose I should know what I did wrong and just fix it, but if developers knew everything you wouldn’t need compilers.

Anyway, I’d probably scrap Flex right about now, and mutter something about half-baked betas released to production, but because Adobe is having a Bug Quash next weekend, and I’m going, I’ll try to figure out more information about it and take it with me.

I’ll be doubly impressed if I get more than a “can’t repro” or “as designed”, though I’d be impressed enough if someone actually look at it at all.

I won’t bother posting my project that triggered it, though I hope to be able to narrow it down, and maybe even trigger it with just the SDK, but here’s the stack trace which FlexBuilder helpfully pointed me to:

!SESSION 2009-03-20 13:30:39.171 ———————————————– eclipse.buildId=unknown java.version=1.5.0_11 java.vendor=Sun Microsystems Inc. BootLoader constants: OS=win32, ARCH=x86, WS=win32, NL=en_US Command-line arguments: -os win32 -ws win32 -arch x86 !ENTRY com.adobe.flexbuilder.project 4 43 2009-03-20 13:33:28.109 !MESSAGE Uncaught exception in compiler !STACK 0 java.lang.ClassCastException: macromedia.asc.parser.MetaDataEvaluator$KeyValuePair at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:226) at macromedia.asc.parser.SetExpressionNode.evaluate(SetExpressionNode.java:58) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:193) at macromedia.asc.parser.MemberExpressionNode.evaluate(MemberExpressionNode.java:57) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:611) at macromedia.asc.parser.VariableBindingNode.evaluate(VariableBindingNode.java:64) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:392) at macromedia.asc.parser.ListNode.evaluate(ListNode.java:44) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:567) at macromedia.asc.parser.VariableDefinitionNode.evaluate(VariableDefinitionNode.java:48) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:771) at macromedia.asc.parser.ClassDefinitionNode.evaluate(ClassDefinitionNode.java:106) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:406) at macromedia.asc.parser.StatementListNode.evaluate(StatementListNode.java:60) at macromedia.asc.parser.MetaDataEvaluator.evaluate(MetaDataEvaluator.java:860) at macromedia.asc.parser.ProgramNode.evaluate(ProgramNode.java:80) at flex2.compiler.as3.Compiler.analyze3(Compiler.java:531) at flex2.compiler.mxml.InterfaceCompiler.analyze3(InterfaceCompiler.java:378) at flex2.compiler.mxml.Compiler.analyze3(Compiler.java:147) at flex2.compiler.API.analyze(API.java:2537) at flex2.compiler.API.analyze(API.java:2432) at flex2.compiler.API.batch2(API.java:406) at flex2.compiler.API.batch(API.java:1117) at flex2.compiler.API.compile(API.java:1290) at flex2.tools.oem.Application.compile(Application.java:1074) at flex2.tools.oem.Application.recompile(Application.java:1026) at flex2.tools.oem.Application.compile(Application.java:678) at flex2.tools.flexbuilder.BuilderApplication.compile(BuilderApplication.java:354) at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder$MyBuilder.mybuild(ASApplicationBuilder.java:271) at com.adobe.flexbuilder.multisdk.compiler.internal.ASApplicationBuilder.build(ASApplicationBuilder.java:122) at com.adobe.flexbuilder.multisdk.compiler.internal.ASBuilder.build(ASBuilder.java:139) at com.adobe.flexbuilder.multisdk.compiler.internal.ASItemBuilder.build(ASItemBuilder.java:73) at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.buildItem(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexProjectBuilder.build(Unknown Source) at com.adobe.flexbuilder.project.compiler.internal.FlexIncrementalBuilder.build(Unknown Source) at org.eclipse.core.internal.events.BuildManager$2.run(BuildManager.java:624) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:166) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:197) at org.eclipse.core.internal.events.BuildManager$1.run(BuildManager.java:246) at org.eclipse.core.runtime.SafeRunner.run(SafeRunner.java:37) at org.eclipse.core.internal.events.BuildManager.basicBuild(BuildManager.java:249) at org.eclipse.core.internal.events.BuildManager.basicBuildLoop(BuildManager.java:302) at org.eclipse.core.internal.events.BuildManager.build(BuildManager.java:334) at org.eclipse.core.internal.events.AutoBuildJob.doBuild(AutoBuildJob.java:137) at org.eclipse.core.internal.events.AutoBuildJob.run(AutoBuildJob.java:235) at org.eclipse.core.internal.jobs.Worker.run(Worker.java:55)

Iteration Zero

I read this post today about “iteration zero.”  It’s a pattern I recognize well.

In fact I’ve been going through a lot of iteration zeros lately.  I think the preliminary work, including team selection, tool choice and setup, development environment installation, build and test process, etc., can be a significant factor in the success of a project.  Part of the idea of adopting Agile is to help define those processes and types of tools, if not the actual tools used.

There seem to be certain brands of Agile that go hand in hand with certain tools, such as a Java shop with Tomcat + Spring + Hibernate + Junit + Hudson + Confluence + Jira or a  Ruby team with Rails + Macs + Basecamp + CruiseControl.RB + FireWatir, etc.  Since certain experts (often the authors of specific tools) are strong advocates for their methodology, it’s no surprise that users of specific tools adopt a similar stack and brand of Agile.

I think we’ve learned, if nothing else, that the term “Agile” and the definition of  an agile process is slippery enough; much to the chagrin, no doubt, of the Agile “thought leaders” — who are probably as responsible as anyone else for the difficulty in pinning it down.  Part of iteration 0 is pinning down agreed upon definitions, but the important part is being able to create your “Hello World” using the tools and process decided upon.

Of course, each time a team repeats the process, it gets easier.  That’s the secret of a good agile team.  But the reality is that most teams aren’t static, and not surprisingly, neither is the technology.  If it were, I think a lot of developers would be looking for different jobs.  It’s the challenge of learning something new that appeals to many of them, myself included.

But there comes also time when you just want to “get ‘er done”, and that’s when the iteration zero becomes a pain.  Usually that’s a good sign, because it means you’ve got a project you’re interested in working on.  I said earlier that a good iteration zero was one contributing factor to success.  I think the other major factor is interest in the project.  Developer interest doesn’t always transfer to customer interest, but it’s a pretty good substitute.

So what am I most interested in?  I’m interested in the interation zero.  In finding the tools and process — for testing yes, but also for development, deployment, and project management — that best contribute to the success of projects.  Of course, that’s different for everyone, but there should be commonality, and much like Agile, I think there are good and bad patterns to be aware of.

My idea of a “QA Site” (a term I’ve never been completely satisfied with, but have stuck with) is to make iteration zero as painless as possible.  To reduce the ramp up time, and to build out the necessary infrastructure as quickly as possible, but keeping it lightweight (so it doesn’t become burdensome) and flexible (so it doesn’t bias to one set of tool preferences.)  To recongnize that there are both principles and preferences, and to not confuse the two.  I realized that I’m in the business of “Iteration Zero”.

Coldscripts

ColdScripts is a good site with links, summaries, and rating for a bunch of PHP applications and frameworks. It has a few discrepancies and outdated listings, like WACT and Ambivalence for MVC frameworks (but, hey I still use Ambivalence for klamathsystems.com.  That’s how I found it, after migrating Klamathsytems off of Westhost to share the same Linode as One Shore.)  The ratings looked fairly accurate and up to date however

Example categories include:

  • frameworks
  • blogs
  • cms
  • ecommerce
  • forums
  • galleries
  • wikis

A surprising absense was Magento from CMS

Using Watir in .NET

Here’s an interesting link about using Watir to test .NET (also includes some other contenders:

http://www.hanselman.com/blog/IntegratingRubyAndWatirWithNUnit.aspx