Friday, August 27, 2010

Code Rating System

I would like to propose a rubric of classifying code with regards to its completeness and maintainability. This system will have two parts, separated by a dot '.', both of which are ratings from 0 to 4, 4 being the best. The first part or the part before the dot rates the objects and methods that perform the work, and the second part, or the part after the dot, will rate the quality of the automated testing. With this scale 0 would indicate that the code exists in some manner, but it is not working, and a 4 would mean that the code is in an optimal state for long term maintenance. So code that rates as 1.1 would mean that the code and its test work, but it is in a poor state for maintenance. While code rated as 4.4 would mean the code and its automated tests are in an optimal state for maintenance.

The elements that this system will rate are:
  • +1 Does the code work as intended.
  • +1 Are sufficient comments and documentation in place.
  • +1 Are sufficient logging statements in place.
  • +1 Are coding standards followed.

This code rating system is intended to be customized by each organization. As an example perhaps there is an organization that has no coding standards and they would just use a a 0 to 3 scale, or perhaps an organization considers on schedule to be important so they add an on-time and an on-budget item and use a 0 to 6 scale.

No comments:

Post a Comment