Then fewer comments are needed since you must only comment the non-obvious. Maintain consistent indentation. Naming conventions Names of variables, constants and functions must clearly indicate the function and type of the named object. Variables and functions belonging to a functionally related group should have a common prefix in their names. The names must be self-explanatory not only for you but also for others reading your code.
Global variables Try to avoid global variables, other than constants.
Here are some ways to decrease their number. Use an extra parameter in the function call. Use static local variables in C or modules in Perl. Use static global variables in C. Group related variables into a structure.