r&d meets production: the dark sidescribblethink.org/work/softestim/softestim__slides.pdf · an...

46
R&D Meets Production: The Dark Side J.P.Lewis [email protected] Disney The Secret Lab Disney/Lewis: R&D Production – The Dark Side – p.1/46

Upload: others

Post on 02-Oct-2020

0 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

R&D Meets Production:The Dark Side

J.P.Lewis

[email protected]

Disney The Secret Lab

Disney/Lewis: R&D ↔ Production – The Dark Side – p.1/46

Page 2: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

R&D → Production Issues

• R&D ↔ Production interaction is not alwayseasy. In fact...

• R&D team: not completely sure if it can bedone, or how long it will take.

• Producers: need to get it done and knowhow long it will take

Can we improve this situation?

Disney/Lewis: R&D ↔ Production – The Dark Side – p.2/46

Page 3: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Topics

• Humor: anecdotes in course book (+ someR&D successes)

• Math: Paradox meets math: Halting, Godelincompleteness, meets...Liar paradox: person from Canada says, “all peoplefrom Canada are liars.”

• ...paradox + math meets software R&D

• what is creativity?

Disney/Lewis: R&D ↔ Production – The Dark Side – p.3/46

Page 4: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Large Limits to Software Estimation

J. P. Lewis, Large Limits to Software EstimationACM Software Engineering NotesVol 26, No. 4 July 2001 p. 54-59

• How I came to this...• R&D i.e. software (in general sense-

including shaders, scripting, ...)

Disney/Lewis: R&D ↔ Production – The Dark Side – p.4/46

Page 5: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Big Failures of Software Estimation

• An unpublished review of 17 major DODsoftware contracts found that the average28-month schedule was missed by 20months, and no project was on time.

• Air traffic control AAS system: $6.5 billion."The greatest debacle in the history oforganized work...we learned nothing from it"

Disney/Lewis: R&D ↔ Production – The Dark Side – p.5/46

Page 6: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*Software: It’s Chaos

• GAO-93-13 on major software challenges:“We have repeatedly reported on cost risingby millions of dollars, schedule delays of notmonths but years, and multi-billion-dollarsystems that don’t perform as envisioned.”

• California child support: $100 million, USmedical claims: $92 million, IRS: severalbillion

Disney/Lewis: R&D ↔ Production – The Dark Side – p.6/46

Page 7: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

What is Software Estimation

• Estimation of development schedules,program complexity, programmer productivity,program reliability

• Software Process Management: managingthe software development process

• Capability Maturity Model, ISO-900x

Disney/Lewis: R&D ↔ Production – The Dark Side – p.7/46

Page 8: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*Capability Maturity Model

5 Levels:

1. Initial ("unpredictable")

2. Repeatable

3. Defined

4. Managed

5. Optimizing

Disney/Lewis: R&D ↔ Production – The Dark Side – p.8/46

Page 9: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*CMM Levels

• At the Defined Level, the standard process for developing and maintainingsoftware across the organization is documented, including both softwareengineering and management processes, and these processes are integrated intoa coherent whole. ... The organization exploits effective software engineeringpractices when standardizing its software processes.

• At the Managed Level, the organization sets quantitative quality goals for bothsoftware products and processes. ...An organization-wide software processdatabase is used to collect and analyze the data available from the projects’defined software processes. Software processes are instrumented withwell-defined and consistent measurements at Level 4.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.9/46

Page 10: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Process Management evaluated

• Good intentions• Engineering or philosophy? ("coherent

whole", "effective software engineering", etc.)• Not always effective: One spectacular

development failure came from one of the fewCMM Level 4 organizations

Disney/Lewis: R&D ↔ Production – The Dark Side – p.10/46

Page 11: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Strong Claims?

• A software process manifesto: "In an immatureorganization, there is no objective basis for judgingproduct quality or for solving product or processproblems...

[In a mature organization] There is an objectivequantitative basis for judging product quality andanalyzing problems with the product and process.Schedules and budgets are based on historicalperformance and are realistic."

Disney/Lewis: R&D ↔ Production – The Dark Side – p.11/46

Page 12: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*More Claims

• Quality framework document:: "Consistentmeasurements provide data for doing the following:Predicting the software attributes for schedules, cost,and quality. ..."

• Course title: "Productivity Improvement throughDefect-Free Development"

Disney/Lewis: R&D ↔ Production – The Dark Side – p.12/46

Page 13: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Still More Claims

• Handbook of Quality Assurance: "In theCertainty state [of quality management], the objectiveof software development and software qualitymanagement, producing quality software on time witha set cost everytime, is possible."

• Book promoting a software estimationpackage: "...software estimating can be a science,not just an art. It really is possible to accurately andconsistently estimate costs and schedules for a widerange of projects."

Disney/Lewis: R&D ↔ Production – The Dark Side – p.13/46

Page 14: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Empirical Studies

• Kemerer: 4 estimation algorithms on 15 largeprojects for which historical data wasavailable. Post facto error in predicteddevelopment time ranged from 85% to>700%.

• DeMarco and Lister ProgrammingBenchmark: Size of code (loc) written bydifferent programmers to a singlespecification varied by more than a factor of10.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.14/46

Page 15: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Problem!

• Estimation procedures take as input anestimate of the complexity of the project – thiswas obtained from historical data by Kemerer.

• How do we obtain this estimate for a newproject?

Disney/Lewis: R&D ↔ Production – The Dark Side – p.15/46

Page 16: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Absurd Example

• Gather data: the average programmercompletes a small programming exercise in3.7 hours.

• Therefore, a new operating system releasecan be completed by an average programmerin 3.7 hours?

• Historical data do not help without anestimate of the complexity of the futureproject!

Disney/Lewis: R&D ↔ Production – The Dark Side – p.16/46

Page 17: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Algorithmic Complexity (AC)

• Kolmogorov Complexity• KCS Complexity: Kolmogorov, Chaitin,

Solomonoff• Complexity of a digital object:

The length of the shortest programthat produces that object.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.17/46

Page 18: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

AC is intuitive

• Consider

1111111...: for i to n print "1"

1313131...: for i to n print "13"

3423314...:* print "3423314........."

• * algorithmically random

Disney/Lewis: R&D ↔ Production – The Dark Side – p.18/46

Page 19: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

What about Language?

AC is defined in the large:

Ku(x) ≤ Kp(x) + Op(1)

Pick any language. A translator from thatlanguage to any other is a fixed size, e.g. 100Kbytes.In the limit of large objects, the choice oflanguage is insignificant.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.19/46

Page 20: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Algorithmic Complexity

• Objective (mathematical) definition complexity

• Intuitive

• Supports precise reasoning about related issues

• Addresses limitations of source code metrics (loc, fp):that such metrics do not reflect the complexity of thecode

Disney/Lewis: R&D ↔ Production – The Dark Side – p.20/46

Page 21: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*AC Simplified

• Prefix Complexity• Li and Vitanyi, Kolmogorov Complexity,

Springer

Disney/Lewis: R&D ↔ Production – The Dark Side – p.21/46

Page 22: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Flavor of AC Reasoning

• "WinZipper2000 is guaranteed to compressany file"

• FALSE: there are 2N unique files of size N

bits. There are fewer than 2N possible files of(compressed) size less than N bits. Not all 2N

files can be uniquely recovered.• *Almost all objects are algorithmically

random.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.22/46

Page 23: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Complexity Tower

• Impossible• Intractable

(how much work is 264? 232 is “4 giga”, so if 4Ghz proctakes 60 instructions → 4 giga-minutes = 8181 years!)

• Polynomial, Linear

Disney/Lewis: R&D ↔ Production – The Dark Side – p.23/46

Page 24: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Incompleteness

• Godel Incompleteness• Halting problem, Rice’s theorem: there is no

program that can determine extensionalproperties of all programs

• C(x) is not computable

Disney/Lewis: R&D ↔ Production – The Dark Side – p.24/46

Page 25: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

AC Proof of Godel Incompleteness

• A formal theory with N bits of axioms and statements

C(x) > L

contains many such statements that cannot be provedwhen L is much greater than N .

• If C(x) > L is proved, save the particular x that wasfound. This allows x : C(x) > L to be generated withN + O(1) bits - contradiction.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.25/46

Page 26: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Berry Paradox

• “The first number that requires more than athousand words to specify”

• is 12 words

Disney/Lewis: R&D ↔ Production – The Dark Side – p.26/46

Page 27: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*Incompleteness

• Out of an infinity of expressible truestatements C(x) > L, only a fixed number areprovable.

• A supposed ‘complexity’ software metricwritten in 500loc cannot accuratelycharacterize most programs larger than this.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.27/46

Page 28: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Church-Turing thesis

• (‘Objective’: a step-by-step process that leadsyou to a common result)

• An objective process is essentially analgorithm, whether undertaken by human orcomputer.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.28/46

Page 29: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Claim 1

• Program size and complexity cannot beobjectively and feasibly estimated a priori.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.29/46

Page 30: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Because

• Claim 1: Program size and complexity cannotbe objectively and feasibly estimated a priori.

• In fact complexity cannot be feasiblydetermined, period. (The size of a program is≥ its complexity.)

Disney/Lewis: R&D ↔ Production – The Dark Side – p.30/46

Page 31: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*AC vs. the real world

• AC is output only• Function arguments: AC of a large table

containing input-output pairs (’tabular size’)• State: consider as implicit argument to any

routines that are affected• Interactivity: bake the user input into the

program

Disney/Lewis: R&D ↔ Production – The Dark Side – p.31/46

Page 32: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Claim 2

• Claim 2: Development time cannot beobjectively predicted

• Claim 1: Program size and complexity cannotbe objectively and feasibly estimated a priori.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.32/46

Page 33: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Because

• Claim 2: Development time cannot beobjectively predicted

• Objective development time estimatedepends on an objective estimate of thecomplexity (recall absurd 3.7 hour example).

Disney/Lewis: R&D ↔ Production – The Dark Side – p.33/46

Page 34: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Claim 3

• Claim 3: Absolute productivity cannot beobjectively determined

• Claim 2: Development time cannot beobjectively predicted

• Claim 1: Program size and complexity cannotbe objectively and feasibly estimated a priori.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.34/46

Page 35: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Because

• Claim 3: Absolute productivity cannot beobjectively determined

• Productivity: LOC / time? No,complexity/time: finish a difficult (complex)program quickly = high productivity.

• *Proviso: relative productivity can beobjectively estimated by experiment

Disney/Lewis: R&D ↔ Production – The Dark Side – p.35/46

Page 36: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Claim 4

• Claim 4: Program correctness cannot beobjectively determined.

• Claim 3: Absolute productivity cannot beobjectively determined

• Claim 2: Development time cannot beobjectively predicted

• Claim 1: Program size and complexity cannotbe objectively and feasibly estimated a priori.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.36/46

Page 37: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Because

• Claim 4: Program correctness cannotgenerally be proved.

• Suppose a proof F (P, S) that program P

correctly implements spec S. Then S isformal and C(S) ≈ C(P ). (Write a programthat exhaustively queries S to determine theright output for a given input).

Disney/Lewis: R&D ↔ Production – The Dark Side – p.37/46

Page 38: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*Approximate Estimator?

• Find E : C(x) <= E(x) <= C(x) + b ?• Apply triangle inequality

K(a|b) ≤ K(a|x) + K(x|b) + O(1)

to the two-part description:

K(K(p)|p) ≤ K(K(p)|B) + K(B|p) + O(1)

(B - set of programs [C(x) . . . C(x) + b] )

• K(∗|B) ≤ log |B|

• But K(K(p)|p) 6= O(1)

Disney/Lewis: R&D ↔ Production – The Dark Side – p.38/46

Page 39: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

*(note)

• Note on this:

K(K(p)|B) ≤ log |B| + O(1)

• The complexity is known to be within finitebounds, so there are a finite number ofprograms that can be run dovetail, one ofthem is guaranteed to produce p.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.39/46

Page 40: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Claim 5

• "K(B|b) 6= O(1)", meaning,• Claim 5: There is no estimator which

produces a correct fixed bound on thecomplexity of all inputs (programs).

Disney/Lewis: R&D ↔ Production – The Dark Side – p.40/46

Page 41: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Math = computation

Math = computation

• Axioms ↔ program input or initial state• rules of inference ↔ program interpreter• theorem(s) ↔ program output• derivation ↔ computation

Godel ↔ halting ↔ C(x) 6= O(1)

Disney/Lewis: R&D ↔ Production – The Dark Side – p.41/46

Page 42: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Math = Computation

• Every even number is the sum of two primes?• How long would it take you to write a program

to prove or disprove this? Write a programthat tests even numbers of increasing size. Ifthis program halts...

• Math = programming 6= manufacturing!

Disney/Lewis: R&D ↔ Production – The Dark Side – p.42/46

Page 43: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Conclusions

• Claims of objective estimation are wrong• I did not say that estimation / process

management efforts are not helpful!• Social responsibility• Union: lighting is creative, programming not.

But if ‘creative’ is ‘that which cannot beautomated’, then programming is art, whilelighting may not be.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.43/46

Page 44: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

End

The phrase

“is self-referential, when preceeded byitself”

is self-referential, when preceeded by itself.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.44/46

Page 45: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

“Research”

• Peer review

Disney/Lewis: R&D ↔ Production – The Dark Side – p.45/46

Page 46: R&D Meets Production: The Dark Sidescribblethink.org/Work/Softestim/softestim__slides.pdf · An unpublished review of 17 major DOD software contracts found that the average 28-month

Large Limits to Software Estimation

• Producers need estimates of softwaredevelopment times, but:

• Some of the stronger claims of Softwareestimation/Software process managementadvocates are directly contradicted byKolmogorov complexity.

Disney/Lewis: R&D ↔ Production – The Dark Side – p.46/46