I-Am-Bot Code, technology and life

12Jul/090

Why programming standards are important

Working on a project of considerable size will change one's perception about coding. I happened to work on a tiny PHP/MySQL project with a team of 4 for a relatively short duration of 6 months. Before that, even though I personally followed sound programming conventions for my own convenience, I hadn't a clue as to how important it is in a sizable project. Now that its over, I chanced to read up a little on programming conventions prescribed for various languages/projects here, here and here.

Now before I repeat what many others have already said, let me start off by asserting that "Good coding standards make all the difference". And its isn't restricted to a group of people. Even if you are an individual developer working on something in your free time, following conventions will only make your job easier. You will not need to wonder what a particular function does a couple of years after you originally wrote it. You need not to wonder if the call to a function has the right parameters. Cause once you document them at the time of writing, its a lifelong reference for you, and for others.

This is critical for open source projects in particular. With thousands of contributors, bug testers, end users spread across the globe and with different coding standards/styles, its next to impossible to coordinate and make sense of all the code without a particular standard. This is the reason why most of the projects define their style when they start out, rather than when their project gains momentum.

Another valid reason is generating documentation for your projects. Its impossible to manually type out, arrange and filter every file, class, function or variable. Instead a couple of lines like:

/**
* What the function does
*
* @param <return type> <variable name>
* @param <return type> <variable name>
* @return <return type>
*/
function functionName() {
}
Will serve as a reference to you, as well as facilitate a documentation generator to automatically parse your file, and do the needful.
Coding standards are for every language. Be it C++, PHP, CSS or even HTML, there are certain conventions that when followed will go a long way in readability, clarity and maintainability. And I need not reinforce how important it is to the software world. Its a real pity that we aren't taught all this in Schools/Colleges as this forms a considerable part of how your colleagues, seniors judge you in your place of work.

Posted by Srinath

Tagged as: Leave a comment
Comments (0) Trackbacks (0)

No comments yet.


Leave a comment

(required)

No trackbacks yet.