The Importance of Coding Standards

I’ve always had an easy time of spotting how many hands have been in a certain piece of code during its lifetime. You see, there are so many different styles and preferences on how something can or should be done that each developer will do it their own way no matter what. From naming conventions, to code-organization, to business logic location – it doesn’t matter. In a loosely controlled environment, anything goes. It’s always been an issue wherever I’ve worked – with one outstanding exception.

In the military, standards establish specific requirements that a soldier must meet. These standards are usually established due to hard-learned lessons on what the best way to do something is. In certain cases, these standards can actually have a profound impact on the effectiveness of the personnel in question to do their job. Standards allow a team to work together as uniformly and as smoothly as possible. They help maintain discipline when faced with a difficult task, knowing exactly how to approach a specific problem, and they help with integrating new members into any team environment.

Now most development teams are not members of the military, but standards apply in any environment for the same reasons they apply in the Army.

I don’t think it can ever be stressed enough for a development team to be working with a set of well-established coding standards. Coding standards are the fundamental base-line for establishing the quality of code produced by any programmer, and an individual’s adherence to standards shows how much of a team player they are. The problem is that most environments do not have an established set of code standards.

Now I’ve heard before that ANY standards are better from NO standards. And well, I guess that could be right, but wouldn’t just sticking to industry-accepted coding standards be better? Wouldn’t it be easier when training new developers to not have to beat old industry accepted habits out of them? It’s a difficult thing to have to retrain yourself to do something the “wrong” way when you’ve spent years doing it in a way that has logical reasoning behind it. And it really doesn’t matter what I’m talking about, naming conventions, or architecture, logic and reason should be understood by any developer.

Establish a standard people. If you don’t know where to start, start here.