ArticleslgStudy

computer science

Software metric

Software metric is a computer science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Software metric rather than just read about it. In short: In software engineering and development, a software metric is a standard of measure of a degree to which a software system or process possesses some property. Even if a metric is not a measurement (metrics are functions, while measurements are the numbers obtained by the application of metrics), often the two terms are used as synonyms.

Key takeaways

  • Software metric belongs to computer science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Software metric to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Software metric from memory before moving on to harder problems.

Reference excerpt

In software engineering and development, a software metric is a standard of measure of a degree to which a software system or process possesses some property. Even if a metric is not a measurement (metrics are functions, while measurements are the numbers obtained by the application of metrics), often the two terms are used as synonyms. Since quantitative measurements are essential in all sciences, there is a continuous effort by computer science practitioners and theoreticians to bring similar approaches to software development. The goal is obtaining objective, reproducible and quantifiable measurements, which may have numerous valuable applications in schedule and budget planning, cost estimation, quality assurance, testing, software debugging, software performance optimization, and optimal personnel task assignments.

Common software measurements Common software measurements include:

ABC Software Metric Balanced scorecard Bugs per line of code Code coverage Cohesion Comment density Connascent software components Constructive Cost Model Coupling Cyclomatic complexity (McCabe's complexity) Cyclomatic complexity density Defect density - defects found in a component Defect potential - expected number of defects in a particular component Defect removal rate DSQI (design structure quality index) Function Points and Automated Function Points, an Object Management Group standard Halstead Complexity Instruction path length Maintainability index Source lines of code - number of lines of code Program execution time Program load time Program size (binary) WEAVE score Weighted Micro Function Points Cycle time (software) First pass yield Corrective Commit Probability

Limitations As software development is a complex process, with high variance on both methodologies and objectives, it is difficult to define or measure software qualities and quantities and to determine a valid and concurrent measurement metric, especially when making such a prediction prior to the detail design. Another source of difficulty and debate is in determining which metrics matter, and what they mean. Researchers argue that commonly used software metrics, promoted frequently in academic research, are not practically useful for software professionals' decision-making. The practical utility of software measurements has therefore been limited to the following domains:

Scheduling Software sizing Programming complexity Software development effort estimation Software quality A specific measurement may target one or more of the above aspects, or the balance between them, for example as an indicator of team motivation or project performance. Additionally metrics vary between static and dynamic program code, as well as for object oriented software (systems).

Acceptance and public opinion Some software development practitioners point out that simplistic measurements can cause more harm than good. Others have noted that metrics have become an integral part of the software development process. Impact of measurement on programmer psychology have raised concerns for harmful effects to performance due to stress, performance anxiety, and attempts to cheat the metrics, while others find it to have positive impact on developers value towards their own work, and prevent them being undervalued. Some argue that the definition of many measurement methodologies are imprecise, and consequently it is often unclear how tools for computing them arrive at a particular result, while others argue that imperfect quantification is better than none (“You can’t control what you can't measure.”). Evidence shows that software metrics are being widely used by government agencies, the US military, NASA, IT consultants, academic institutions, and commercial and academic development estimation software.

Further reading J. Smith, Introduction to Linear Programming, Acme Press, 2010. An introductory text. Reijo M.Savola, Quality of security metrics and measurements, Computers & Security, Volume 37, September 2013, Pages 78-90.

See also Goal Question-Metric List of tools for static code analysis Orthogonal defect classification Software engineering Software package metrics

References

External links Software Metrics (SQA.net) Software Engineering Metrics: What do they measure and how do we know NASA Standard NASA-STD-8739.8 (Software Assurance and Software Safety Standard) HIS Source Code Metrics (outdated but for reference; related see AUTOSAR) HIS Source Code Metrics version 1.3.1 01.04.2008 (outdated but for reference; related see AUTOSAR) A framework for source code metrics NASA.gov SonarQube Metric Definitions Metrics of Object Oriented Software (2010)

Worked examples

Example 1 — a first encounter with Software metric

Start with the simplest possible case. Write down what Software metric claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In computer science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Software metric before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Software metric ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Software metric

In research
Software metric appears in computer science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Software metric in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Software metric is common in secondary-school and first-year university syllabi. It links to neighbouring topics Metrics, Software metrics, so understanding it makes those chapters shorter.
In everyday life
Look for Software metric outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Software metric in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Software metric means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Software metric out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Software metric in simple terms?

In software engineering and development, a software metric is a standard of measure of a degree to which a software system or process possesses some property. Even if a metric is not a measurement (metrics are functions, while measurements are the numbers obtained by the application of metrics), of…

Why does Software metric matter?

Because it connects several computer science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Software metric?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Software metric.

Tags

  • Metrics
  • Software metrics

Keep exploring