65
Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution Lice See http://software-carpentry.org/license.html for more informati Software Engineering

Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Embed Size (px)

Citation preview

Page 1: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Empirical Results

Copyright © Software Carpentry 2011

This work is licensed under the Creative Commons Attribution License

See http://software-carpentry.org/license.html for more information.

Software Engineering

Page 2: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Seven Years War

Page 3: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Seven Years War

Actually nine years long

(1754-63)

Page 4: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Seven Years War

Actually nine years long

(1754-63)

Britain lost 1,512 sailors to enemy action

Page 5: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Seven Years War

Actually nine years long

(1754-63)

Britain lost 1,512 sailors to enemy action

And almost 100,000 to scurvy

Page 6: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Seven Years War

Actually nine years long

(1754-63)

Britain lost 1,512 sailors to enemy action

And almost 100,000 to scurvy

Unnecessarily

Page 7: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

James Lind (1716-94)

1747: first controlled medical

experiment in history

Page 8: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

James Lind (1716-94)

1747: first controlled medical

experiment in history

• cider • sea water

• vitriol • oranges

• vinegar • barley water

Page 9: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

James Lind (1716-94)

1747: first controlled medical

experiment in history

• cider • sea water

• vitriol • oranges

• vinegar • barley water

Page 10: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

James Lind (1716-94)

1747: first controlled medical

experiment in history

• cider • sea water

• vitriol • oranges

• vinegar • barley water

Allowed British ships to be effective on long patrols

during the Napoleonic Wars

Page 11: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

1950: Hill & Doll study comparing

smokers and non-smokers

Page 12: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

1950: Hill & Doll study comparing

smokers and non-smokers

1. Smoking causes lung cancer

Page 13: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

1950: Hill & Doll study comparing

smokers and non-smokers

1. Smoking causes lung cancer

2. Many people would rather fail

than change

Page 14: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

1950: Hill & Doll study comparing

smokers and non-smokers

1. Smoking causes lung cancer

2. Many people would rather fail

than change

+

Page 15: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

1950: Hill & Doll study comparing

smokers and non-smokers

1. Smoking causes lung cancer

2. Many people would rather fail

than change

+

Page 16: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

A rarity in software engineering until the mid 1990s

Page 17: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

But today, papers describing new tools

or working practices routinely include

results from empirical studies

A rarity in software engineering until the mid 1990s

Page 18: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

But today, papers describing new tools

or working practices routinely include

results from empirical studies

Particularly ones by young researchers

A rarity in software engineering until the mid 1990s

Page 19: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

But today, papers describing new tools

or working practices routinely include

results from empirical studies

Particularly ones by young researchers

A rarity in software engineering until the mid 1990s

Many are flawed or incomplete,

but standards are constantly improving

Page 20: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 21: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 22: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 23: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 24: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 25: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 26: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Unsurprising in retrospect

Page 27: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Unsurprising in retrospect

Actionable

Page 28: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

What goes wrong in developers' first job?

Page 29: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

What goes wrong in developers' first job?

Page 30: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

What goes wrong in developers' first job?

Page 31: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Also unsurprising in retrospect, and actionable

What goes wrong in developers' first job?

Page 32: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Page 33: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Page 34: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Page 35: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Controlled experiments are expensive…

Page 36: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Controlled experiments are expensive…

…and often eliminate exactly what we want to study

Page 37: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Statistics is just one path

Controlled experiments are expensive…

…and often eliminate exactly what we want to study

Biggest hurdle is re-education

Page 38: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

Page 39: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Page 40: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Meta-analysis of over 30 studies

No consistent effect

Page 41: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Meta-analysis of over 30 studies

No consistent effect

• Some positive

Page 42: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Meta-analysis of over 30 studies

No consistent effect

• Some positive

• Some negative

Page 43: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Meta-analysis of over 30 studies

No consistent effect

• Some positive

• Some negative

• Some inconclusive

Page 44: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Test-Driven Development

An article of faith among many programmers

Meta-analysis of over 30 studies

No consistent effect

• Some positive

• Some negative

• Some inconclusive

The better the study, the weaker the signal

Page 45: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Boehm et al (1975): "Some Experience with

Automated Aids to the Design of Large-Scale

Reliable Software"

Page 46: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Boehm et al (1975): "Some Experience with

Automated Aids to the Design of Large-Scale

Reliable Software"

…and many more since

Page 47: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Boehm et al (1975): "Some Experience with

Automated Aids to the Design of Large-Scale

Reliable Software"

…and many more since

timenu

mbe

r /

cost

Most errors introduced during

requirements analysis and design

Page 48: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Boehm et al (1975): "Some Experience with

Automated Aids to the Design of Large-Scale

Reliable Software"

…and many more since

timenu

mbe

r /

cost

Most errors introduced during

requirements analysis and design

The later they are removed,

the more expensive they are

Page 49: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Pessimists

Optimists

Page 50: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

If we tackle the hump in the error injection curve, fewer bugs will get to the expensive part of the fixing curve.

Pessimists

Optimists

Page 51: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

If we tackle the hump in the error injection curve, fewer bugs will get to the expensive part of the fixing curve.

If we do shorter iterations, the total cost of fixing bugswill go down.

Pessimists

Optimists

Page 52: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

If we tackle the hump in the error injection curve, fewer bugs will get to the expensive part of the fixing curve.

If we do shorter iterations, the total cost of fixing bugswill go down.

Pessimists

Optimists

Page 53: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Fagan 1975: "Design and Code Inspections to Reduce

Errors in Program Development"

Page 54: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Fagan 1975: "Design and Code Inspections to Reduce

Errors in Program Development"

Reading code carefully is the most

cost effective way to find bugs

Page 55: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Fagan 1975: "Design and Code Inspections to Reduce

Errors in Program Development"

Reading code carefully is the most

cost effective way to find bugs

Cohen 2006: most of the value comes

from the first hour and

the first pair of eyes

Page 56: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Fagan 1975: "Design and Code Inspections to Reduce

Errors in Program Development"

Reading code carefully is the most

cost effective way to find bugs

Cohen 2006: most of the value comes

from the first hour and

the first pair of eyes

Code review now normal in open source

Page 57: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Page 58: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Do programming languages affect

productivity?

Page 59: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Page 60: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Can we predict software faults statistically?

Page 61: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Is up-front design cost-effective?

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Can we predict software faults statistically?

Page 62: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Is up-front design cost-effective?

Why is it hard to learn how to

program?

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Can we predict software faults statistically?

Page 63: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Is up-front architecture cost-

effective?

Why is it hard to learn how to

program?

Is open source software actually

better?

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Can we predict software faults statistically?

Page 64: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

Software Engineering Empirical Results

Is up-front architecture cost-

effective?

Why is it hard to learn how to

program?

Is open source software actually

better?

Are some programmers 10X better?

Do programming languages affect

productivity?

Does using design patterns make for better

code?

Can we predict software faults statistically?

Page 65: Empirical Results Copyright © Software Carpentry 2011 This work is licensed under the Creative Commons Attribution License See

February 2011

Copyright © Software Carpentry 2011

This work is licensed under the Creative Commons Attribution License

See http://software-carpentry.org/license.html for more information.

narrated by

Greg Wilson