Tuesday, December 20, 2005

A day in the life of a Flash-developer

My collegue and I are convinced that Flash 8 (and previous versions) contains severe bugs that delay our work quite significantly. Today for example, I had updated the class Task by adding a method called setState(newState:Number). The method was called from elsewhere in the application. I sent my collegue (Nils Magnus) the updated files, but he kept getting an error message saying that setState-method does not exist. The following is an abbreviated version of the subsequent conversation we had on msn:

Nils Magnus @ Bergen sier:
nope. Still error.

Laila sier:
huh??

Nils Magnus @ Bergen sier:
yep. I even restarted Flash this time

Laila sier:
but... open Task.as. Do you see the method setState there?

Nils Magnus @ Bergen sier:
yes

Laila sier:
well, that's the one...

Nils Magnus @ Bergen sier:
yes...

Laila sier:
It's got to be Flash that's messing up...

Nils Magnus @ Bergen sier:
I dunno...

Laila sier:
The method's there. And the error message says it's not. And I don't get the error.

Nils Magnus @ Bergen sier:
But is it being included? Task.as?

Laila sier:
But it's a class. Shouldn't have to be included if it's on the classpath.

Nils Magnus @ Bergen sier:
true. I don't understand a thing...

Nils Magnus @ Bergen sier:
are you sure you don't keep it under "classes" in docs and settings at your place?

Laila sier:
but if it can't find the class, you should get a million errors. But no, I didn't put it there. It's all in the same folder.

Laila sier:
what if you remove the line that calls setState and see if it compiles.

Nils Magnus @ Bergen sier:
k

Nils Magnus @ Bergen sier:
yep, compiles now

Laila sier:
try to call setState from Task's constructor... To make it realise that the method is there somehow...

Nils Magnus @ Bergen sier:
ok

Nils Magnus @ Bergen sier:
no error message now, when I called it from the constructor

Laila sier:
try to add the code in the original place again.. maybe it has cleared out its cache or something now...

Nils Magnus @ Bergen sier:
ok

Nils Magnus @ Bergen sier:
flash #%¤#%"

Laila sier:
it sucks

Nils Magnus @ Bergen sier:
we should create a hate-list and send it to Macromedia

Laila sier:
and demand they pay us for lost work time

Nils Magnus @ Bergen sier:
and blog it.

Laila sier:
yea.

Nils Magnus @ Bergen sier:
guess what.

Laila sier:
still not working...?

Nils Magnus @ Bergen sier:
nope, now it works.

Nils Magnus @ Bergen sier:
!"¤#"!!"#

Nils Magnus @ Bergen sier:
(inappropriate expression)

Laila sier:
jesus. It's like we need to trick Flash into actually *reading* the code.

Nils Magnus @ Bergen sier:
I can't believe it!! I even restarted Flash!

Laila sier:
pathetic.


And guess what, it's not the first time we've had this kind of experience. I've commented out, cut away, deleted code, and witnessed how it's still being compiled and run. This causes predominantly two kinds of problems:
  1. Like the above conversation reveals, we believe Flash might have a point, and start looking for the error, thus spending time looking for an error that's not there.
  2. When our code is in fact buggy, we (at least I) tend to blame Flash, and keep restarting apps and computers and try to trick Flash like in the above conversation, in the hope that the error will go away. Obviously it doesn't, and time has again been wasted.

4 Comments:

At 4:18 pm, Anonymous John Bachir said...

I used to be primarily an ActionScript developer and it is hands down the most frustrating and mind-bogglingly poorly maintained product in the world.

And it's a shame too because the Flash platform has such potential. It's remarkable what it's capable of really... a solid animation platform with a Real Programming Language in the back. I guess that's what happens when there a platform has no competitors.

 
At 11:56 am, Blogger laila said...

I completely agree. Flash is amazing, and would be absolutely extraordinary if it weren't so extremely inefficient from the developer's perspective.

Some competition certainly wouldn't do any harm...

 
At 7:58 pm, Anonymous Neil said...

Laila--

Under the Control menu is an item "Delete ASO files." This will probably fix almost all the problems you're experiencing. Flash stores precompiled versions of your external classes, and when you work on an external server--or exchange files as you and your colleague did--it does NOT update them properly. (It has something to do with a time flag's not being set correctly.) This is widely discussed in Flash forums--a known issue.

 
At 8:12 pm, Blogger laila said...

Thanks for the advice Neil, I'll try that next time we're having this kind of problem (which probably won't be long). I must say it's not really a self-explaining feature though - for those of us who don't know that ASO files need to be deleted. ;)

 

Post a Comment

Links to this post:

Create a Link

<< Home

En blogg kan være et godt verktøy for en som i litt for stor grad glemmer de små og store tingene som utgjør livet. Dette er min reserve- hukommelse.