Avoiding Bugs


Avoiding Bugs

Careful design and planning of the application is important and will help reduce bugs. Often it is best to break down the application into smaller component parts that are easier to code and test. It is easier to think of a small portion of code than to try and tackle an entire project in one thought. Make sure you document and comment your code using the single quote (') character. The comments will turn green within your code. If the application is complicated, it is often difficult to go back even after just a few days to determine what the code is doing. Even professional programmers find if they go back to code they wrote a few months ago, they have difficulty understanding what the code was doing. Comments may provide the help needed. Also, if a programmer leaves an organization, it can be difficult for a new or different programmer to pick up where the former employee left off without any documentation about the intent of the code.

It is important to know what all your variables represent and what each function does. Once your application starts growing and begins to get complicated, its documentation becomes more important. Without such documentation, you will need a good memory to keep track of what every variable means!




Excel VBA Macro Programming
Excel VBA Macro Programming
ISBN: 0072231440
EAN: 2147483647
Year: 2004
Pages: 141

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