Tuesday, November 1, 2011

Code Quality Metrics: Identification, Collection and Consumption

Unless we identify the code quality metrics we want to consider for a given project or product, before we start coding,  it is highly probable that we will get confused with a huge collection of metrics presented by tools and textual content such as books, white papers, blogs, etc.

We do capture functional and non-functional requirements in software projects. Can we capture requirements that can help us set a common understanding on expected level of code quality? 

When you use a static analysis tool, it is necessary to know acceptable range of values for each metric. Otherwise, how will you access code quality?

Code review tool does not serve the purpose until developers are cognizant of the semantics of code quality metrics and permissible range of values. I am sure we have heard, ‘A fool with a tool is still a fool.’ Don't you agree?

Every project or product team needs to have a code review checklist, coding standards and guidelines that can set a common understanding among developers on code review criteria. This will enable developers write good quality code to begin with.

Prevention is better than cure. Isn’t it?

No comments: