A function whose inputs are software data and whose inputs are software data and whose output is a single numerical value that can interpreted as the degree to which software possesses a given quality attribute.

We want to keep track of a project or organization level metric, not an individuals performance.

Measure

  • Quantitative indication of the extend, amount, dimension, capacity, or size of some attribute of a product, project, or process Measurement
  • Act of determining a measure Metric
  • Quantitative measure of the degree to which a system, component, project, or process possesses a given attribute
  • May relate individual measures Indicators
  • Metrics that provide insight into software processes, projects, or products against a standard threshold

Objectives

  • Assist management in three basic area
    • Control of software development projects and software maintenance
    • Support of decision making
    • Initiation of preventive or correcting action
  • Facilitate managerial control, planning & intervention based on calculation of metrics regarding deviations of the actual from planned in terms of functional and timetable and budget performance
  • Identify situations for development or maintenance process improvement based on accumulation of metrics information regarding the performance of teams, units, etc

Software Size Measures

  • KLOC: Classic measure of the size of software by thousands of lines of code
  • Function points: A measure of the development resources required to develop a program, based on the functionality specified for the software system

Types of Metrics

  • Process metrics:
    • The point here is to improve software processes
    • Defect metrics
    • Effectiveness of defect removal
    • Productivity
  • Product metrics
    • These are the characteristics of a product
    • Refer to development phase
    • Refer to operational phase
  • Project metrics
    • These are project characteristics and execution
    • Staffing pattern over the life cycle

Limitations of software metrics:

  • Obstacles
    • Are enough resources allocated for developing and collecting metrics
    • Opposition from employees
    • Uncertainty regarding the data’s validity rooted in partial and biased reporting
    • Low validity and limited comprehensiveness of metrics
    • KLOC is not a very good estimate for development time
    • Defects detected depend on thoroughness of review/testing and reporting style

Detection Strategies

Randu Marinescu:

  • Detection strategy: A composition of various metric rules combined with AND/OR operators into a single rule
  • Metric rules: Metrics that should comply with proper threshold values
  • The composition of metric rules expresses a violation of a design heuristic

The point of this is to turn our metrics and informal rules into strategies to detect stuff like large complex classes.

Data Filter Examples

  • Marginal
    • Semantical
    • Statistical
  • Interval
    • Composition of two marginal filters We use boolean operators to combine data filters to make detection strategies to find stuff.

DECOR

This is a method for the specification and detection of code and design smells based on domain specific language.

DETEX is a detection technique that instantiates DECOR.

Anti Patterns and Code Smells

Anti Patterns

Code Smells

You automatically generate detection algorithms from DECOR rule cards.