Software Engineering

The What, How, and Why of Software Quality: The How

  • Software
  • Software Engineering
  • Software Evolution
  • Software Quality



In the first part of this three-part series, we discussed what quality is, the concept of software internal quality, and the CK metrics as indicators of software internal quality.

In this second part, I will discuss the concept of how. That is, how do we measure the internal quality of software? In this article, I will present my top three tools of preference for measuring the internal quality of software as well as the things I like and dislike about each one.

Recall that the CK metrics serve as indicators for the internal quality of software. However, it is essential to keep in mind that no single metric is perfect. We should always take into account the context of a software whenever we are analyzing its quality.

My Tool Tools of Choice (No particular order)

1. Analizo (Open-Source)

Analizo is an open-source tool that resulted from a study by Terceiro et al. [1]. Some of the metrics Analizo calculates include the six CK metrics, number of methods, total lines of codes, average cyclomatic complexity, number of public methods, number of public attributes, and more. Besides calculating those metrics, it can also generate dependency graphs. This feature is useful for analyzing dependencies between components of the system. Another interesting feature is that it can analyze a batch of projects. This is an excellent feature for quickly and easily automating how a project evolved over time.

What I like

  • It is free
  • The community behind Analizo is extensive. They continuously make new releases.
  • Good technical support from the community.
  • It is one of the few systems that generate the CK metrics.
  • Good for automation.
  • The installation and usage are via the command line.

What I dislike

  • It only works for source code written in C, C++, and Java.
  • At times it fails to analyze the given system.

2. Source Monitor (Free)

Campwood Software is the company behind this tool. Just like Analizo, it generates an extensive set of metrics at the project level, class level, and method level. Total lines of code, cyclomatic complexity, the total number of files, the percentage of comments, statements per method, calls per method, average block depth are some of the metrics this tool generates.

What I like

  • Very easy to install and use.
  • Fast at generating reports. Based on their website, it analyses 10,000 lines of code per second.
  • The tool is frequently updated.
  • Allows for automation with NAnt.
  • I have not encountered a project that it fails to analyze.

What I dislike

  • Does not generate CK metrics
  • It is not available for any Linux distribution.

3. Understand (Paid)

SciTool is the company behind Understand. Based on the way the company promotes the tool, it gives the impression their target market is enterprises and not for personal use. Although it is a paid tool, they offer a 14-day free trial. It is a comprehensive tool with an extensive set of features. Some of the features include the generation of metrics and report, the edit of source code from within the tool, it creates very detailed graphs for dependency analysis at various project levels(class, method, packages, etc.), users can create custom metrics, and more.

What I like

  • It supports more than a dozen languages.
  • It allows the creation of custom metrics.
  • The visualization features are interactive and very extensive.

What I dislike

  • Steep learning curve as a result of the broad set of features.
  • It is easy to get lost with the vast amount of data and metrics it provides.

Conclusion

Independently none of these tools are complete. But as a whole, they complement each other and help analyze the internal quality of software from different perspectives. To determine what tools best fit your company's need, you first need to decide what metrics you want to measure. Moreover, to determine what metrics to focus on, you have to decide what internal quality attributes of your software you want to improve.

Now that you know what quality is and how to measure it, you may be wondering: why does it matter? Why is measuring and understanding the quality of software important? Those are the questions that we will discuss in the third, and last, part of this series.

If you enjoyed this article, please recommend and share. Don't forget to subscribe and follow me on Twitter to stay up-to-date with my latest posts. See you in part 3.

References

[1] http://www.analizo.org/publications/analizo-cbsoft2010-tools.pdf
● ● ●

How would you rate this article?