Code Standards: An Overlooked Need
Do you have code standards for your software development teams? Most companies don’t. They go to great lengths to produce all kinds of document templates yet coders are allowed to do whatever they please. Odd.
The reason document templates are widely used is simply to promote standardization. For example, when you pick up a project vision statement written by someone in Company X you know what to expect. There are standard sections and a common approach to laying out the project goals, costs, etc.
If a standard template didn’t exist, those vision statements would be all over the lot. You’d might have trouble finding the information you want. Even worse, comparing two or more projects would be much more difficult.
Of course, we can’t produce a common set of templates for all the code a development team will write. It’s just not practical. Yet, there are simple guidelines that can make code more readable and less costly to support.
Start out slowly. Keep the guidelines minimalist. You want consistency in the code. Seek consensus on the team and don’t be too picky. I’ve seen teams argue about tabs versus spaces. Those details are not important. The code must be maintainable by anyone on the team. That is the number one goal.
When establishing guidelines, here are some things to consider:
- File naming, layouts and directory structures
- Build conventions and make files
- Declarations and initializations
- Variable naming conventions
- Internal error handling and assert usage
- Error reporting and logging
- Event processing, logging and audit trails
- UI conventions
- Comments
- Language-specific guidelines
You don’t need to cover all these areas. Decide what’s important to your team (and your business). Obtain consensus and put a process in place to spot check compliance. In the long run, everyone will be better off.
1 Comment
Leave a comment
Intro
Recent Posts
Categories
Archives
- June 2013 (8)
- May 2013 (13)
- April 2013 (13)
- March 2013 (13)
- February 2013 (12)
- January 2013 (12)
- December 2012 (7)
- November 2012 (11)
- October 2012 (12)
- September 2012 (8)
- August 2012 (11)
- July 2012 (13)
- June 2012 (12)
- May 2012 (13)
- April 2012 (13)
- March 2012 (13)
- February 2012 (12)
- January 2012 (13)
- December 2011 (12)
- November 2011 (12)
- October 2011 (13)
- September 2011 (14)
- August 2011 (18)
- July 2011 (13)
- June 2011 (18)
- May 2011 (19)
- April 2011 (16)
- March 2011 (21)
- February 2011 (20)
- January 2011 (22)
- December 2010 (21)
- November 2010 (16)
- July 2010 (2)






Hi Vin, great post.
I absolutely agree with keeping the instruction slim. I love cheat sheets with a summary of the most important stuff which devs can laminate and put on their desk.
I’m running the ALM Community in Melbourne and have put together this collection of coding guidelines. I thought you might be interested:
http://www.instantalm.org/Live/doku.php?id=job_aid:ja000001
Because we’re with about 100 people working on IT Best practices, they get updated on a regular basis.
Use them as you see fit!
Stephan