Golden Rules for Scripting
- Document your code by adding comments after "!" marks. . You may know the day after you wrote your code, why you wrote it, but you probably do not know it any more some weeks later. And any other developer, who might be in charge of editing/revising your SmartPart, never knows why you wrote this special line of code.
- Use typographic conventions to make you code more readable. Use UPPER case for command, use lower case for variables and comments.
- Structure your code by using subroutines
- Insert carriage returns between sections of your code
- Use 'speaking' names for names variables (but try to keep them short, because you probably will have to write them more than once). Use single letter names only for counters within a loop.