Created February 7 , 2016
Last updated February 7 , 2016
[ Japanese | English ]

Consideration of the software metrics

  In this page, I will explain about the software metrics.
  What is the software metrics?
  In a nutshell , it is to measure the quality of the program.
  Then , in this page , I will explain about the software metrics and I will explain the reason that it is usefull to design the better program.

  ...
  If you think that it is not related about the object oriented , please think again.

1. About the software metrics
2. The typical software metrics
3. Usage
4. Reference


1. About the software metrics

  Please refer Software metric - Wikipedia, the free encyclopedia.

  In a nutshell , it is to measure the quality of the program1.
  The reason of the measuring the quality is followings.

  When we create software in work , we must consider the delivery time , cost , quality and so on.
  If it is not good quality, the time and cost is infulenced.
  For example ,
      The analyzability and changeability in the maintainability are bad.
       ->It takes a lot of time to investigate the bug for poor analyzability.
         Investigation leakage occurs in some cases.
         Of course, affect the delivery time and cost (personnel expenses).
         New bugs are created in some cases.

  After that , after software is delivered , we must maintenance. If quality is bad , it is fash.
  The maintenance will take more money than designing and creating. If it is bad quality , you will continue in vain to pay the money.

-----
Note.
1: The quality of the program is defined by ISO/IEC9126(JIS X 0129) . And , this defines characteristics and sub-characteristics .
  *Functionality(Suitability , Accuracy , Interoperability , Security , Functionality Compliance)
  *Reliability(Maturity , Fault Tolerance , Recoverability , Reliability Compliance)
  *Usability(Understandability , Learnability , Operability , Attractiveness , Usability Compliance)
  *Efficiency(Time Behaviour , Resource Utilization , Efficiency Compliance)
  *Maintainability(Analyzability , Changeability , Stability , Testability , Maintainability Compliance)
  *Portability(Adaptability , Installability , Co-Existence , Replaceability , Portability Compliance)
(Reference :ISO/IEC 9126 - Wikipedia, the free encyclopedia )

In software metrics , the Maintainability is mainly measured.
Back to Top

2. The typical software metrics

  Followings are typical software metrics.

Number of lines of code
  When it is too many code in method or class , it takes more time to understand. This means bad analyzability.
  I think that when it is too many code , other metrics may bad also.

Comment density
  When there is only few comments , it may take more time to understand.
  Of course, the contents of the comments is very important also (But the tools can not measure).
  I think that followings should be written at method header comments.
    *Details of the method.
    *Description of the parameter.
    *Description of the return value.
    *Description of the behavior when error occurred.
    *The reason of design , sample code also.
  I think that comments should be written until the level of the Java API document at least.

Cyclomatic complexity
  When there are many branches (for example , if , select statment) , this value is bigger , many test case is needed and the Testability becomes bad.

Cohesion
  This is very important.
  If you need the details , please refer "1. What is the Module Cohesion?" in "Object-oriented and the Module Cohesion and the Module Coupling".
  In a nutshell , this means the strength of the relation of methods and fields in a class. If it is more strength , it is better. I think that this is related to the Analyzability.

Coupling
  I think that this is most important.
  If you need the details , please refer "2. What is the Module Coupling?" in "Object-oriented and the Module Cohesion and the Module Coupling".
  This means the strength of the relation of classes. If it is weak , it is better. If it is strong , the Analyzability , Changeability and Testability are bad.
  The formula is written in Coupling (computer science) - Wikipedia, the free encyclopedia. If you need , please refer.



There are more, if you need details, please refer Software metric - Wikipedia, the free encyclopedia.

Back to Top

3. Usage

  I think that you think that you modify bad part after measuring software metrics after creating program.

  In Excel VBA , I think that it is wrong.
Reason
  At first , there are few tools. there are some tools in Java , C/C++. But there are few in Excel VBA.

  At Second , Excel Visual Basic Editor does not have refactoring tools like Eclipse.
  Modifying the program considering the delivery time , cost and quality is a hard task.

Better Usage
  When designing , we must consider the software metrics.
  Specially , the Cohesion and the Coupling.


Back to Top

4. Reference

  The following tables are pages that I referred to create this page.

No.

Linked Website Name

Description

Linked date

1 Software metric - Wikipedia, the free encyclopedia This page explains about the Software metric. February 7 , 2016
2 ISO/IEC 9126 - Wikipedia, the free encyclopedia This page explains about the ISO/IEC 9126. February 7 , 2016
3 Object-oriented and the Module Cohesion and the Module Coupling This page explains about the Module Cohesion and the Module Coupling February 7 , 2016

Prev Up Next  Top
Back to Top

I doesn't assume the responsibility of any damage that occurs because of the use of this page.

Microsoft ,Windows ,Visual Basic and Excel are registered trademarks of Microsoft Corporation in the United States and other countries.
Visual Basic for Applications may represent a VBA.
Mac ,Mac OS ,Mac OS X ,AppleScript are trademarks of Apple Inc., registerd in the U.S. and other countries.
Other brands and their products are trademarks or registered trademarks of their respective holders and should be noted as such.

The author of this page and these companies do not have any relationship.