Coding Standards… Why you need them!

Recently, I heard an Applications Development Manager say “Why do we need coding standards? We are doing fine without them.”  I was shocked, surprised and amazed at how something like this could come out of the mouth of a person who managed at least 30 developers.  Then, I thought about it, and realized that was a big reason why his developers had so many issues with their development releases.  It was very sad to see that the “leader” of so many developers felt this way.

So, let me tell you why coding standards are important.  Coding standards are sometimes overlooked but a very critical attribute of software development.  I should note that while they may be sometimes overlooked, to say they are not necessary in a development environment is not smart.

Following a consistent coding standard helps improve the quality of the overall web applications being developed. The key to a good coding standard is consistency. This consistency needs to be found within the standard itself (in other words, you need to make sure that guidelines don’t contradict one another) but also within the source code that uses the standard. Completed source code should reflect a harmonized style, as if a single developer wrote the code in one session.

This usually leads to the argument that “writing sloppy code provides job security”. In a way, this is true. If you are the only one that can understand the code (both structurally and functionally) you will be the only one that can make changes and bug fixes to that code. This is what you want, right? That way, you will never be able to leave that product behind to someone else and advance your career.

The more readable source code is, the easier it is for someone to maintain that code. By following a consistent style, it allows other developers to step in and help with maintenance or new development.

By creating source code that is easier for a developer to understand, it becomes easier to find and correct bugs. It also provides a better view of how that code fits within the larger application and, in some cases, the company as a whole. This clearer view leads to the potential for more code reuse, which can have a dramatic affect on cost and development effort.

There is also a mental factor that comes into play when adopting code standards. This factor is the sense of “code ownership”. Code ownership refers to a feeling of pride about the quality of the work done and a desire to see that code perform as expected. The higher the sense of ownership, the better the quality of the code becomes.

This sense of code ownership increases as the application becomes more stable and the code becomes easier to maintain. The higher the sense of ownership, the better the developer feels about their skills. The better the developer feels about their skills, the better the code becomes.

When a developer feels better about themselves and the job they are able to perform, the quality of their work increases. This ends up creating a developer and development team that has a strong sense of ownership of the code and a strong desire to see that application succeed.

By establishing and following a consistent set of code standards, you can foster this sense of ownership and improve the quality of the code being written.

Advertisements

One comment on “Coding Standards… Why you need them!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s