This blog has been moved to http://blog.wasimsingh.com/
This blog has been moved
June 8, 2009 by wasimsinghAIR publish error: AIR file is damaged?
May 19, 2009 by wasimsinghI built “update” functionality in my AIR project from the start. It always worked with no hiccups until today, 1 week before public release. The following error came up when the app tried to update itself:
Error: The application could not be installed because the AIR file is damaged. Try obtaining a new AIR file from the publisher.
After a little trial and error, I found that my icon paths in my publish settings were too long. When i changed my path to a location closer to the root (“C:/work/icons” in my case) it updated flawlessly. I suspect the same problem if the certificate path is too long but haven’t tested that theory.
Here’s a link to other reasons why it might not work: http://bugs.adobe.com/jira/browse/FB-10582
Flash’s temp.as
May 14, 2009 by wasimsinghI came across the temp.as error while refactoring some messy code. I had deleted a few unnecessary files and tried to publish.
The problem was that the fla still had references to those classes I had removed.
I had stray imports as well.
So where does temp.as come from? My guess is that it has something to do with Flash creating classes for each library item with a linkage class behind the scenes when the fla is published.
Make sure that Base class references exist too.
A helpful message and a glimpse into the inner workings of Flash
Quick tip: Photoshop batch rename
May 14, 2009 by wasimsinghCreate and save an empty action
Then use the batch processor’s file naming capabilities to rename your files accordingly.
File > Automate > Batch

Photoshop Batch
The Serial naming and date naming options are nice features to have too.
Unless you’re an automator (must know if you work on a mac) or cmd prompt kinda person.
Best Programming Advice Ever
January 20, 2009 by wasimsinghI was rummaging through forum posts over at The Code Project and found a gem I absolutely had to share:
http://www.myconfinedspace.com/watermark.php?src=wp-content/uploads/2007/06/001grg3w.jpg
Ohh, what’s really going to bake your noodle later on is, would they be maniac serial killers if you hadn’t coded in the first place?
The Professional Software Developer
November 21, 2008 by wasimsinghI recently received an email from T. S. who complied this list aimed to help his team become Professional Software Developers. It is a compilation from various sources and he certainly does not feel that it’s his.
The Professional Software Developer Pledge
1. I am a professional software developer.
2. I will take user requirements seriously and be passionate about customer service.
3. I will not show disdain for the customer who does not understand what I do and will always attempt to cross the bridge from the technical world to the user’s world.
4. I understand that every member of the IT staff is important to achieving my goals.
5. I will take pride in the code that I write.
6. I understand that my field is constantly growing and changing and I will explore new concepts and be open to new ideas.
7. I will take pains to improve my knowledge and skills.
8. I understand that even though I am the first to write this code, I will not be the last to maintain it.
9. I will strive to keep my code readable and have as little complexity as possible.
Forget Gen Ed, Presentations classes and random electives. Teach Programming Ethics instead! Granted, that not all of the aforementioned qualities are specific to programmers, they still apply to us on some level and thus worth contemplating. We still have duties toward ourselves and the people we work with even after all the excitement of learning new things have faded.
Agency Antipattern – What’s in your wallet? Actionscript tools!
November 16, 2008 by wasimsinghWIth the advent of Actionscript 3.0, Flash has taken yet another massive leap in its evolution. Even though it is still lacking a few things here and there, it undeniably bears a stronger resemblance to more “solid” OOP languages (the most compared-to being Java). Logically, it would follow that, the development standards, tools and processes associated with Java would quickly find its way in the Actionscript coder’s app-building environment. Although such tools are available, I regularly come across fellow Flash developers and companies (of all sizes) who do not implement version control, issue tracking, production tools, unit testing and other items which are not specifically geared toward making AS3 code but toward assisting the general process, standards, quality and flow.
AS3.0 has been around for roughly two and a half years (as at the date of this writing) There is a wide variety of tools to choose from that have proven their worth. We have no excuse.
I’ll just mention a few below.
Version Control
An absolute necessity for me. These tools help to easily revert to a previous version of a file whether the client requested it, or we screwed up the most recent version. It acts as a backup system and allows you to play on your local system without the worry of stepping on toes. It improves our communication an interaction with other developers by preventing overwrites and providing details on changes among other things.
A few version control options:
Subversion (SVN). If you’re more of a visual person, Tortoise SVN provides a visual interface to execute SVN commands and it integrates well with windows explorer.
CVS
GIT Warning: GIT isn’t as pretty as the other options. n00bs beware.
Read more about version control systems.
Bug Tracking Systems
An absolute necessity for any team who’s aim is to provide high quality products that meticulously follow specifications as detailed by the client or creative leads (or the slew of random account managers and designers who somehow end up giving us direction and requirements). A bug tracking system helps tracks errors, bugs, new and changed requirements and typically provides a framework for managing the quality control process with attention to accountability (assigning responsibilities to a team/individual) and good ol’ record keeping.
Bugzilla
JIRA
TRAC
Read more about bug-tracking systems
Also, check out mantis. The above article does not mention it.
IDE
Your choice of IDE can have tremendous effects on your productivity. Features such as code completion, live error highlighting, debugging, documentation tools, and auto-formatting make coding a pleasurable experience. It’s like comparing Notepad to Dreamweaver, for the web devs among us, and If you’ve used the .NET IDE, you already know what I’m talking about. I won’t go into all the potential benefits here but check out the following options.
Eclipse I recommend the FDT plugin but other plugins are available.
Flash Develop
SEPY
Debugging and Logging
No more trace statements!
Xray is easy to get up and running and has an interface that makes it easy to navigate through your swf variables.
Xray
Unit Testing
If you want testers to stop coming back to you because the change you made yesterday broke code you made 2 weeks ago, start unit testing. Do it now… or else the bunny dies. This isn’t a big factor in smaller projects but really helps in large ones.
The whole idea behind testing is as follows:
- Develop tests for success and develop tests for failure for each requirement that your code must include.
- Make sure all tests work as intended.
- Move on to the next requirement.
- Repeat the process.
As long as you run previous tests after code is changed due to refactoring or new additions to application functionality, you will catch regressions instantly. This process of developing your tests before actually coding also helps clear up any inconsistencies between functional specs and what the code actually does. Here is a good quickstart guide on unit testing.
ASUnit A simple framework for creating automated units
FlexUnit Ditto, for Flex
Production and build tools
Sometimes, publishing a file is enough for a functioning app; sometimes not.
Let’s take, for example, an LMS system with thousands of files and folders, whose production folder structure is different from its deploy folder structure.
- Version control would need to be updated as designers may have changed assets.
- Files would need to be copied into different locations, maybe zipped as per LMS standards.
- Text and XML files may need to be edited
- The full package would need to be FTP’d to a deployment server and
- QA may need a reminder that a new build is has been deployed.
Well, no way am I doing that manually and there are tons of scripting languages out there that can be used to automate such tasks.
In the case described above, I used PHP and/or the command line to automate each of the steps above. I also created an html interface, so that I can execute my script at the click of a button AND later provide a full fledged html driven admin tool for other automated functions (such as preparing new folders for production and executing JSFL commands (See below for more on JSFL).
The result: Deployment became a standard process, scores of hours were saved and hundreds more would be saved in the future. I didn’t have to lose valuable days on tasks unrelated to code, development hours spent on the project magically declined and most importantly, anyone could create a deploy package without bugging me!
There is more to Flash app development than just Flash. The idea is to start thinking about ways to solve problems by using and integrating various tools and the more you know, the more solutions are possible. This is one advantage a “Hack of all trades” has over a specialist… but that’s another story.
PHP (or other scripting languages) and the command-line (Don’t judge me PHP guys, It’s locked down)
Ant and MTASC and the command line.
JSFL
Create, augment and automate Flash’s functionality with JSFL. JSFL uses javascript syntax that looks alot like actionscript so the learning curve isn’t too steep. You can create new drawing tools, panels, and automated scripts to get tasks done faster.
See the JSFL reference on Adobe livedocs
A few apps, tutorials and discussions on JSFL:
http://www.devx.com/webdev/Article/20821
http://www.actionscript.org/forums/archive/index.php3/f-37.html
http://tush.wordpress.com/2006/03/16/batch-publish-command-for-flash/
http://www.ultrashock.com/forums/actionscript/jsfl-organizing-library-items-114650.html
http://www.adobe.com/devnet/flash/articles/invisible_button.html
Stay tuned for some jsfl samples.
Documentation tools
Documentation and commenting standards seems to be anything but standard.
Most IDEs provide support for documentation generation similar to Javadoc for Java. That means that we can create full API/class documentation at the click of a button by just following a few simple rules and conventions when we actually create and document our classes.
A look at these documentation standards should get you on your way to great documentation.
Tool hungry?
Head on over to OSFlash. THE premier location for Flash and ActionsScript tools.
Summing up
I initially started this post with the intention of discussing the lack of understanding, respect, proccess and general order that seems to plague the agency environment but it somehow turned into a discussion about tools and apps which improve our own proccess, as programmers. I guess if we want the place we work to be well organized, forward thinking and professional, we, ourselves must begin with a well organized, forward thinking, professional development department. Don’t look at me… Ghandi said it.
Who is a Senior Flash Programmer?
November 10, 2008 by wasimsinghI was recently asked the question: “Are you a Senior Programmer?” and I had to think about it for a while. I’ve been working with Actionscript for a few years, I am currently exploring design patterns, I’ve written a couple small tutorials and I’ve dabbled in a few other languages including JSFL. But I still wasn’t sure if I could call myself a “Senior Programmer”. There was an air of arrogance about it, or maybe that was confidence. Either way, I didn’t think that I was the right person to provide a truly objective opinion on myself.
After many awkward moments during random interviews with fellow devs, I realized that, in my small sample, the criteria that Flash programmers used as their definition of “Senior” varied as much as the requirements found in job posts. A simple Google search for “senior flash developer responsibilities” yields a plethora of mismatched titles and responsibilities, and more inconsistencies than Flash MX timeline tweening. Could this mean that our definition of our own competence is subjectively affected by our past career experiences? and surely, our own opinion of our own abilities is not the best gauge of our true ability. Is this one of the reasons why this industry is plagued by gross quality control issues? I can’t even begin to answer those questions, so I’ll just address objective qualifications.
In my search for objectivity, I recounted tests I took at various agencies, Adobe’s own Certification Exam, a Programmer Competency Matrix and discussions with various teachers.
HR Agency tests
Agency tests were timed. I had to answer a set number of questions (mix of practical and multiple choice) in a set time. Object Oriented concepts rarely came up and I was tested on Flash MX and Flash 8, even though CS3 had already been around for a while. The exams seemed trivial but the practical exams were tight. The purpose of the test was clearly to test your ability to get things to work in a short period of time. The one glimmer of hope was that one specific agency suggested I try a Java test.
Adobe Certification Exam
I do not have a certificate from Adobe. However, after reviewing sample test questions and the test outline found in Adobe’s own Certification Exam , I can safely say that I can become Adobe Certified without great effort. *Remind self to register for certification here …maybe. The certification exam goesinto actual programming concepts a bit more than the HR Agency exams but still looked superficial as criteria for the role of “Senior Flash Developer”
My Adobe qualification would say that I have a comprehensive knowledge of various aspects of Flash and I know my way around their IDE.
Programmer Competency Matrix
To say the least, I was humbled by this grid. Its detailed programming roles and levels really put things into perspective for me.
It was a great resource in helping define roles but it was missing 2 major categories: Development methodology/philosophy and Project Management; Two critical aspects of Senior programming life. A remote allusion to those categories is probably the reference to the Pragmatic Programmer but that’s not enough. My best find so far, though.
I occassionally reference the grid as a learning path for myself as a programmer.
Consensus
Roles are relative and always changing. A few years ago, a Flash dev with only procedural programming knowledge could have been considered “Senior”. Nowadays, that’s near impossible. (scary it’s not completely impossible, eh?) By that logic, the definition of a Senior Flash developer is someone whose colleagues (or the community) continuously consider him/her to be so. It seems like a non-answer yet it may be the most accurate one.
How would you define a “Senior Flash Programmer”? or more generically, a “Senior Developer”?