Blog

  • Did you purchase Taleo Business Edition?

    If so, demand your money back. Then, give me $70k, and in 3 months, my team will have something better than they do. This will allow your company to have better job applicants: those that do not have negativity towards you.

    Out of the 67 jobs currently on FlexJobs, at least 6 had this horrid system implemented as their job applicant & recruitment system. Of those, 5 out of 6 sabotaged the interface implementation in some shape or form. By this, the HTML & JavaScript they used to embed Taleo’s system had too much control given to those who do not belong having that level of design control, and thus made it unusable to those using the site. I think Brightcove was the only site that actually implemented it correctly into their branding and kept it clean.

    Furthermore, each site used the same system, yet I had to input my information & re-parse my resume each time. It is the same system… why am I having to repeat myself multiple times? This doesn’t include the other sites that didn’t use Dice, Monster, or their own system which included it’s own registration system. I had to create a new user name and password for each job application. The registration forms themselves were not well designed, making me write my email 4 times vs. the needed once. Weirder still, probably because of too much freedom in implementation, Taleo’s registration differed from site to site! The worse was 10 pages of questions on some of the implementations with a 10 point, bold font; really hard to read.

    I’m willing to bet money the same problem that plagues badly written e-commerce sites with abandoned carts plagues companies that utilize this system. I came EXTREMELY close to abandoning two sites, one of which wasn’t Taleo but some other badly designed interface with an unusable system. “As a software developer, do I really want to work for a company who can’t even implement 3rd party web application?” A resounding “NO!”.

    There are 2 types of job hunters, active and passive. Passive people put their information out there in an easily accessible fashion on sites such as Monster, Dice, and various other job / recruiting sites. In late 2002, things started to pick up. Instead of 3 recruiting firms calling me for the same job posted at IBM attempting to be first in, I’d have 5 recruiting firms contacting me about different opportunities. If you were a passive job seeker towards the beginning of 2003 for Flash work, the opportunities would flood in. The websites suddenly provided good value to their users in forcing them to input their information into the web site systems through not-so-fun interfaces: employment opportunities. To their credit, Monster has improved over the years, and Dice was very active in their community seeking user feedback.

    However, one thing that hasn’t changed in 5 years is for the active job seekers, those who seek out work from various companies & individuals, is the process and thus experience of looking for & applying for new jobs is still horrible.

    The same websites of companies or their middle-man recruiting firms all had horrific systems, all varied, all requiring unique registration that you’d never use again, and all having stone age abilities at parsing resumes. For those larger companies who have set systems in place with questions & processes for legal issues as well as controlling the influx and type of information sent to HR, these systems were built for those goals in mind, and in the end fail. They result in the job seeker having a negative impression of the company (if I’m applying for a web application position, you already look pretty bad), frustration in what is supposed to be a positive endeavor, and built up expectations derived from those negative experiences that may be unreasonable compared to what they had set before starting to apply. If you are hiring, you want someone who wants to work with you because you offer work that they will excel at. Having the applicant demanding more than usual to compensate for a negative job application experience is ridiculous, but I bet accurate. I’d go so far as to say that their answers have the potential to be flawed in the job application process because of the negativity built up during the process. Just because they are the ones applying for a job from you doesn’t mean they have to suffer to work for you. Job hunting is supposed to be a fun and exciting experience to the benefit of both parties.

    5 years people… 5 years and things are WORSE now than they were before!

    You have 2 options. If you are a small to mid-size company, use Dice.com. Their application form is the greatest on the Internet with Google-like simplicity allowing quick use for the user, a positive impression, and no implications or perceptions implied towards the company being applied to (vs. negative from the above):

    dice.gif

    If you are a larger enterprise with the need to filter applicants based specific questions, skill sets, and other legalese controllable in a CMS like system to prevent too many responses, see my first sentence.

  • Invalidation Strategies for Flash Player

    Skip Intro

    Had the honor of meeting up with an old friend yesterday. Chris Skogen, one of the talented gents at Gizmolabs, was my manager & tech lead when I worked at BellSouth. He’s an extremely talented programmer, doing a lot of C, C++, assembly, and Java. Below is some of his team’s coding + hardware work in action. This is not actually the record music playing, but rather, the record’s time code being used to scrub an MP3. Plethora of other features but… isn’t this one alone enough to make you go, “OMFG!!!”

    He’s been doing it for a long time, and since I respect anyone who has a lot of experience in this industry, I pretty much spent the day absorbing every word. We were supposed to meet for lunch since her majesty and I skipped out on going to a Christmas party of a friend of his that we RSVP’d too. Figured, I could buy him lunch and he’d forgive me. Anyway, instead of staying an hour at noon, stayed till 7pm mainly talking shop, finishing with Gears of War coop. He’s the guy that got me typing my brackets on a new line after he and another C coder at BellSouth started making fun of my if statements (Flex Builder is biased against this way of coding, btw…bleh !). He was also the guy who first introduced me to the Command pattern, and wondered if the Flash community had any framework like that. Four months later, I was all into ARP, which has the Command pattern as its central crux.

    I spent some of the time asking about invalidation methods. Invalidation being defined as “painting the screen with pixels in an efficient manner”, also known as redraw. Since he develops for multiple platforms, he knows the libraries and strategies involved for screen redrawing on Linux, OSX, Windows, and various devices. I remember one of Bruce Epstein’s books, Director in a Nutshell describing “The Great White Flash”. It’s been so long I can’t really remember the cause, but the redraw of the window caused the application to start with this white flash, basically a redraw of the screen that sabotaged the initial experience with various ways around it. When Chris would describe Windows redraw events compared to other platforms, it sounded all too familiar. The Director mantra back then was, “If you build it on PC, you know for a FACT it’ll work just fine on a Mac. If you develop on a Mac, it will NOT work on a PC.” A lot of the intricacies of when something redraws an area, how you have to manage it, etc. seemed really gross, and painful. However, like a lot of C guys I’ve talked to, he seemed to take it stride, view it as a conquered fiefdom, and begin to relay the double-buffering strategy employed in some cross platform library. Must… get… that… attitude!!!!

    In particular, I recently had the good fortune of getting Greg Burch’s, bloke employed at Adobe on the Mobile Team, feedback on my Flash Lite 2 component set. The guy clearly knows his stuff, has massive knowledge in ActionScript optimization, and is very focused in achieving that goal. He also understands mobile GUI development as well as the experience users expect on devices. After talking to him on the phone, I can clearly see why he is employed with Adobe on the Mobile Team. In our discussions, both offline and on, he basically set out in the opposite direction as me. While I was originally interested in creating a nice API as a tertiary benefit to the original 3 goals, he instead approached it from a “we must make it lightweight”. Even 10 seconds of his recounting of past projects with no supportive details clearly indicates that he has earned in blood a lot of great techniques and understandings. Basically, he is making the code look as much like ActionScript 1 as possible (even C for that matter), not as an intention, just a result that optimization and ActionScript 2 & OOP do not go hand in hand. While he is confident and happy with these potential changes, I was somewhat disheartened. His suggestions all met the first goal of “if it runs Flash Lite 2, the framework needs to work”, but I felt it was losing a lot of it’s utility to developers; they would now have to do a lot more work (typing basically, and not all of it comfortable). However, if you are going to run under the insane CPU & RAM restraints, no one is left unscathed. Welcome to the suck.

    After talking to Chris, however, he pretty much corroborated everything Greg was suggesting and had little empathy for my forlorn yearning for OOP. This lead to a very interesting discussion about inheritance vs. interfaces. He’s a big believer in programming by contract; having classes implement interfaces instead of using the extends keyword. After hearing him recount the challenges of being “a slave to the base class”, I totally understand and agree… for large scale projects with uber-knowledgeable individuals. If you are on a deadline, and have a variety of skill sets on your team, abstracting details seems to me like a good thing. I hate those projects, though,hehe! Flash Lite, however, has no room for interfaces as they too are basically objects like classes, and take up RAM. I digress I know, but it’s fun stuff.


    Anyway, let me give some context first. There are multiple ways to redraw things to the screen in the Flash Player, with different repercussions in performance and developer approach. You basically have the following options in Flash Player 9:

    1. DisplayList
    2. Blitting
    3. Drawing

    Both blitting and drawing depend on the DisplayList, but they are not mutually exclusive. The DisplayList is the act of adding a graphic object to a list of “things to draw”. If the Flash Player see’s it in there, it’ll get drawn. You can remove the object from the list, and it’ll no longer be drawn. This has a lot of positive repercussions in that a graphical object can exist in RAM without taking up CPU resources being drawn. Flash Player 8 and below did not do this. If you created a graphical object, like a MovieClip for example, even if it was invisible, it would still take up system resources being drawn every frame.

    Suddenly, the programmer now has control over what is drawn, and when. This makes coding easier, too, because you can choose when to draw things, therefore writing more scalable & efficient applications… just what Flex needed when you started writing these gigantor Enterprise apps that made Flash Player 7 & 8 scream in pain.

    There is something, however, more efficient than the above. This is called blitting. It is the act of painting a bitmap to the screen. A Bitmap is a DisplayObject in Flash Player 9, meaning it can be painted, or not painted, to the screen at the developer’s discretion. While Flash Player 9 has removed the problem of “too many objects == too much system resources”, Bitmap never has this problem even if those objects are in the billions. This is because you only ever have 1 bitmap (usually) that you paint on top of. Therefore, you actually have multiple small objects in memory that are then redrawn at some interval to the screen, and ONLY those areas that have changed. This is actually what is probably under the hood of the Flash Player, written in C/C++, that is redrawing all of your DisplayObjects. However, if you know going in that you’ll have a lot of objects which aren’t interactive, blitting is a wonderful technique that scales well, uses less RAM than the DisplayObject , and CPU is minimal because Bitmaps don’t use a lot of CPU to redraw compared to vector graphics. This technique can be used in the Flash Player 8 as well, although, there is no DisplayList so even if the Bitmap isn’t being visibly shown, it is still taking up CPU cycles to redraw it. Both can be combined with double-buffering where you paint to an off-screen bitmap, and copy pixels onto a on screen, smaller one.

    Finally, there is drawing. Drawing is the act of using the Flash Player’s vector drawing API to create vector graphics. These are wonderful in that the engine to create them is small, and they take next to no RAM. They look nice in terms of anti-aliasing, and the API is simple enough you can create some pretty sophisticated results by building atop that foundation. The downside is that drawing doesn’t scale very well. A lot of “anything” in Flash Player 8 and below used a lot of CPU, and vector content is definitely a prime candidate to use those resources. There are various techniques you can apply in Flash Player 8 and 9 using cacheAsBitmap, scrollRect, or even blitting the resulting drawing and thus removing the vector part.

    The way each of the above is rendered is doing on an interval, called a “frame”. Flash Player was built originally as a vector to pixel renderer , and later incorporated a timeline to show changes in these images over time. In effect, a lightweight animation tool was the result, hence Flash Player’s rising popularity for design in the Internet during the modem, low bandwidth days. These frame ticks run on some developer / designer set time code, like “15 frames a second”, or “120 frames a second”.

    What that means is that the Flash Player will update the screen 15 times a second, but more no more. It is not guaranteed to update the screen that many times for various reasons such as screen refresh, CPU usage, etc., but it IS guaranteed not to update more than the set frame rate. This is useful for animators to convey motion. As Ted Patrick has written about in the past, the introduction of the ActionScript Virtual Machine share’s this time between rendering. The important thing to understand, though, is that ActionScript for the most part is single-threaded. This means that once it starts, it doesn’t stop till it’s done running all of it’s code. If you have a lot of “stuff” happening when a user clicks a button, that code is run, and nothing else can really happen in the meantime. There are various threads that the Flash Player spawns to handle network operations, keep tabs to see if theAVM stopped responding for whatever reason, but none of these are accessible to the developer. Bottom line, if you’re code is busy doing things, you’ve allocated less time to the Flash Player graphics renderer to redraw the screen, and thus you’ll lose redraw fidelity.

    How do you then lessen this impact, and create an effective invalidation solution given the technology?

    In Flash MX and Flash MX 2004, an invalidation routine was created that ensured that components were only ever changed visually once per frame. This was done because while the developer was more than capable of changing a MovieClip‘s x and y coordinates on the screen multiple times in a few milliseconds, it would only actually render once. Changing those properties directly actually triggers a need to redraw event in the Player, and thus you are being very inefficient in your use of the Flash Player. To remove this problem, the first technique was a convention called drawing and invalidation. You would have a few private properties in a base class that abstracted MovieClip , and allowed you to change it’s properties with the ability to then invalidate on your own time. Some would invalidate immediately. It was a good first attempt, but was more formalized and better implemented when ActionScript 2 came onto the scene in Flash MX 2004. While AS2 still outputted the same bytecode as AS, it still implemented the main function that made this possible, introduced flexibly in Flash Player 6: onEnterFrame.

    The enter frame event is something emitted every frame. In Flash Player 9, DisplayObjects do this regardless of whether something has a timeline or not, 1 frame or 10 billion such as MovieClip & Sprite. While the name itself is somewhat legacy, it is useful to understand what it really means. First, it is guaranteed to be fired once per frame. Unlike setInterval which can fire randomly (at most 10 times per frame, or less for longer intervals), you can depend on the onEnterFrame function to run when you expect it to run. When it actually fires within a frame context isn’t important. What is important to know is that it is synonymous with “redrawing now”. Since you can only redraw once per frame, it fits in nicely with knowing when you are best suited to do so effectively. FlashMX & Flash MX 2004 would use the invalidate method for graphical components. This meant, “redraw next frame”. So, the developer could change a bunch of properties, styles, etc. and theMovieClip wouldn’t actually redraw itself visually (by setting _x, _width, applying a color, etc.) until the next screen redrawn, no matter how many were changed, or how many times the same one was changed.

    This was great in theory, but a lot of the race conditions with measurement and styles made it hard to effectively do. Regardless, it was THE best way to ensure effective redraw. This was slightly improved upon in the Flex 1.5 framework with a more formal system:
    – set a property
    – if it causes a redraw, invalidate a draw function, otherwise have that property’s dirty flag set
    – if a dirty flag was set, determine what type of redraw to perform, a draw, size, measurement, or style change
    – invalidate one of those functions if applicable
    – one of the invalidated functions would run at the next redraw

    This made possible larger Flash Player applications. The problem was, though, that even if things weren’t redrawing and just sitting there, they were still taking up resources, regardless of the wonderful invalidation implementation. Hence Flash Player 9’s DisplayList being invented.

    Blitting is kind of a low-level, boilerplate affair, and it’s currently not used a lot by the Flex framework. This is a shame. While the Charting components and Flex components both make extensive use of caching as bitmap and setting effective scrollrects , I think for some of the non-interactive parts of charting, they could scale effectively better. I have not, however, read reports of problems with the charting components not scaling. Props to the power of ActionScript 3!

    A significant amount of the framework is being drawn with vector graphics via the Drawing API, and all uses extensive use of theDisplayList.

    So, returning to my invalidation implementation, I chose to use the Flex framework invalidation methodology in my implementation of a Flash Lite 2 component framework. Granted, I didn’t have the added or render event’s, but enter frame is all you really need. Seemed logical enough; you want something to efficiently redraw on a device that REALLY needs to be efficient. As I later found, some on my own, some with Greg’s help, there are a few problems with this.

    1. Most dirty flags in the Flex framework start out with default values of false. This default value takes up RAM, RAM that I don’t have.
    2. I am making an assumption that a developer wants to have the component redrawn when they change a property. This is an incorrect assumption to make.

    Regarding #1, one solution is to simply not define default values for the dirty flags. The if ( flag == true ) still results in a correct evaluation if the default value is false, undefined, or null. That way, the flags would only last for 1 frame. Unfortunately, that is still a lot because Objects, what all data-types derive and thus extend in pre-AS3, take up a lot of overhead so even a Boolean has a valid cost to think about.

    Regarding #2, there are numerous cases where data isn’t ready for consumption by GUI controls, or some other process hasn’t completed yet. Some of that data or relevant process may be needed to do internal calculations for redrawing. I’m slowly to see ways for developers to implement their own call to invalidate. So, instead of doing this:

    attachMovie ( ComboBox.SYMBOL_NAME, “cb”, 0 );
    cb.prompt = “– select a value –“;
    cb.dataProvider = someArray;
    cb.setClickHandler ( this, onClick );

    You would instead do (per Greg):

    attachMovie ( ComboBox.SYMBOL_NAME, “cb”, 0 );
    cb.prompt = “– select a value –“;
    cb.dataProvider = someArray;
    cb.setClickHandler ( this, onClick );
    cb.invalidate();

    Notice the only difference is the addition of a invalidate method call. This triggers a redraw. The former, every single public property set, and some methods may trigger a redraw, usually via getter / setters (which have a lot of overhead…). Yes, it’s efficient in that it supports an infinite amount of property setting with only one redraw, but again, I’m assuming the developer WANTS to redraw. Maybe they have the data, want to set it, throw it away, but are awaiting more. Maybe they need the above, plus they are doing it to multiple controls over a sequence so they can effectively deliver a large amount of data through a small series of steps the device can handle. Later, they can then redraw when they deem it necessarey to do so.

    In discussing this stratgedy with Chris, he’d recount a lot of techniques Apple’s Cocoa uses as well as some of his own implementations. He found the most successful (and I’m paraphrasing badly here) is when parents are responsible for drawing their children. This allows you can redraw just one section of the GUI, or if you need to redraw everything, you can call invalidate on the main parent, and it’ll cascade down the tree of children, who in turn call invalidate on their children.

    What I find interesting is that this technique could not only work in Flash Lite 2 / 2.1 which is basically Flash Player 7, but also in blitting in Flash Player 8 as well as utilizing the DisplayObject API in Flash Player 9. In fact, it’d be really nice if Flex 3 gave us this option. I think the reason it’s not in Flex 2 is a lot of people need an accessible framework; meaning, low learning curve. Some people have never developed or programmed before, or not done that level of heavy GUI work, etc. Bottom line, I think the decision by the Flex team is “developers shouldn’t have to know how the Flash Player works to effectively write applications atop it”. I totally agree. I also believe, however, that there should be a way to optionally allow those of us who know what we’re doing to redraw when we see fit. It’d really help those larger applications, or when you are trying to squeeze all you can out of an implementation, say, Flash Lite 3 which could possibly use the new AVM on a device :: crosses fingers ::.

    While it’s more work for the developer, I understand why Greg suggested what he did now, and have more context as to the ramifications what power this really gives developers. I guess I just don’t really have in my head best practices on implementing this. The abstracted invalidation model that Flex has removes any care, and provides a nice convention for me to build atop of. Now, I suddenly have to care when I redraw things which could be different for each GUI control. Furthermore, the less utility I add to a framework by making it more efficient instead, the more the expectations of the Flash Lite community shifts to wanting more features out of controls. Not sure the best approaches to either. Fun, regardless!

  • Flash Lite 2 Component Framework Questions to the Community

    After yesterday’s frustrations with the technical limitations I’m running into, I thought I’d put out some questions to the community to see what they feel is important to them in a Flash Lite 2 component framework. This will help me focus my efforts and deliver something useful to the developer community by the Ides of March.

    Last fall, I set out to create a Flash Lite 2 component framework, called Shuriken, that made developing Flash Lite 2 applications not only capable (no UIComponent…wtf!?), but also pleasurable since nothing exists currently in that realm for Flash Lite 2. Adobe has provided Flash Lite 1.1 components that do not utilize ActionScript 2, nor any of the Flash Player 7 features. Their emulators, however, are top notch.

    The goals, in order of priority for the set, are:

    1. work on the lowest common denominator; if it can run Flash Lite 2, the component framework should work.
    2. provide commonly required GUI components & utility classes while being easy for developers to extend.
    3. no styling or skinning code; developer / designer is responsible for decorating and/or changing base skin symbols. No assumptions are made in code.

    I’m having problems meeting those goals, namely in regards to scalability. I cannot take all the RAM & CPU in the framework, but the more I take, the easier it is for the developer. I’m having serious challenges meeting both the desire to provide developers with a clean, useful API that hits most common use cases, but also is efficient enough to run on devices in a scalable way. These are bipolar goals, and meeting in the middle is starting to become impossible. I believe everything is possible, but I want to get to the most useful result, so am hoping you all can help me focus on that result.

    Onto the questions:

    1. Are those goals accurate? Agree? Disagree? See a different order? Different priorities?
    2. Would you rather have a clean ActionScript 2 API, or a lightweight one that doesn’t have much functionality, but does a lot of the grunt work? You have to choose one or the other, not both.
    3. How do you prefer to write events among the 4 options:
      1. child MovieClip calls a method on the parent via _parent.onEvent
      2. using built-in Flash Player 6 callbacks, like myClip.onPress = function
      3. using Flash MX callback mechanisms, like myBtn.setPressCallback ( scope, functionToCall )
      4. EventDispatcher
    4. With regards to #2, would you prefer to have more GUI controls, or less controls that are more efficient?

    Thanks for your time in answering these. It is appreciated, and will help provide a useful component framework for the Flash Lite community!

    “Et tu Flash Lite Community? Then fall walled gardens.”

  • Flash Lite 2: Low RAM, Optimizing via Degraded Ego

    Can’t sleep, so here are a couple trends I keep noticing I do in my Flash Lite 2 development.

    First off, I keep running out of RAM. The forms I had the designer create from my wireframes won’t work because the wireframes were flawed. In designing them, I had no idea that some of the designs simply wouldn’t work based on the fact that there were too many GUI controls on the screen at one time. The negative is that I am forced to create more classes that represent forms… which actually use RAM by their very existence. Classes in ActionScript 2 are actual prototype objects vs. blueprints like in other languages, and thus physically exist as objects. In effect, I’m merely delaying the inevitable, and making it harder for others to play later. The positive is, my GUI’s are forced to be extremely simple. Simple is good, right? Screen 7 of the wizard? *sigh*…

    Related to the above, some controls I’ve been creating hit limits mainly with regards to CPU before RAM. When I fix the CPU problems, which usually are stack overflows or script timeout limits (which on my phone feel like 2 seconds, not 15), I then start to run out of RAM again. Thus, I have to start optimizing my code before it’s even written.

    How do you optimize ActionScript 2? Same way you optimize ActionScript 1, with the addition that you have to “drop the ego” as Branden Hall said to me in the past. I’m not sure he meant it in this context, but it fits. This hurts more in AS2 than in AS1. Ego meaning, “loyalty to good programming practices”.

    For example, using vector vs. bitmap graphics because vectors use less RAM doesn’t make me hurt. But, these do:

    Less Inheritance

    Prototype chain lookups are slow. Therefore, the more inheritance I use, the more I hurt myself. Huh!?!?!

    For example, I wrote a Calendar component. Getting that S.O.B. to run on a variety of phones out there and NOT CRASH was a feat unto itself. While neato, it still didn’t play nice with others… since it used about 1200k of RAM; that’s a meg and 200k. My Nokia 6680 only has 2 megs. So, putting a design + a button and some labels wouldn’t fly if a developer wanted to do so. That’s just uncool. A component set should make the developer feel happy to use various controls together, not scared. I must crush all fear.

    Solution? Reduce the OOP’ness of CalendarDay. What’s CalendarDay? A Calendar is typically a control that draws a bunch of weeks in rows, and each row has a bunch of days, like Sunday, Monday, Tuesday, etc. These 7 days are put in 6 rows. That way, you can safely show most months with last month’s week at the top, and next month’s week at the bottom. These day’s are effectively a bunch of MovieClip’s, 42 to be precise, drawn in a grid. The CPU required to draw 30 of anything in Flash is insane pre-Flash Player 9, let alone 42. …and this is on an ARM processor.

    So, it takes me 5 passes to draw things. Create data, attach mc’s, position mc’s, set mc’s data, and finally color mc’s. That equates to 14 seconds in total on my phone (you see it draw at 9), and 8 seconds total on faster N90’s and E70 models.

    These mc’s are an instance of CalendarDay. He originally was all cool, had public setters for his data and colors, which all would invalidate at the proper time, and were extremely flexible; ripe for use in a Calendar. Problem? They were cool. I ripped it all out, extended MovieClip instead of my (custom) base UIComponent class, and provided simple methods with no invalidation. I refused to change the package name, though. That, plus some other minor modifications & optimizations netted me:

    342k total used RAM.

    w00t! In my drunken stupor of celebrating, I notice the code was… well, it sucked. But it works. I’ve always been the biggest proponent that the metric for cool code is code that works vs. code that looks great, but doesn’t do anything. Why, then, do I have such a problem not smiling when I dive into that “class” now?

    EventDispatcher is Slow

    Almost a second or more dispatching events; remember, I only have about 2 seconds per stack process per frame, so I’ve been trying to use callbacks where possible which equate to only 1 object capable of listening for the event vs. multiple like EventDispatcher supports. Thankfully, this is a rare use case, but… more code for me to write, and still have 2 extra variables + method call to make. EventDispatcher via it’s decoration of objects actually adds enough stuff to equate to this, but at least I don’t have to see it, hehe.

    I haven’t succumbed to having children calling known methods on parents yet via _parent.onSomeEvent. I don’t think interfaces could even justify that move… but… it’d save writing 2 properties and a method. That’s 3 slots, per instance used… ugh.

    There was a reason EventDispatcher was ported to native C code in Flash Player 9; it’s the main workhorse for GUI coders and was the main bottleneck in pre-Flash Player 9 large projects.

    Shorter Method and Property Names

    Since Flash Lite 2 runs in the interpreted AVM, the length of the string name used to find the method / property name directly affects the speed in which it takes to run. Shorter method names? Faster to run. Less RAM, and more compact bytecode which equals faster code.

    Problem? When I started programming, I read in books, blogs, and websites that encourage short, concise method names that used abbreviations and said those were good to do. Now, I think all the people who wrote the books, blogs, and websites are crackheads and I pray to God I never have to maintain their code in a future project. My methods and properties are about as verbose as can be without being audacious. If you ever question what a property is, or what a method does, I consider that a failure on the programmer’s part in naming.

    …yet, here I am thinking of changing setCurrentFromDate to setCurFrD, or even scfd. Properties are even worse; __currentDate to cd. The only thing left to make sense of the cryptic hieroglyphics I’ll write will be the strong typing, but that merely helps confirm suspicions, not convey facts. Horrible… but hey, it’s compact, low RAM, and runs well right? Did anyone get a post-processor for ActionScript 1 / 2 bytecode for Christmas they don’t want? I could use one. Flasm doesn’t count.

    What the 3 main issues above effectively make me do is constantly have to re-work my UI. For example, Google Calendar has these text fields for choosing a date. It shows something like “11/5/2006” in the field. If you click it, a Calendar component drops down below it so you can choose a value for the field to hold. I can do that in Flash. I can do that in Flex.

    Flash Lite 2? Hah, you’re smokin’ dope, dude. Well, sure, I could do it… if those were the ONLY 2 components on stage. Bleh.

    …thus, I have to beg the designer to discuss “solutions”. It’s rough, I’ve already ravaged the design enough, and will have to devote at least a week (last week in February) to make sure the design is up to the designer’s standards before I submit to the Flash Lite contest.

    I swear, I’m this close to making a branch in SVN, and creating a “AS2 coder friendly” branch and a “AS1, fugly but optimized” branch for the component framework. This stuff is hard, yo. Purely masochistic at this point. I wanted a challenge and I sure got one. It’d be easier if I could just drop the ego like Branden said, and code lightweight AS1. So… hard… to let… go…