I swear that there are some days where computer programming is like dealing with women! For the past few weeks, I have been programming some Flash stuff for Webkinz and today, I have found the 5 similarities between Flash’s compiler and women all realized in one morning. Don’t believe me? Here they are:
1) You are always forced to take out your own garbage and there’s no arguing this! If I create an empty MovieClip on the stage and tie it to an object’s property, that MovieClip will never get garbage collected even if I remove it from the stage, unless I declare the referencing property to be null, even though the MovieClip is contains null values. It, however, is considered a referenced object, meaning that it is in use, even though it isn’t in use. There’s no reasoning with the compiler. If you don’t take out your own garbage, it will simply pile up, causing other problems! The MovieClip once removed is garbage. Yet, I have to deference it in order for the garbage collector to take it.
2) It speaks to other programs in their own language! They only read back our own programming to us. Heck, even decompiling a Flash SWF doesn’t read the same way it was written. It twists everything we’ve told it to do.
3) You can do something for years and all of a sudden today, it is wrong! This was a classic encounter for me today. I was working with the Bindings class in Flash and since designing this application, it was working like a charm… until today. The basic premise of Bindings was that I can change a value somewhere in the program and this change is automatically reflected somewhere else in the application. Well, guess what… today they’re not communicating. Even worse, it’s telling me there’s an error in the Bindings class this, which is owned by Adobe.
4) You ask what the problem is and it comes back saying, “NOTHING!” I went to look at the offending line in the Bindings class and the syntax of the line was perfectly fine. I could see no problem with the code. Go figure!!
and last but by no means least…
5) Skip a period, and it goes bonkers!!! I managed to get some really weird and unpredictable behaviour from my application, almost bringing down my test version of the site. And the problem: a period was missing from the object and because dynamic classes within Flash will not throw an error if a compile time variable is non-existant, it simply treats it as a new variable assigning the data to it. Meanwhile, the real variable is not getting what it needs and is feeling unpredictable values into the system. The system itself, went bonkers!
There you have it! Now, if you’ll excuse me, I have to talk with a another programmer, whom I’m glad doesn’t subscribe to my blogs… guess what gender she is!