Lec 3
Lec 3
- Mukund Thakare
Software Measurement and Metrics
● Software measurement is study of size, quantity, amount, or dimension of a
particular attribute of a software product or software process.
Software Measurement Principles
The software measurement process can be characterized by five activities :
● Formulation: The derivation of software measures and metrics appropriate
for the representation of the software that is being considered.
● Collection: The mechanism used to accumulate data required to derive the
formulated metrics.
● Analysis: The computation of metrics and the application of mathematical
tools.
● Interpretation: The evaluation of metrics resulting in insight into the quality of
the representation.
● Feedback: Recommendation derived from the interpretation of product
metrics transmitted to the software team.
Need for Software Measurement
Software is measured to :
a) Methods should not have more than an average of 30 code lines (not counting line spaces and
comments).
b) A class should contain an average of less than 30 methods, resulting in up to 900 lines of code.
c) A package shouldn’t contain more than 30 classes, thus comprising up to 27,000 code lines.
d) Subsystems with more than 30 packages should be avoided. Such a subsystem would count up
to 900 classes with up to 810,000 lines of code.
e) A system with 30 subsystems would thus possess 27,000 classes and 24.3 million code lines.
Cyclomatic complexity
● This is a measure of the
control complexity of a
program. This control
complexity may be related
to program
understandability.
Length of identifiers
● This is a measure of the average length of distinct identifier in a program. The
longer the identifiers, the more understandable the program.
● Java identifiers
Depth of conditional nesting
● This is a measure of the depth of
nesting of if statements in a program.
Deeply nested if statements are hard
to understand and are potentially
error-prone.
Fog index
● This is a measure of the average length of words and sentences in
documents. The higher the value for the Fog index, the more difficult the
document may be to understand.
Advantages of Software Metrics
● Reduction in cost or budget.
● It helps to identify the particular area for improvising.
● It helps to increase the product quality.
● Managing the workloads and teams.
● Reduction in overall time to produce the product,.
● It helps to determine the complexity of the code and to test the code with
resources.
● It helps in providing effective planning, controlling and managing of the entire
product.
Disadvantages of Software Metrics
● It is expensive and difficult to implement the metrics in some cases.
● Performance of the entire team or an individual from the team can’t be
determined. Only the performance of the product is determined.
● Sometimes the quality of the product is not met with the expectation.
● It leads to measure the unwanted data which is wastage of time.
● Measuring the incorrect data leads to make wrong decision making.
Software Requirements
According to IEEE standard 729, a requirement is defined as follows:
● Helps ensure that the software being developed meets the needs and
expectations of the stakeholders
● Can help identify potential issues or problems early in the development
process, allowing for adjustments to be made before significant
● Helps ensure that the software is developed in a cost-effective and efficient
manner
● Can improve communication and collaboration between the development
team and stakeholders
Disadvantages
● Can be time-consuming and costly, particularly if the requirements gathering
process is not well-managed
● Can be difficult to ensure that all stakeholders’ needs and expectations are
taken into account
● Can be challenging to ensure that the requirements are clear, consistent, and
complete
● Changes in requirements can lead to delays and increased costs in the
development process.
● As a best practice, Requirements engineering should be flexible, adaptable,
and should be aligned with the overall project goals.
Thank you !!