Sunday, 9 November 2008

Actionscript bad habits


Hereby a list of things I find daily in my job:

- Malicious code: Code in lots of items such as buttons, movieclips, etc. It takes a long time to see all the code. It should be nested in classes or just in some frames as much, but I find files with code in more than 50 places.

- Using variables instead of arrays. They usually use "Eval" instead of "for in". Using a lot of boolean variables.

- Bad terminology: Something like this: mc_car instead of car_mc. Same for buttons.

- Thousands of movieclips and items in the library instead of using dinamyc creation of them.

- Library Caos: It is not so difficult to make folders: img/sound/mc/buttons

- Excesive use of timeline instead of code. One frame is enough, a bit more depending on your preload (if it´s AS2)

- No version control. So you find files names like: car_definitive.fla, car_definitive2.fla, etc.

- Magic numbers instead of using constants or stage proportions

- Code not tabbed.

- Unnecessary spaces in the code.

- Nule documentation or no comments at all.
Post a Comment