19
Informatics 43 – June 2, 2015

Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Embed Size (px)

Citation preview

Page 1: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Informatics 43 – June 2, 2015

Page 2: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Some Announcements

• Discussion on Friday – review. Bring questions.

• 0.5% extra credit for submitting the EEE Course Evaluation.

• Final Exam on Thursday, June 11, 8:00am-10:00am.

Page 3: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Verification and Validation

• Verification: “doing the product right”– Software conforms to specifications– Every phase is consistent with the previous phase

• Validation: “doing the right product”– Software meets users’ needs

Page 4: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

From www.easterbrook.ca/steve/2010/11/the-difference-between-verification-and-validation/

Page 5: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Quality Assurance (from week 7)

What software qualities do we want to assure?

Correctness

How?

• Testing• Inspections and reviews• Proofs, formal methods• Static analysis

Page 6: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Inspections and Reviews

• Humans read documents and look for defects.

• Surprisingly effective, especially for assuring qualities other than correctness.

• Many different approaches and levels of

details (despite textbook, p. 220, section 10.5)

Page 7: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Formal Methods

• Mathematically oriented proofs of correctness.

• Emphasis on reliability.• Note: verification only.• Usually done with formal specifications.• Often used for hardware verification. • Leslie Lamport: http://channel9.msdn.com/Events/Build/2014/3-642

– 00:00 – 07:00 and 44:15 – 46:05

Page 8: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Static Analysis

• A computer program analyzes source code and finds defects (without running the code).

• Lint, a tool from way back when:

• Pylint - http://doughellmann.com/2008/03/01/static-code-analizers-for-python.html

• Static analysis of Unreal Engine 4: http://www.viva64.com/en/b/0249/

if (a > b); a = 0;

Page 9: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Static Analysis

• John Carmack (co-founder of Id, super-programmer):

• The most important thing I have done as a programmer in recent years is to aggressively pursue static code analysis. Even more valuable than the hundreds of serious bugs I have prevented with it is the change in mindset about the way I view software reliability and code quality.

• http://www.gamasutra.com/view/news/128836/InDepth_Static_Code_Analysis.php

Page 10: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Project Effort Estimation

Page 11: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Estimating a project’s size

• Approach 1: Naïve estimation– Take your best guess

• Approach 2: Estimation by parts– Bottom-up or top-down, depending on where you

start• Approach 3: Re-estimation

– As more time is spent on a project, uncertainty decreases

Page 12: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Estimate uncertainty

x

2x

4x

0.5x

0.25x

Feasibility Requirements Design Code Delivery

© 2000 Ian Sommerville

Page 13: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

What to estimate

• Effort (person-months)• Duration (calendar months)• Cost (dollars)• KLOC (thousands of lines of code)

Page 14: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

• Longhorn Project (2003)– 16 MLOC, 5000 people, 3 years – 1067 LOC/person/year

• Grady and Caswell at HP (1987)– ~1100 LOC/person/year

• Brooks (1975) IBM OS/360– 600-800 instructions/person/year in control

group

Productivity Rates

Page 15: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Factors Affecting Productivity Rates

• Application domain experience• Process quality• Project size

– Negative relationship• Technology support• Working environment

Page 16: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

A general estimation formula

• Textbook, p. 275 (13.3.1):

Units of effort = a + b(size)c + ACCUM(factors)

a base costb scales the size variablec non-linearityACCUM a function, sum or product or ?factors other influences on the effort

Page 17: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Comparison of FormulasHalstead Boehm Walston-Felix

KLOC E=0.7 KLOC1.50 E=2.4 KLOC1.05 E=5.2 KLOC0.91

110501001000

0.722.1

247.5700.0

22,135.9

2.426.9

145.9302.1

3,390.1

5.242.3

182.8343.6

2,792.6

• Coefficients derived using actual project data– Variability in project characteristics?

Page 18: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

What to measure

• Lines of code – e.g. delivered lines of executable source code• Function points – count inputs, outputs, files• Feature points – similar to function points, also count

algorithms• Object points – count screens, reports, and 3-GL components

Page 19: Informatics 43 – June 2, 2015. Some Announcements Discussion on Friday – review. Bring questions. 0.5% extra credit for submitting the EEE Course Evaluation

Function points

• Analyze specifications and high-level design for– External inputs– External outputs– External inquiries– Internal logical files (e.g. classes, data structures)– External interface files

• The result is a number of Function Points.• Maybe: person-months = 0.20 * FP1.5