I think that many of the complaints that people have about the difficulty of learning ActionScript 3 should
be attributed to the learning resources and communities that are out there and not
to the language itself. Many (and in my opinion, the vast majority) of the changes to the language that people stumble over are not required changes, but changes that people promote as being "best practices" or more efficient.
While I'm certainly not against the idea of people promoting their agendas, I think that many people were left behind needlessly due to the lack of resources that successfully made it easy
to transition. By 'needlessly', I mean that I believe that there are easy ways to transition from AS1/AS2 to AS3. Hopefully I'll mention most of them throughout this post.
The language itself seems very similar to JAVA and I would assume C++ to an extent, although I haven't been emersed in those languages as much, I've been more of a scripter.
The way that you phrased this part of your post is kind of funny and sad at the same time. That ActionScript
is being most closely compared to non-scripting languages is the sad/funny part. Of course, you're most certainly not the first person to make that comparison, which is part of the 'problem' that makes ActionScript 3 seem inaccessible to beginners or people that want to transition from an older version. There shouldn't be much doubt that ActionScript is
a scripting language, since the commonly accepted definitions mainly stipulate that the language needs to be controlling some other application (Flash Player).
However, some people are starting to treat these scripts as separate applications themselves, probably mostly because of the term RIA
and perhaps because the Flash Player application runs scripts through a virtual machine, and people tend to call anything that runs directly on a actual machine an application, so there is some unclear territory where the difference between a script and an application is too subjective to be able to make acceptable generalizations about.
So, hopefully you can see how there are at least two ways to view your ActionScript code: either code that is part of a script or code as a part of an application. What I see as the problem with the way ActionScript 3 was introduced is that many people, including the ones who would eventually write many of the resources from which everyone else tried to learn, got the impression that ActionScript was switching entirely away from its scripting roots. Or, perhaps the more accurate story is that these people wanted
ActionScript to switch away from its more relaxed roots.
Why would anyone want ActionScript to make the 'drastic' change that people claim was made with ActionScript3? There are plenty of reasons; most of them are described in senocular's excellent posts in this thread. One of the reasons that he didn't mention is envy
. It ties in with the quote that I selected above from your post. Given what I heard from other developers (note: these are the 'heavy' coders usually), there was always a sort of sad situation where people would say that ActionScript wasn't a 'real' language due to its lack of the sort of features that senocular mentioned: typing, errors, debugging, structure. People seemed to think that they would be taken more seriously if they were using a language that had these features. I'm not joking; I think that this sort of pride issue is and was one of the largest contributors to the perceived difficulty of learning AS3; the language now had
to be hard to learn because people who could master the language could now feel better about themselves relative to developers in other languages, feel entitled to 'better' job titles, and feel like their act of learning AS3 warranted some amount of praise. I don't mean to make the 'developer' point of view sound all negative. There are real benefits to many of these practices that I'm sure we've all heard about. All of this led to the generation of a stigma against the old AS1/AS2 coding practices, regardless of whether or not those practices had legitimate uses.
Note that I'm breaking up the users of ActionScript into two approximate
categories that I think everyone here should be familiar with: the people who are primarily designers and those who are primarily developers. It's even the motto of this site to "mak[e] designers better developers." The two segments also conveniently represent the people who either complain about or praise the changes made in AS3. The developers, as I've explained above, are almost unanimously happy with the changes. The designers, or the people who usually have the least experience with code, or the people who usually only need to code a small amount per project, are the ones who usually complain about the difficulty of learning AS3.
Okay! So who wrote the resources
? What type of person spends all of their time on a community site answering code questions
? The answer for either question is not going to be 'designers!' or 'beginners!' It's going to be the developers in almost all instances. I've already tried to establish that it was primarily the developers who were bitter about the way ActionScript had been perceived as a language and the developers who would gain the most from performance improvements (at least improvements gained by added language features). What could a developer possibly do with all of this bitterness? Or, if the developer was kind-hearted but still performance-minded, what could she do with her desire to enforce efficient practices? Ah-ha, she could compensate for the flaws that she saw in the old ActionScript by focusing on all of the great, new, and different aspects of AS3 when she was writing her best-selling book, and her similarly-minded developer friend could spread his ideals around in the Flash community when answering questions or posting tutorials.
Now, hopefully it's clear that there could be some problems when the experts on AS3 are all advocating for the practices that people find the hardest to learn. I often see people grappling with the subject of custom classes. But wait, does one even need to write a class of their own to do 99% of the tasks that people do in ActionScript? No! (And never mind that you could write your own classes in AS2) The timeline is still as present as ever. Next let's move onto design patterns. Oops, it turns out that you don't need
those either. Casting? Typing? If the concepts are too hard to understand, you can always turn off the strict compilation mode and turn it back on when you understand them. Is it actually such a horrible thing to do to a beginner? Arguably not, since we lived without it for years. If it is so horrible, then casting and typing can't really be used as examples of hard things to learn in AS3, since the alternative is horrible/troublesome.
Unfortunately, the concepts that people find hard to learn in AS3 are the ones that were and are stressed when people are being taught AS3, regardless of the fact that it's possible to have a perfectly legitimate AS3 program that does not include those tough concepts (at least the tough concepts that were not present when learning AS1/AS2, and the difficulty argument is based on the premise that AS1 and AS2 were relatively easy to learn).
The obvious solution to the problem, if you agree with what I've said so far, is to create learning resources that eschew the difficult parts of AS3. Alternatively, the difficult concepts can be included later when the reader is presumed to have a working knowledge of the easier stuff. Similarly, when participating in a community, you can avoid suggesting solutions that involve the more difficult subject matter. Or, you can suggest the way that you feel is the best, and then suggest an easier alternative if the person you're helping can't understand, instead of yelling at them to go figure out custom classes.
As of now, I don't know of any books, tutorials, blogs, etc., that have adopted the 'friendlier' style of AS3 instruction that I've been talking about. If these do exist, then their existence is certainly overshadowed by an abundance of the traditional AS3 learning materials.
As a disclaimer, I should note that when I learned AS3 around the time of Flash Player 8.5 beta (or alpha?), the best resource was probably something like senocular's Tip of the Day thread. I'm not even sure that the AS3LR was out at that point. My first AS3 projects hardly used any of the features that are considered AS3 staples today. Approximately 3 years later, people have had time to write books and tutorials, but I'm actually thankful that I avoided learning from any of them. I can still write
the sort of code that a lot of AS3 experts would prescribe that I write, but I don't do it because that's how I learned it or because it's what I was told to do.
In general, there is a difference in coding styles between users of languages developed primarily for scripts and users of languages developed primarily for application development. Unfortunately for ActionScript, there are at least two types of users that might be considered primary. Certainly the RIA camp would advocate for the application style (the term is misleading, but I'm fairly sure that everyone reading this understands that it's the C# / Java rigid style of coding), but it is certainly debatable
that scripting languages and the scripting style
of programming is preferable in many cases, including cases where an application is being built. Since there is a debate, there are people on both sides. Since ActionScript supports both styles with a fair amount of ease, there are ActionScript users
on both sides, thus the conflict.
have it released out into the wild before people even get a grips on AS3
It's kind of crazy that is has been ~3 years and yet people are still transitioning. I guess it has a bit to do with the fact that people wait a while before switching to new player versions, but the learning curve factors in as well, of course.
well its no longer a standard
At least there's a draft specification that has been distributed… :P
As a very experienced AS1.0 programmer, it took me about 3 months of full time, day in, day out study to get to grips with AS3.0 to the point that I was working as comfortably with it as I had been with AS1.0.
Sorry for the rant (I don't do this often!) just hope someone is listening
So how did you learn AS3? (I'm curious) Did you use some resource or did you teach yourself entirely?
Example of what's not hip is : (a) coding in the timeline, (b) put the library asset directly on the stage, etc.
Hopefully the 'hip' part is explained by the developer envy and performance issues that I mentioned in the earlier part of my post. There are legitimate reasons to do
the un-hip things and legitimate reasons not to like them… but I don't really see a reason to categorically deny either practice.
The other big problem of AS3 for me is that I sense an exclusivity and an elitism. For the sake of standardisation, the language is designed in a way that only people who had good background in programming will understand it immediately. To those who does not understand it, have to start from point zero, and the journey is very very steep.
But who is the coder actually?
Again, I hope that my post addresses this. I really don't think that it's a problem with the language
. The language itself isn't being elitist, nor does it force you to be a programmer any more than AS1 and AS2 did, as long as you are actually taught/told that you can write code in a style very similar to the old style.
I just miss the day where there are a lot of generous, helpfull, and patience Flash Evangelist.
Well, I guess people will inevitably glorify the past, but are there really so few helpful people today? Here at kF, I frequently notice that a former questioner has begun to respond to other posts in a helpful way. It's possible that the ratio of the number of people asking help to the number of people willing to respond has gone down, but that's probably because of a rapid increase in people asking questions, not a decrease in the number of people answering them. Even so, it seems that most of the 'good' questions get answered, and even a lot of the not-so-good questions get answered. TheCanadian described the type of not-so-good question that often gets ignored. There is even a section of the site dedicated to helping people ask good questions, but people still ask questions that make me sigh with disappointing frequency. :sigh:
I live in SF, and am surrounded by "professionals" using AS3, or just programming for that matter
Some Adobe offices are even in SF. :P
Okay, I realize that I didn't talk about AS4 at all in this post, but hopefully my thoughts are still useful to the people who are concerned with how ActionScript has been changing. :)