Best PracticesKeeping Your Code Organized with Comments


Before writing any code for a big project, I usually start out with pen and paper and sketch out the code requirements of the project. This "sketch" usually consists of diagrams, equations, and an outline of what functions will be needed. At this point, my functions have names that describe what they do. For example, if a function will be getting images, I'll name it getImages.

When I finally open Flash, I start by creating an outline of the code with comments. This helps to give an organized structure to the code, much like the headings in a book chapter. As I fill in the outline with code, I continue to comment as I go. This helps me quickly understand what the code is supposed to do, both as I work and when I come back to it later.



Special Edition Using Macromedia Studio 8
Special Edition Using Macromedia Studio 8
ISBN: 0789733854
EAN: 2147483647
Year: 2003
Pages: 337

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net