This blog isn't maintained anymore. Check out my current project, an agile/scrum management tool.

Wednesday, October 31, 2007

Math, Schools, and Screenweaver HX

This is a re-post from the haXe blog.

----

The company I work for, Tom Snyder Productions, has just released the latest version in our FASTT Math line of products, "FASTT Math 2.0 Enterprise Edition". (Don't blame me, I didn't pick the name) The architecture for this product is a little odd. Schools buy a FM (FASTT Math) server and install it locally on their network. On the server is a Flash based application (plus a whole lot of other stuff) to run the product. On each client computer is a thin loader application that downloads the application and displays it to the student.

When starting off development it was assumed the loader would be a simple Flash projector since several other similar products had been successfully deployed in that manner. But as we developed the application we really started to see the shortcomings of that approach and begin looking for alternatives. In the end we chose a Screenweaver HX based solution for our loader. It provided us with all the base functionality we expected, but also allowed us to implement a few features that would have been impossible otherwise.

1) The loader is capable of both reading and writing to a local configuration file. While the file writing didn't end up making it into the released product, we did implement it and everything worked as expected. (A separate config utility is shipped to match other products in the line)

2) We were able to have a splash screen while loading. This might seem like such a minor thing, but having a nice FM logo appear in a separate window instead of a "loading" message really made the product feel more polished.

3) If enabled in the config file, all trace() statements get written out to disk in a log file. This lets us diagnose problems in the field far more easily.

4) We have error handling code to gracefully fail if the initial swf couldn't be loaded for any reason.

5) Full screen support with keyboard access, and pushing escape doesn't pop you out of it.

I won't bore you with the details of how every feature was implemented, but I will comment on #2 and #3 since they are just a little interesting.

To implement the splash screen we distribute a local swf that contains only that information. It gets installed locally next to the loader application. On startup of the loader some haXe code runs that loads that swf and displays it in a window. The haXe code also creates a second window and begins the load of the main application files. It doesn't display this window at first so you only see the splash screen. The main application loads, and then that app loads several more files it needs. When the main app is complete it makes a call to the haXe backend that tells it to hide the splash screen and display the main application window in full screen mode. In this way the student goes from splash screen to an application that is ready for user interaction.

Logging was a simple feature to implement since we used the MTASC compiler to build the main application. Using MTASC's -trace option we were able to specify a custom trace function that would report back to the haXe backend on any call to trace() in the Actionscript code. The haXe backend would then make a decision to write it to disk or not depending on a configuration option. During development we required a more robust logging solution, so when not in "release mode" our build scripts are set up to redirect trace output to the XRay debugger. Using this method there were no Actionscript code changes necessary to switch from a debug to a release build.

One of the biggest advantage to using Screenweaver HX over the course of development was the user community. Several times we ran into roadblocks that were quickly resolved with a question to the haXe mailing list. Having the source code for the underlying infrastructure also allowed us to trace some bugs back to their source more easily.

haXe rocks.

Screenweaver HX rocks.

Thank you Nicolas, Edwin and everyone else who's contributed to a great project,

-Marc

Monday, October 29, 2007

AgileAgenda - new version

There's a new version of AgileAgenda available over at http://www.agileagenda.com/download/index.html. For those of you who are visiting the blog for the first time, it's a project planning and scheduling package written in AIR. I'm starting to get close to a 1.0 release as I'm down to a single feature I want to get in there, and only a handful of known bugs.

I've spent a bunch of time working on the PDF export and have really been pushing alivePDF to it's limits. Last week I sent a bunch of changes having to do with page size and a couple bug fixes to Thibault, everyone should check his project out, it rocks.

Here's a quick example
of the type of stuff you can do with AlivePDF.

Labels:

Sunday, October 28, 2007

FB3 Beta 2 Design View not showing up? Quick "Fix"

If you're using FB3 Beta 2, I bet you've opened up an MXML document in design view and it didn't show up at least once? A quick (stupid) fix is as follows:

Go to source view.
In your root tag add a space before the namespace url
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"
Becomes
<mx:Canvas xmlns:mx=" http://www.adobe.com/2006/mxml"

Now, delete that space.
Back to
<mx:Canvas xmlns:mx="http://www.adobe.com/2006/mxml"

And save, you'll notice a weird redraw issue.

Now hit the design button and you should see your form.

Monday, October 22, 2007

AIR Mime type

I've been having some problems with some browsers downloading my .air apps as .zip files, even replacing the file extension. I figured it was a Mime type problem, and sure-enough...



This is from the AIR release notes:

Setting the mime type in your Web Server for AIR applications

In order for client browsers to recognize an AIR application when being downloaded, the Web Server hosting the AIR applications needs to map the following MIME Content Type “application/vnd.adobe.air-application-installer-package+zip” to the Apollo extension “.air”. For example, for an Apache Web Server you will add to the AddType section: AddType application/vnd.adobe.air-application-installer-package+zip .air


So for Apache, just add this to your config:

AddType application/vnd.adobe.air-application-installer-package+zip .air

I had some weird problems with the badge-installer not working on a couple OSX machines, I wonder if this will fix it.




Labels:

Friday, October 19, 2007

Top 10 Flash/Flex requests from a developer

I've been switching between Java, Flash/Flex and C++ development a lot lately and find myself swearing at missing Actionscript or FlexBuilder features way too often.

Here's my top-10 requests for future versions of Actionscript/Flex/Flex Builder...

#10 Type safe collections (Java Generics / C++ Templates)

var a:Array<int> = new Array<int>();
a.push( 5 ) ; // ok
a.push( "test" ); // compile time error



JDT, the Java environment in Eclipse has the best refactoring I've ever used. #9 through #7 go to some of those features.

#9 Refactoring - Extract Method.

Highlight a block of code, select extract method, and it replaces that code with a single call to a brand new method it creates.


#8 Refactoring - Extract local variable

Highlight an expression, select extract local varibale, and it replaces all instances of that expression with a new variable it creates.

#7 Refactoring - A rename that actually works all the time.

#6 Make Code In Front viable in Flex Builder.

#5 Make Thermo not suck. It has promise, I'm looking forward to it, please don't blow it. Oh, might as well remove Design View from flex builder entirely while you're at it.

#4 Make Linux support a first class citizen. Release Flash plugins and AIR runtimes at the same time. Oh, and do this without delaying OSX or Win32 releases or raising prices :)

#3 Code Templates. JDT and FDT rock when it comes to code templates. Lets get this functionality built into Flex Builder. What are they you ask? There blocks of code with sections marked as replaceable. When you want to insert that block of code you do a ctrl-space to bring up the context-menu and type a few characters of the name of the snippet. Then the entire snippet gets pasted into your code and it makes it easy to set the
for the replaceable sections.

#2 Save in the background - for some reason, WAY too often do I save a file in flex builder, and am interrupted while it rebuilds for the next 20 seconds. I know I can turn off auto-build, but I shouldn't have to. Don't block user interaction unless you have to (like when you're trying to launch the app).

#1 Enums - My #1 request! Type and range checking constants should be a requirement for any modern language. I could be wrong, but I think it could be implemented entirely internally to the compiler meaning the player runtime wouldn't have to change at all.

enum MyEnum {Value1, Value2 };
var val:MyEnum = MyEnum.Value1; // yay
var val:MyEnum = SomeOtherValue; // Compile time error



For the record, I really like Flash/Flex development. If I was writing this list for my Java or C++ efforts, there would have been more swearing involved.

What are YOUR top requests?

Wednesday, October 10, 2007

Real time log viewing with flash and red5

Disclaimer: The idea for this isn't mine. Another guy did a great version of it over at http://www.fudgie.org/ The only improvement mine has is that it's in flash so it's web-accessible by multiple people at once. His looks cooler, has more data, and probably performs better.

Here's a quick little mini-project I banged out last night.
http://www.agileagenda.com/logview/LogViewAs.html
It shows traffic to my websites as balls flying through space. It uses Red5 on the server to watch the log files, and Flash on the client to display and animate that data. It's watching the websites:

www.agileagenda.com
www.flashyourspace.com
www.marc-hughes.com
www.rogue-development.com

Just open up the flash page, and if nothing is currently happening browse to those sites.

I'll post server & client side post under an MIT license when I get it to a more polished state.

Labels: ,

Thursday, October 04, 2007

Thank you

Thank you everyone who's sent me email or came up to me at the conference this past week. It really was an amazing experience and I'm lucky to have had it. The flash community rocks.

Monday, October 01, 2007

I won!

Today is Septeber 30th, but I won't be able to post until mid-day tomorrow since I'm in secrecy-mode right now. I’m currently on a plane headed to MAX at Chicago. I'm heading there because Agile Agenda has won the Adobe Air Developer’s Derby best of show prize. It's all rather overwhelming.

First, some thanks. To my wife, for putting up with me through countless late coding nights and giving me the motivation to continue. To my boss at my day job, Eric Hilfer, and several other colleagues, for giving me important feedback and motivation to shape the product into what it is today. To Olivier Charavel for a great set of icons used in the current version, and mockups for a complete design overhaul for the next version. And lastly, to the Open Source Flash development community. Oh, and thanks to the judges and the Adobe folks too.

I was very surprised to win. I was expecting to see some really ground-breaking, funky, and interesting applications take the prize. AgileAgenda is just a productivity tool with very little “cool” factor to. I've made it to be useful to me, and maybe I got lucky and it's useful to others as well.

The grand prize was a $100,000 travel voucher so I’m sure the big question on everyone’s minds is “Where are you going on the trip?” The short answer is we’re planning on New Zealand, Australia, and Tahitit maybe next fall. The long answer is it probably won’t be a $100,000 trip since my wife and I couldn’t afford the estimated $30k income tax bill that would go along with it. Believe it or not, the IRS taxes prize winnings just like income. (I can imagine the comments now…. WHAAAAAA I won too big of a prize)

On to the "standard" set of questions everyone seems to ask.

Why did I create this? One week at work, I spent 3 consecutive nights staying late fighting with MS Project. It just doesn’t handle schedules like I think about them. I want to enter in tasks, how long those tasks take, prioritize them, and assign them and let the software figure out the rest. I want to be able to change a duration, or a resource vacation schedule mid-way through the project without the software throwing up a warning dialog for every single task that occurs after that. I want software that knows when a task is completed ahead of time and adjust for that. I want a tool that understands when a task is late and adjust for that too.

I got the basics working for the AIR Derby deadline and have been refining them in the time since. I’ve also added in some new goals. I want everyone on a project to be involved in the scheduling process. To accomplish this, I’ve created a pricing structure with deep discounts for volume purchases. I’ve also started what I’ve been calling the “Developer’s Client.” (I hate the name, any suggestions?) This client lets people working on the project subscribe to a schedule and have a simplified view of it. They see only their tasks and some summary data. Using this interface, resources can write notes, keep track of time spent, and mark tasks complete. This data is then fed to the main AgileAgenda program allowing the schedule maintainer (lead, manager, producer?) to view those entries and choose to incorporate them into the main schedule or not.

Another goal is the easy sharing of data. If you upload your schedule to the agileagenda.com website, you get a unique url you can share with team members, clients, or your boss, and they can view the current status of the schedule at any time.

The software isn’t complete yet. I’m really hoping for some feedback about what people like or don’t like. I’m no expert in project scheduling, I just wrote this for the way I think about it and would love to hear how you think about it.

I’ll be around the conference and have a supply of 6-month licenses to give out to anyone who wants to try the software out. If you don't catch me, there's a free shorter-term license with beta, so go check it out. I’ll be hanging around Adobe’s AIR booth from time to time, or you can leave a comment here and I’ll try to find you.

Pre-orders start today. In order to help gauge the potential of the product, we’ll be accepting pre-orders of at least 35% off the initial price. I say “at least” because I’m still not sure what the final sale price will be upon launch. Visit www.agileagenda.com for details. So go order a few copies, and send me on a nicer trip ☺

Thank you everyone.
-Marc

Pictures? MAX

If anyone was at the MAX keynote and got a picture of me on stage, I'd really appreciate a copy. marc (at) agileagenda.com

Thanks a lot!

Native code in air apps?

I just watched a demo of running the PDF reader in an AIR app. One interesting caveat is the reader starts with every installed reader plugin the user has. I wonder if this means we could use that mechanism for running native code by writing a reader plugin...

Labels: