Blog

  • Flash v2 Framework: Bit Off More Than I Can Chew

    I had an idea I’d do Captivate tutorials on every class in the Flash MX 2004 framework. I had gotten a lot of praise for my past component tutorials, and many people have emailed me constantly to do more.

    …the problem is, there are a LOT of classes in there, each with their own intracacies. Describing each would take a book of documentation (which Flash MX 2004 now has). Not to mention the fact, I’ll have to do it again in Januray of 2006 for the 8ball framework (assuming there is one) since I figure if one does in fact come out later this year, that’ll be how long I need to feel confident in my ability to describe it to others effectively.

    However, a quick run-down, verbally spoken with some of the functions shown while spoken too, helps me understand what is going on under the covers. When I read the classes to learn them, say mx.managers.DepthManager for instance, I’ll read some of the properties and functions aloud to myself to garner a better understanding of what it’s doing, and how it plays with the rest of the framework.

    In practice, this UIObject tutorial is taking way to long to complete. I did these last Sunday night, and just now realized I’m not even 25% of the way done with the class. I guess I’m really trying to guage what people want to know about the framework, without sacrificing important details.

    For example, I think a complete rundown of the entire framework is needed, not just certain classes. I know that’s a little non-pragmatic, but the framework has a lot of tightly, inter-woven functionality, and it’s important to understand those connections to get the most out of the framework AND to keep yourself out of trouble when using it.

    So, doing Captivate tutorials for each class will not work, I don’t have the time to do them all. I’m not opposed to a Podcast, but I really think the lack of visually showing the class will sacrifice a lot the understanding and retention.

    Maybe talking about each class in 2 minutes or less? Curious what the community thinks is best.

    Example of Overkill for mx.core.UIObject

  • Firmware Hell & Nicknames Are Useful

    One of my rules about blogging is not to blog when your emotional. Emotions cloud your judgment, and bypass perspective. Thus, blog posts become rants of nothing more than entertainment value to the occasional reader that has the inclination to read such things. My other rule, though, is if your still emotional about a topic after 10 minutes, and you’ve given it another few hours just in case it’s a simmer’er (something that actually builds, like plate tectonics pressure), you can wait for it to blow so you can later reflect. Reflection, even if written in discovery manner (like an audio learner when they ask you a question and answer it themselves and your left wondering why they asked you the question in the first place). Others seeing your discovery can potentially help them as well, or give perspective at least.

    I’m still reflecting. It’s pretty weird, if you… well, actually me, take a step back, and recognize that the drama in my life is not recovering from a Tsunami, not worrying if my son or daughter is ok over there in Iraq, but dealing with a router firmware update. Pathetic, or point of reference? Those who belittle teenagers, saying that their hormone catalyzed emotions merely exemplify their self-importance on one of the most non-important part of their lives doing just that… belittling someone, being ignorant of their situation, and claiming to think that the reaction is not important.

    Again, I quote what I read from an educated Sociologist in college, “Although people may react to situations that are not real, their reactions certainly are.”

    Granted, in all fairness, those reactions in context of greater happenings, both recent and abroad may shave off or add weight the impact such happenings have on another’s digestion of the situation.

    Why do I feel like I’m trying to justify my lamenting about my day because of my router upgrade debacle? Journalists don’t ask permission from their readers, do they? Well, anyway, I hope you came away with, “Jesse’s sorry he’s complaining about his router, but he feels he’s justified in it, and there may be some inkling of use in the description, so he feel’s it’s his duty to explain. He recognizes although his name is on his blog, it truly belongs to the readers.”

    Without further ado…

    Computer Scientists I’m sure are taught the nomenclature of the differences between a “patch” and an “upgrade”. I updated my firmware on my router, whichever one that is. I considered it an upgrade because it’s still a 1.x version, and all that’s changed is the minor version #. Talking to Spike about setting up my server so I can have Flex apps run on it, and the internet can actually hit my box behind my router; he was walking me through it.

    Something in his email, the part about “is your firmware the latest”… it didn’t say to do anything. But, I felt it implied something. You can’t make someone do something, but I certainly felt compelled to go upgrade my router. I mean, hell, that’s the crux on which all of my work, professional and fun, runs. That might be important to keep in tip, top shape and secure, eh?

    So, after I use their simple upgrade utility, all it saves is my username and password; all my connection data (Hi BellSouth, I’m really a computer, not a network… seriously), all my port forward settings, firewall switches… gone. The web interface is completely replaced by this insanely less intuitive interface (don’t give me that who moved my cheese bs, I do interface design for a living sucka!) with many options previously there removed and/or named something different, and I’m getting weird redraw issues in Firefox.

    Ugh. I’m going to be ignorant, and stereotype Linksys, and say that a big company was behind this change. Some Director somewhere wanted to have a “Cisco” branding refresh done on some of their products, and naturally the only way to force branding on IT administrators is to change their router interface (those that don’t work via command line or other remote utilities). If it’s anything like her majesty’s company (my own interpretation here, no one’s words specifically quoted), everyone’s a designer, and business cases are merely “I’ve read stuff for 30 hours this week therefore I’m justified when I throw bs at you, therefore justifying this project. If anyone challenges you, and you pull rank, and that doesn’t work, I’ll throw a stack of business analyst documents at their Outlook as a feint”.

    Negative? You tell me; I upgrade my firmware in the innocent, dare I say naive (remember, he who dares, wins), mind that I’m making my router better and more secure by having the most up to date software on it. Now, my internet, email, instant messaging, SSH, and Subversion doesn’t work.

    I swear, as soon as I get this damn BA degree done, screw my masters, I’m going back instead for a minor in Networking. I can’t imagine what IT administrators go through when they handle this stuff. I can clearly remember my feelings every time an admin screwed up wherever I worked, big company or small: complete, and utter frustration at the individual who f’d with my connectivity.

    My first law at being hired at any company is make immediate, and good friends with the admins. Not only do they give you straight, un-emotional answers to your questions when you ask in crisis like the above, but also more accurate estimated times of when things will be fixed, why they broke (in tech talk), and what they are doing to fix it. That still gives you the right to judge them as an idiot, but at least your talking to a friend, and not a “co-worker”. Your friend is an idiot? No no, you missed the point; they “leveled” with you. You don’t always get that with employees, but if you make an honest effort to get to know, take to lunch, and sincerely care about how someone’s weekend was in regards to IT, your life is soooo much better.

    In this case, I can see how easy it is to screw up a network. Considering I work at home, this is a big deal to me. I’m suddenly disconnected from the world, an isolated, and not as productive individual. I feel a lot better now if I were to ever start my own company and forking over serious bling to my IT admins. They know when it’s best to “leave it the hell alone” and “I’m here all weekend making sure this gets working”. I truly admire that. And I KNOW they know that the same people they typically help are sometimes apt to take situations out of context, and take the lack of network access out personally on the IT admin, which is completely unfair… but the situations I’ve seen occur, most take it in stride.

    “Cool, so, Jesse, your a fu#($*)(W ing idiot, my shiot doesn’t work, why in the hell did you upgrade your firmware when your router has worked fine with the same firmware for the past year?”

    “I made a bad decision.”

    “Damn right you did… but the important thing here is did you learn from it?”

    “Absolutely. If it’s not broke, don’t fix it. Seriously… leave it the heck alone!”

    “Good, always learn from your mistakes.”

    So yeah, got internet, instant messaging, and email back up… the latter 2 by merely “waiting 5 minutes”, the first by release/renew, repeat x 100. SSH appears to have never been broken… but my SVN is f000|X3d beyond repair.

    I reinstalled Tortoise SVN, and before I left for school, uninstalled and reinstalled Cygwin & friends. I guess tomorrow morning I’ll attempt once again to cache my SSH and hit my work’s Subversion repository.

    :: reads above ::

    Geez! It’s good thing I get paid for this. All I wanted to tell you was I upgraded the firmware on my router, and although it broke everything, I managed to get everything up again except for Subversion. I obviously know what concise is since I just consolidated an entire blog post of tons of paragraphs into 1 sentence. All about the application, baby.

    Speaking of getting frustrated, I was reading a post JD linked too about AJAX and a few of the people who are frustrated with the naming of things already in existence, and leading to obscuring true definitions, etc. To their (AJAX word users’) credit, I’m all about contractions, any pragmatic developer is; they are more efficient at communicating; speaking in the Active Voice can only do so much. HTML + JavaScript + CSS vs. DTHML for example; what looks better on a book? What’s quicker to say to a friend? Does your friend know what HTML, JavaScript and CSS are? Do you? Do you both know DHTML is an acronym for it? Cool, save time, prevent errors, and use it! Communication is inherently a flawed process; using contractions and acronyms makes it easier and less prone to errors… except when I talk to that government worker (head of EMS/paramedics here in northern Georgia). He uses acronyms like their candy; every other sentence has some 3 letter organization he assumes I know who the heck they are merely by some adjective next to them in his sentence to provide context…

    Anyway yeah, AJAX; you know what I’m talking about, right? 4 letters vs. HTTP+XML+HTML+XMLHttpRequest+JavaScript+CSS. The author in the article quoted some other dude, saying:

    If the real name is too long (the name Ajax was apparently coined because “HTTP+XML+HTML+XMLHttpRequest+JavaScript+CSS” was too long) then just mention the important bits. For example, instead of REST, just “HTTP”; instead of DHTML just “HTML and script”, and instead of Ajax, “XML and script”.

    The important bits? They are all equally important! If the team of technologies used together is common enough to place under a single phrase, acronym, or new name then by all means, use it to convey meaning of many different things through 1, single, portable term.

    So yeah, this backend developer… Oh, oh.. I’m sorry, this .NET developer… well, wait, he’ll get pissed if I don’t mention he’s got some mean SQL Server statement skills up his sleeve. So yeah, this backend developer who does .NET and is good at SQL Server said he liked watching the A-Team.

    …omg, like, knowing he was good at .NET and SQL really helped add context to that conversation. If I had said backend developer, couldn’t you have implied enough about said homeskillet’s background, and thus garnered, “Hrm… and server guy digs the A-team.” And you know, you have a mouth, you can ask a question for more details you know. “Does he do .NET? I always thought .NET guys didn’t dig the A-Team…?”

    Wow, geez, you know what, you could of prevented and headed that question off at the pass SIMPLY if you had not used an acronym like “backend” vs. “.NET blah blah blah SQL blah blah”. …Hixie’s right, screw placeholders; they only work in programming anyway, and by God, those of us in the English speaking world, especially Americans, need to play literary Janitors. We need to ensure the maintenance of our language; it’s already foobarred fubared (darn, forgot the dual consonant after the vowel in past tense words) fubarred enough without people creating nicknames for things to consolidate terms for easier communication and understanding from the masses in an already information overloaded society.

    Damn oxymoron’s… they just leak the sarcasm right out, don’t they, thus destroying the integrity they were supposed give the facade of, and thus have more impact. Whatever, if you made it this far, I’m sure you got the point.

    Anyway, yeah, firmware upgrades suck and acronyms rock; don’t fix something that’s not broken, and don’t blame a society’s awakening & acceptance of new technology methodologies by using short nicknames for your insecurity of your slow-adopting technology.

  • Fatboy Slim @ Eleven50

    Fatboy Slim‘s spinning at Eleven50… Fatboy Slim’s spinning at Eleven50… Fatboy Slim’s spinning n’ spinning n’ spinning n’ at Eleven50.

    See you tonight!

    Da 411 (Info)

  • Table Topics RIA

    I used this as an example in a Flashcoders post yesterday, and after searching my blog in vain, realized I never blogged it. I completed this over a year ago!

    :: smacks head ::

    Table Topics – Table Designer: A Rich Internet Application

    Or, to see it in the actual website (which I didn’t build, nor was I involved with):
    – go to tabletopics.biz
    – click on the “Virtual Designer”, highlighted in yellow

    Background

    In the Fall of 2003, I was asked by a friend and fellow contractor, Jason Key (who worked on Delgo @ Fathom Studios, the entertainment division within MacQuarium here in Midtown, Atlanta) (he’s also with Mental Models), if I could work on a Flash application he was contracted to help on. At the time, I was deep in learning the then newly released Flash MX 2004, so naturally I was all over anything that was allowing me to code in ActionScript 2.0 since my job at the time had strict requirements for ActionScript 1.0.

    Also, Jason sold me on the project because he was excited, passionate, and a designer. I hadn’t worked with real designers on projects for about a year and a half at that point, so was suffering some serious withdrawal.

    Basically, Georgia Tech funded money to Table Topics for their app. Table Topics had Zoom(or was it Xoom?) Design build them an entire Flash site. For the application part, they contracted Jason. Jason Keys then contracted me to do the Flash Programming. Noooooooooowwww do you see why networking is an important skillet to learn?

    What did the client want? An application to allow customers to pick and choose the table design they wanted. They were plagued with the problem of customers feeling they were locked into specific designs and cuts for tables. Table Topics knew they had the capability to create just about any table combination from their available materials, but wasn’t sure how to best communicate that online.

    Enter Zoom Design + Jason Keys + JesterXL + Flash.

    Technicalities

    Jason ended up doing 5000+ JPEG’s for the application. The gist was, every table’s frame, inset, and trim had to be modeled and textured in 3D, and then exported out and cleaned up in Photoshop. Two versions of these had to be done for the 3 different views in the app. Jason had some mad 3D skillz, and wrote a lot of Photoshop batch actions to expedite his development time.

    He also managed ALL contracting interactions, which was great. I didn’t have to deal with anyone but him; he did a great job at managing me, managing the project when technical issues arose, and keeping scope creep at bay with an iron fist.

    I worked from home, he worked from home, and we met in person about 6 times over the course of 3 months (November to March total communication, December to end of February total development time), and had numerous phone and email conversations. That was a blast balancing with a full-time job.

    Flash Part

    Although I wrote it in Flash MX 2004, I made the call (which I had the authority to do which felt awesome) to target the lowest common denominator, Flash 6.0.41.0. There were some other minor fixes in Flash Player 6.0.41.0 that I wanted beyond the device text masking, but I felt that this was a great install base at the time.

    I still wrote everything in AS2, but did not use package paths (didn’t know them at the time), and everything pretty much inherited from MovieClip (wasn’t comfortable with UIComponent at the time). This was one of the great deployment features Macromedia put into Flash MX 2004; the ability to work with the latest syntax, but compile to an older player.

    This was also the last project I ever used SharedLibraries on. The catch 22 with Flash MX 2004 was, the more AS2 compliant you were (using private & public, type-casting), the slower your compiling became. I thought at the time SharedLibraries would expedite my development time since I’d be compiling a bunch of smaller components making unit testing easier, but it was a management nightmare the minute I changed my mind on a setup, or wanted to move things around a bit. I also only used 1 component in more than 1 place, but considering it was all still compiled to 1 SWF, it was a pointless endeavor in retrospect (I only learned this at the end of the project, naturally).

    I utilized the Flash MX components updated to AS2 so I could still work with AS2, but compile to a Flash app that “looked” like a RIA from the time. The Flash MX 2004 components also had a bigger file size footprint, and even with preloading, the updated Flash MX ones were smaller, less overhead, and had a more consistent look.

    I created 1 XML file to load in all of the images. Basically, 1 XML file listed all frames, insets, and trims, and each image had 1 large version, 1 medium version, and 1 texture thumbnail, resulting in 5000+ images (poor Jason, I know). The XML file was a single node, attribute holding an image tag which described all of the images. This was done to expedite parsing. Flash Player 6’s XML parsing was phenomenally better than Flash 5, but I wanted to be conservative as testing on slower machines, you could still see a noticeable hit. It was definitely acceptable by Jakob Nielsen standards.

    The image filenames were used to determine what type they were, what size they were, and what section they went under. This was agreed upon and tested by Jason and I upfront. This parsing of string filenames to a usable object structure is actually what the main bottleneck in the entire application was. The 256k XML file took about 600 milliseconds to parse, but the string to object parsing took up to 2 seconds.

    Loading 5000+ external JPEG images on the fly? No problem, says Flash, I got you, twice on Sundays. This effectively allows the user to configure over 2 million combinations of tables, making Table Topics very happy. Go Flash.

    To add new categories, all Jason had to do was do this via the filenames. Since the client was STILL photographing pictures whilst in production, Jason wasn’t getting textures and profile shapes till late in the game. This setup allowed him to work independently, and confidently, without me. This became very important later on when Jason started working at Fantom studios, and had very little time for the project or to interact with me. Freeing him from needing me was a good thing.

    Why No Content Management System?

    Why no CMS? I tried building a GUI front-end to allow the client, Jason, anyone, to drag and drop images onto their respective sections (Large, Medium, and Thumbnail), give them a category name, and export this out to XML. It was taking too long, however, and this time wasn’t in the project budget, whether an offline Win32 app (Flash + Screenweaver), or online using PHP & MySQL. I did use Screenweaver, however, to auto-generate the XML file for the images. Basically, you’d open the app, drag the folder full of updated JPEG’s on it, and it’d read the directory, and auto-generate the XML, and then write it to an XML file in the same directory. Quick and easy for anyone to update the images used in the app without needing to recompile Flash.

    We also had a blast getting the “soft mask” effect, where instead of a cut and dry mask, it has a gradient. This took a ton of phone calls, exact pixel measurements in 3D, Photoshop, and Flash, the drawing API to help see where things really were, and tons of trial and error, but damn did we ever get it, and drank merrily when we did!

    The Famous “Last 10%”
    Naturally, the client started upping the left-fields once they saw what was possible. This, in my eyes, happened because of the long chain of communication, which is totally fine, but being me and always wanting to please everyone, this was hard. For example, the first thing is they wanted to take this “built for the web app” on sales calls via a laptop. Uh, ok, here’s the files, burn to CD. Go Flash, again!

    The second thing was rules… this is where things got reallllly hard. Like, currently, you just have all images fall into their respective types and categories. But, only some frames work with some profiles… some are limited time, some only in specific colors or textures, etc. I tried adding some, but the way it was designed wasn’t meant for rules; it was a dumb system, on purpose, made simplistic for easy updating. I had specifically asked in the very beginning if this was needed, and all of us had heard “no, the client won’t need to update this, nor will they have rules”, but in retrospect it was very unfair to the client.

    First off, if you don’t know what “updatable” means, you can’t really communicate it to the client. Therefore, since I didn’t have the opportunity to actually sit with the client, and explain potential development paths with pros and cons, no one at the time could effectively communicate it anyway.

    Secondly, if you don’t know what’s capable, you can’t really envision building atop that vision. If you don’t know what you can really do on the web, then how can you realistically be asked and held accountable for decisions made? You can’t, that’s unfair, and being setup for failure. What I should of done was cite other sites and application examples to the client so they could understand what I was talking about. If I had done this, I would of felt confident in Jason & Zoom Design’s ability to communicate this without me there.

    Finally, there were some technical challenges for the design studio to implement my application in their web environment. I worked with them via phone, providing most of the needed JavaScript, HTML, and ActionScript to ensure an easy as possible deployment scenario. Another, totally independent, developed separately, Flash website had to launch my app. This ended up being very easily implemented and communicated once I got on the phone with the Flash designer in charge; email didn’t work at all. Go Flash for the third time!

    Future Version

    So, of course, the client wanted a round 2 quote since I refused to implement any additional hard coded rules into the application. Debugging was becoming a nightmare, exponential in time for each new rule implemented, and it wasn’t fair to them, nor me given the current architecture. I had 2 meetings, each 2 months apart with different companies on the possibility of a rewrite. I talked about functionality, debated and discussed feature sets and how they worked, and quoted the whole project and had both quotes initially accepted.

    …however, I was out of time. I was then writing some chapters for the Flash Communication Server Bible, and involved in all kinds of extracurricular projects, offline and on, tech editing books, and was about to start school again.

    Conclusion

    Regardless, that was a fun and successful project. I learned a lot, gained a lot of experience, and most important of all the client was extremely pleased. More proof that RIA’s help businesses’ provide better experiences to their customers online… and off!