As developers create increasingly substantial applications with Flex, Adobe's open-source rich-client toolkit, the maintainability and quality of Flex codebases have become important. Just as Adobe engineers have ported JUnit to Flex, the company recently released a Flex port of PMD, the popular Java code inspection tool. Similar to its Java-based model, FlexPMD scans a Flex codebase and produces reports based on Flex code violating some quality rules. Built-in rules check for:
Inefficient code (misuse of dynamic filters, heavy constructors, etc.)
Over-complex code (nested loops, too many conditionals, etc.)
Over-long code (classes, methods, etc.)
Incorrect use of the Flex component lifecycle (commitProperties, etc.)
The rules for FlexPMD are configurable. FlexPMD can be executed from an Ant task, from the command line, and even from the Hudson continuous integration tool.
What are some of worst Flex coding practices you've seen in your experience?