Click here to Skip to main content
13,046,474 members (71,141 online)
Click here to Skip to main content
Add your own
alternative version

Tagged as


1 bookmarked
Posted 2 Feb 2013

Coding Standards Are Overrated

, 2 Feb 2013
Rate this:
Please Sign up or sign in to vote.
Code reviews help developers focus on larger concerns such as architectural issues and provide a forum to offer other coding suggestions. Performing intermittent code reviews covers the key aspects of coding standards while avoiding most of their pitfalls.
As a development team grows, so does its complexity. This complexity manifests itself in many areas including team member interactions, increased project administration, and evolving communication strategies. At some point in every team the question of coding standards is broached. Unfortunately, most teams agree to compile coding standards under the false pretenses of only their positive attributes. It's important to consider the unintended ramifications before introducing a new process. Start by defining what are "coding standards?" They are commonly a series of guidelines which include recommended programming style, practices, and other various aspects of developing. The most common benefits outlined are:
  • Coding standards encourage good coding habits.
  • Coding standards help prevent bugs in known problem areas such as memory issues.
  • Standards can be a helpful guide to junior developers.
  • Standardized coding makes more maintainable code.
  • Code is more legible through standardized formatting and comments.
All of the items mentioned above are excellent reasons to implement coding standards; unfortunately, in most circumstances the unrecognized pitfalls outweigh the benefits. The following section outlines these areas:
  • Some team members equate coding standards to a lack of confidence in his/her abilities. Others find standards such as spacing and/or comments to be micro-managing.
  • Coding standards stifle and discourage coding creativity. Some of the best code comes from an unfiltered mind.
  • They create unneeded stress within a team as members disagree with various standards. These discussions can spiral into negative, unproductive debates.
  • Each new rule adds to the overall complexity of implementation, enforcement, and maintenance of coding standards.
  • Each concession to a rule devalues the overall purpose of coding standards.
  • Coding standards distract from the larger goal of building, testing, and releasing functionality in a timely manner.
  • Deciding how to handle existing code that pre-dates the creation of a standard is a winless battle.
  • When a coding standard is not followed, what happens to that code? Must it be fixed immediately? How does that effect its testing, retesting, or release time lines? Some consider this code to be technical debt. That is a difficult label to apply to code if the violations are simply style related.
  • Proper enforcement of coding standards can consume an unreasonable amount of time.
  • The decision to enforce coding standards and its consequences must be embraced at all levels within a company. Most companies struggle to embrace doing something twice.
If coding standards are not the preferred approach, what is? Code reviews are an excellent replacement for coding standards. They can be completed at the preferred speed of each team. They are a positive teaching and discussion tool. As described in "Code Reviews: Understanding and Breaking the Stigma", they can be a great team building exercise by having different members participate. Speaking with another developer about coding has a human touch that a coding standards document lacks. Code reviews help developers focus on larger concerns such as architectural issues and provide a forum to offer other coding suggestions. Performing intermittent code reviews covers the key aspects of coding standards while avoiding most of their pitfalls.


This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)


About the Author

You may also be interested in...


Comments and Discussions

QuestionMy vote of 4 Pin
mac_v2-Feb-13 12:46
membermac_v2-Feb-13 12:46 
GeneralMy vote of 1 Pin
KinStephen2-Feb-13 11:26
memberKinStephen2-Feb-13 11:26 
You suggest code reviews instead of coding standards as though it's one or the other. Both coding standards and code reviews can and should co-exist together.

Also to clarify you don't have a problem with this?

bool x = false;
// Lots of code in between.
if (x)

This is what coding standards are supposed to prevent. Code reviews would enforce these coding standards.

P.S. The coding standards cons you outline seem of your own personal opinion and not based on any real polling or metrics from the industry.

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.

Permalink | Advertise | Privacy | Terms of Use | Mobile
Web01 | 2.8.170713.1 | Last Updated 2 Feb 2013
Article Copyright 2013 by Zac Gery
Everything else Copyright © CodeProject, 1999-2017
Layout: fixed | fluid