Home | Contact Us | Glossary | Site Map | Search | Log In

Quality Assurance Coding Standards

Software Coding Standards are important to produce a common 'style' throughout a project. This has many obvious benefits, especially for maintenance and code reuse. but for software quality assurance is vital because it reminds programmers to keep to coding policies and enables static testingCarried out by examination of code and checking the code for errors prior to actually running the code. Static testing should be carried out as a formal exercise and is facilitated by having coding standards against which the code can be tested. to be effective. The only downside to coding standards are the egos of some programmers, however true programming creativity and elegance lies in the level above coding standards so egos should not be permitted to stand in the way of sound engineering.

Software coding standards must be related to both the programming language and the type of application. At the start of a software project available software coding standards should be reviewed and a suitable standard for the project adopted or developed. Of course in most cases the 'house' coding standards will be suitable but standards should never be followed (or rejected) blindly.

Software coding standards are usually divided into 'Rules' and 'Guidelines', however to help effective static testing 'Guidelines' should be treated as neo-Rules. Some typical classes of rules and guidelines are given in the following tables.

Rules (typical categories)
File comments (copyright notice, file contents)
Naming convention (related to type of programming element)
How code should be commented (extent and location e.g. pre & post conditions)
How programming elements should deal with error conditions
Whether defensive programming or aggressive error trapping should be used for entry and exit conditions
Guidelines (typical categories)
Source code file naming convention (e.g. package and file)
Specific documentation for methods and functions – parameters, return values, exceptions)
Inclusion of self test facilities in modules;
Rules for parentheses, location and use;
Use of constants
Use of new lines and tabs and indent length
Naming of classes (nouns) and methods (verbs)

For specific languages and applications areas these categories will expand to form a substantial guide. This will not stifle creativity but help remind programmers to consider all aspects of required programme behaviour, which is the basis of quality assurance.


Optimal Solutions welcomes enquiries on Software Quality Assurance, and would be pleased to provide consultancy tailored to your requirements. You can get in touch by sending a message from our Contact Us page, or by calling us on the number below.

Copyright © Optimal Solutions 4U Limited 2007
Tel: 0845 643 9512