Home  /  Computers



  Print this article
  Email to friend
10 Programming Tips
Author:

(1) Avoid using the same variable again and again for different purposes.

This happens with us that we think that more and more memory will be wasted if we declare seperate variable for each purpose. But, if any debugging is about to be done and program is quite a typical. Then, debugger will

get confused and Dry-Run will also not work in such a scenario. So, if your program is small then, you can use the same variable. But, if it is complex, then do not use the same cheap practive.

(2) Use capital letter to variable name for global variables.

You should use capital letters because, there should be distinguishable difference between a local variable and global variable. There should not be any confusion while dry run or debugging.

(3) All the variables should be declared at one place.

This helps the programmer to analyze whether some variable is yet declared or not. If we declare them at different locations, then, a proper manner can not be acheived in your programming. The variables should normally defined just below the function declaration.

(4) There should be proper indenting in whole program.

Indenting helps you understand the program and the logic behind the statements well. This is cheap practice to write the functions, iterations and conditional statements without indenting. It looks like a junk also. There should be a proper demarkation in your mind and the same concept should be followed in all the portions of your program.

(5) Commenting.

Commenting is very much important. Although, there is no relation of them from your logic and programming. But, once you debug your program or new amendments are done, it becomes tedious to understand the logic behind that

   ( Next Page )


Rate this article:  (No ratings yet)

 Saving ...

RECENT ARTICLES FROM COMPUTERS CATEGORY
How to Increase the Chances a Prospect Contacts You by 50% (Author: Dana Williams)

Do You Really Need a Toll-Free Number for Your Business? The answer is YES! If you run a home business, whether it's a direct sales business, a part-time venture, or if you work full-time from home, ...


Computer Upgrades: The Most Important Question (Author: Michael Quarles)

Of all the concerns you may have about your computer, there is one that overrides all of them. Can it do the jobs you need it to do?If your main needs are a machine for balancing your checkbook, ...


Business Accounting: 7 Steps To The Best Software Solution (Author: Javier Fuller)

It is important to know in business where money is coming in and where it is going out. As such, accounting is one of the most vital processes in any business. It is even more important than developing ...


What Is A Fuse? And How To Test It. (Author: Jestine Yong)

A fuse is a very thin wire, which either melts or vaporizes when too much current flows through it. The thin wire may be made of aluminum, tin-coated copper or nickel. The resulting open in the circuit ...


Hard Disk Failure and Data Recovery (Author: Bharat Bista)

Hard Disk: An Introduction Hard disk is a non-volatile data storage device that stores electronic data on a magnetic surface layered onto hard disk platters. Word Hard is use to differentiate ...


SEARCH
Search for:


In:


NEWSLETTER
E-mail address:


Name:


Copyright ©2007 HyperArticles.com. All Rights Reserved. - Privacy Policy - Disclaimer