Mapping Under Uncertainty

mapusa A few weeks ago I came across a post on reddit asking how to draw a map given the distances between cities.  I can never resist a good coding challenge, so next time I had a free afternoon I decided to give it a shot.

Like most problems, it turns out that plotting points on a map is quite easy if the data is perfect.  However, if the data is imperfect then things get a whole lot trickier.  Below is a description of the problem and how I solved it.

Continue reading Mapping Under Uncertainty

Animating ProgressBar Skin in Flex

Stop WatchWhen I was in university (college) I was told a story about a large office building which had notoriously slow elevators.  People would often spend several minutes waiting for the elevator to arrive at their floor and the occupants of the building complained about the problem often.

In an effort remedy the problem the owners of the building hired an engineer to come in and recommend ways to speed up the elevator service.  The engineer reviewed the existing elevator system and all compatible upgrade options.  Eventually the engineer came back with his recommendation:

The most cost effective way to improve the elevator service was to cover the elevator doors with mirrors.

Continue reading Animating ProgressBar Skin in Flex

Dynamic UI Components (with source)

wwf Back in February 2008 I wrote an application called PostACard which ended up winning the 360|Flex API Contest.  I’m really proud of what I was able to create (less than 20 hours total development time) and I have always wanted to go back to it and see if I can extend it further.

Recently I have been playing around with the source code some more and in particular have been trying to see if I could reuse the movable component libraries I wrote.  As part of this I have tidied the code up a bit and have extracted it from the rest of the application.  Check out the demo below.

Continue reading Dynamic UI Components (with source)

Accurate Car Simulation in Flex

car_top2 The demo below came from a technical challenge I set myself a few weekends ago.  I often like to set myself small challenges like this… I guess it’s kind of like doing a cross word puzzle.

The challenge this week was to accurately simulate the movements of a car in 2D.  Most people don’t realize this, but when a car turns it is rotating about a point outside itself, and that point is perpendicular to the wheels.  It’s a little hard to explain, but if you check out the demo below then it all should become clear.

Continue reading Accurate Car Simulation in Flex

How to Draw in Flex

pencil Eye candy is an important, if often over looked, part of any Flex application.  Unfortunately for me, I am much more of a developer than a designer and this has often left me with the short end of the eye candy stick.

The strength of being a developer however is in the custom functionality we can add.  Recently I have put together a DrawableOverlay Flex component which can be used to allow the user to annotate/draw on any part of the application.

Continue reading How to Draw in Flex