Chapter 7 - Metrics, Costs and Estimation Flashcards

1
Q

What does monitoring consist of?

A
  1. providing estimates on the future performance of the project
  2. comparing these estimates to the actual performance
  3. assessing the quality of the outputs of various activities of the project.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Why is measuring software useful?

A
  1. To Characterise—to gain understanding of the process, products, resources and environments, and to establish baselines for comparison with future assessments.
  2. To Evaluate — to determine status with respect to plans.
  3. To Predict — to gain an understanding of the relationships among processes and products, and use this understanding to build models of these relationships for the purpose of estimating future performance.
  4. To Improve — to identify roadblocks, root causes and other opportunities for improving product quality and process performance.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

What are some good guidelines for applying metrics?

A
  • Provide regular feedback to the individuals and teams who collect measures and metrics.
  • Work with engineers and teams to set clear goals and metrics that will be used to achieve them.
  • Never use metrics to threaten individuals or teams.
  • Metrics data that indicate problems should not be considered “negative”. All that metrics do is suggest areas for further scrutiny.
  • Do not get obsessed with a single metric — for example, defect rates — to the exclusion of all other metrics.
  • Use common sense and organisational sensitivity when interpreting data.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

In a software engineering project, what are the 3 types of metrics that can be employed?

A
  1. Process Metrics
  2. Project Metrics
  3. Product Metrics
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

What are process metrics?

A

These metrics are collected across all projects over long periods of time for long term process improvement.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

What are project metrics?

A

These are metrics that are collected over a single project to:
• assess the status of ongoing projects;
• track potential risks;
• uncover problem areas before they become critical;
• adjust workflow
• evaluate a team’s ability to control quality.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

What are product metrics?

A

These metrics measure the attributes of a product as it evolves. They are collected for assessing the quality of a product.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Why do we have process and project metrics alongside product metrics?

A
  • not possible to measure product metrics till too late in the project life cycle (need a product to measure) - can’t change quality goals at that point
    if we cannot directly measure the product quality, then we can instead measure aspects of the processes that are used to create the product, and measure aspects of the project — the results of applying the processes.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

What is the process of calculating metrics?

A
  1. data must be collected on the item being measured.
  2. calculate the summary information using a metric calculation
  3. indicators are used to interpret the metric in a context.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Define metrics for estimation.

A

how to estimate the size and complexity of a software project for the purpose of planning

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

What are the 6 attributes that make a metric useful?

A
  1. Simple and computable — calculating (and learning how to calculate a metric) should be straightforward.
  2. Empirically and intuitively persuasive — a metric should appear valid when proposed, and be in line with the expectations and experience of software engineers.
  3. Consistent and objective — two different people applying the same metric to the same artifact should arrive at the same answer.
  4. Use of consistent units — the computation should not lead to combinations of units; e.g. multiplying people on the project by lines of code is not intuitively persuasive.
  5. Programming language independent —metrics should not be based on the syntax of programming languages, as these differ so much that different languages will end up with wildly different results.
  6. Useful for providing feedback — a metric should be useful for providing feedback to improve the artifact.
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Define cyclomatic complexity.

A

The cyclomatic complexity of a program is the upper bound of the number of linearly independent paths in the code of that program. A set of linearly independent paths is a set of paths through the program, in which each path executes at least one statement/branch that is not part of any other path in the set.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

What is a control flow graph?

A

A control-flow graph is a directed graph representing all paths that can be executed by a a computer program. The graph, consisting of nodes that represent statements and branches, and direct edges that represent flow between those nodes — that is, an edge exists between two nodes is the statements/branches represented by those nodes can be executed one after the other.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What do the boxes in a control flow graph represent?

A

statements (in fact, blocks of statements)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
15
Q

What do the diamonds in a control flow graph represent?

A

branches (or choices)

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
16
Q

What is the formula for calculating cyclomatic complexity?

A

e−n+2
e = number of edges
n = number of nodes
or D + 1, where D is the number of decision points.

17
Q

What are the 3 applications of cyclomatic complexity?

A
  1. Measuring complexity of a program
  2. Testing
  3. Defect estimation
18
Q

Explain Measuring complexity of a program as an application of Cyclomatic complexity.

A

Cyclomatic complexity is an estimate of how much a developer has to track and examine when attempting to understand a program. McCabe’s original motivation for developing the mea- sure was for developers to measure the complexity of the code they were writing, and to re-factor the code into multiple procedures or modules if the complexity was too high.

19
Q

Explain testing as an application of Cyclomatic complexity.

A

Cyclomatic complexity gives us some idea of the amount of test cases we will need to generate to achieve certain coverage measures. If the cyclomatic complexity of a program is C, then C is the most number of test cases required to execute every branch/decision in the program. Additionally, C is the least number of test cases required to execute every path in the program. Watson, McCabe, and Wallace [WMW96] discuss a testing technique that generates a test case for every linearly dependent path in a program.

20
Q

Explain Measuring complexity of a program as an application of Cyclomatic complexity.

A

As state above, cyclomatic complexity is an estimate of how much a developer has to track and examine when attempting to understand a program. This also applies to the original programmer. A program with a higher cyclomatic complexity is likely to be more complex to develop. As such, researchers have pro- posed that a program with higher cyclomatic complexity is more likely to contain more faults. A recent study (available at http://www.enerjy.com/blog/?p=198) showed a strong correlation between cyclomatic complexity a fault count in Java classes. Classes with a complexity of 11 had a 28% chance of being fault-prone, while the most complex classes with a complexity of 74 had a 98% chance of being fault-prone. This indicates that, when testing a software system, we may want to spend more effort testing the modules with a higher cyclomatic complexity. It can also be used to estimate the reliability of a program without running tests.

21
Q

What is the CK metrics suite?

A

a measure of the complexity of an object-oriented design.