2009
12.11
In the world of Flex, it’s easy see what is being done while ignoring how it happens. Thanks to data binding, Catalyst, and lots of handy libraries it’s easy to get into the “make it work” way of thinking. I’m not talking about how to add a button to a form, or how to display a dataset in a grid, I’m talking about how to manipulate that data or perhaps to pull information out of it.
At it’s simplest, an algorithm is a series of steps to accomplish a goal. For example, an algorithm to clean dishes would be:
- Wet dish with soap and water
- Scrub until no longer dirty
- Rinse with clean water
But that algorithm isn’t the only way to wash dishes. Perhaps you have a dishwasher that takes care of these three steps, but requires an initial “rinse large food pieces off” step. So there are many different ways to accomplish the same goal.
When you create a function, you are creating an algorithm. The majority are simple and straightforward, so you probably don’t worry about them. But there’s the few that can become the entire focus of your time. You have a dataset to chew through, or you want to work in some nifty transitions. You could end up spending the majority of your time on a relatively small piece of code because that’s the heart of your application. This is where the code side of the component lifecycle gets stretched and where any improvement will have a significant impact.
So, as I can, I’m going to create a series of posts about algorithms. You’ll learn how to compare them, different approaches to solving a problem, and some terminology. Don’t worry if math scares you or if Wikipedia’s Analysis of Algorithms makes your head hurt. There are plenty of people like Dijkstra, Euler, and Turing who are smarter than me and already did the hard stuff. We’ll just learn from their hard work and go on our merry way. I’ll try and cover both practical stuff and some of the high-concept stuff that makes computer science people excited. Hopefully this will turn into an algorithms education for normal people.
Related Posts (generated):
2009
11.18
The patch I mentioned way back in Let’s patch: Fun with Scientific Notation! was finally accepted and is now live in the 3.x branch. This fixes SDK-16241, which dealt with scientific notation.
I removed the Bug Quash badge since it’s misreporting, but this is my fourth patch accepted. I was hoping for 5, but if you followed the Bug Hunting series, my big fix for object comparisons was accepted with some caveats, meaning I didn’t get credit.
The 4 month delay is obviously due to the push for Flex 4. Though the trunk is somewhat off limits to community patches depending on your reading of the Submitting a Patch page on Adobe’s site. “We are starting Flex 4 development in /flex/sdk/trunk, so the trunk is in flux and patches submitted against it are less likely to be accepted for now.”
Related Posts (generated):
2009
10.16
Next week I am going to be explaining the Flex Component Lifecycle to another group where I work. I think understanding the cycle is a major step in understanding the Flex framework and how to utilize it. I created a spiffy presentation to keep me on topic. I think it should to stand on its own, and would appreciate any feedback. I purposefully avoided switching to Flex/Flash Builder so that I wouldn’t be tempted to try and explain everything as I typed.
I used sliderocket for the first time and have been very impressed. Once my trial is over and I’m relegated to the free version I’ll pass judgment. If you get to click happy it freaks out about transitions though, so may sure text has completely faded in/appeared before clicking or it’ll start acting odd. No sound to worry about, it’s all slides.
My biggest source was Mrinal Wadhwa’s similar presentation which provided a lot of inspiration and some things I could steal to make myself seem smarter than I am. I based my Elastic Racetrack and Marshal explanations on a great post on Craftymind.
Related Posts (generated):
2009
09.23
One of the great things about Flex/Flash Builder is the wizards and templates that are used to create Actionscript and MXML files. When you’re about to create a file you have a plethora of options to choose from. Unfortunately, if you’re like me, you always seem to hit “MXML Module” rather than ‘MXML Component” and have to cancel and re-click. Fortunately, there’s a quick fix. Just right click on the perspective you wish to change (in Flash Builder it’s Flash) and choose “Customize”. You’ll get a nice list of options to show on submenus, including the new menu. Just uncheck everything you don’t want to see and check any additional options you do want to see.
Related Posts (generated):
2009
09.10
Since I yelled about the HTTPService Bug I figure I might as well applaud Adobe for getting it fixed. The 3.x branch was updated Tuesday afternoon and the bug (SDK-22883) was closed yesterday. So, if you’re wondering what the fix is, Open up your HTTPService.as file and replace the dispatchRpcEvent method in the HTTPOperation with this:
override mx_internal function dispatchRpcEvent(event:AbstractEvent):void
{
if (hasEventListener(event.type))
{
event.mx_internal::callTokenResponders();
if (!event.isDefaultPrevented())
dispatchEvent(event);
}
else
{
if (httpService != null)
httpService.mx_internal::dispatchRpcEvent(event);
else
event.mx_internal::callTokenResponders();
}
} |
(or monkey patch it in). 3.5 is obviously coming, and you can see the targeted fix list here
Related Posts (generated):