A programmer's tale

Tuesday, May 16, 2006

Every project should have good coding convention

As a programmer the most annoying problem I've ever faced is the lacking of good coding convention of the projects. I thing every project should have some good coding convention. This convention should be followed by every member of that particular project. Trere are so many advantages of having this. I'll be that point soon, but the first thing first. What do we mean by good coding convention? A coding convention defines and describe some set of rules and coding template for a particular project. Say, how do you declare the global variables in your class. For example:
int globalVar;
int _globalVar;
int m_globalVar;

These are the various way of declaring variables, but your project should follow just one convention not mix of any two or more. This is just an example for variable declaration, but your project should have some template for wring class, interface etc.
Most of the time this kind of standard follow some industry standard proposed by different leading vendor like Sun, Microsoft.
This conding standard should be fixed before starting the coding phase of the project and by the project manager.
The main advantage of having such thing is that integration of different code becomes easier. Moreover the reading and using of code becomes convinient for different people working at that project.

0 Comments:

Post a Comment

<< Home