Chapter 12 Defects. 山东大学计算机学院 2 In the chapter  Concept of Defects  Defects and software quality  What is Defect?  Defects versus Bugs  Defect types.

Slides:



Advertisements
Similar presentations
CHAPTER 1 SOFTWARE DEVELOPMENT. 2 Goals of software development Aspects of software quality Development life cycle models Basic concepts of algorithm.
Advertisements

Chapter 4 Quality Assurance in Context
The Baseline Personal Process Copyright, 1999 © Jerzy R. Nawrocki Jerzy Nawrocki Personal Software Process Lecture 3.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #7 Software Engineering.
Software Quality Assurance Inspection by Ross Simmerman Software developers follow a method of software quality assurance and try to eliminate bugs prior.
山东大学齐鲁软件学院 1 Chapter 9 Managing Schedules. 山东大学齐鲁软件学院 2 In the chapter  How to develop schedules to track the progress of your work.  How to use checkpoints.
Personal Software Process
SE 450 Software Processes & Product Metrics Reliability: An Introduction.
The Software Process Strategy The Software Process Strategy Part III.
© 2010 John Dalbey Ch 9: Reviews Humphrey proposes that personal reviews will result in improved quality. Now that we have a defined process and some real.
CS 350: Introduction to Software Engineering Slide Set 5 Software Quality C. M. Overstreet Old Dominion University Spring 2006.
SE 450 Software Processes & Product Metrics 1 Defect Removal.
Aplicaciones de Ingeniería de Software
Swami NatarajanJuly 14, 2015 RIT Software Engineering Reliability: Introduction.
Using A Defined and Measured Personal Software Process Watts S. Humphrey CS 5391 Article 8.
Personal Software Process Overview CIS 376 Bruce R. Maxim UM-Dearborn.
1CMSC 345, Version 4/04 Verification and Validation Reference: Software Engineering, Ian Sommerville, 6th edition, Chapter 19.
Personal Software Process Software Quality CIS 376 Bruce R. Maxim UM-Dearborn.
DCT 1123 PROBLEM SOLVING & ALGORITHMS INTRODUCTION TO PROGRAMMING.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Personal Software Process KAIST SE Lab..
Software Quality Chapter Software Quality  How can you tell if software has high quality?  How can we measure the quality of software?  How.
1 Shawlands Academy Higher Computing Software Development Unit.
Chapter 15 Projecting Defects( 缺陷预测 ). 山东大学齐鲁软件学院 2 outline  Analyze and use your defect data to help improve both planning accuracy and product quality.
Applied Software Project Management Andrew Stellman & Jennifer Greenehttp:// Applied Software Project Management Chapter 1: Introduction.
SoITSSpecifications of IT systems? 1 Specifications of IT systems checking and validating Jens Bennedsen and Peter Gorm Larsen
Defect Management Defect Injection and Removal
Disciplined Software Engineering Lecture #8 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
INFO 637Lecture #41 Software Engineering Process II Development Plan INFO 637 Glenn Booker.
Software Inspection A basic tool for defect removal A basic tool for defect removal Urgent need for QA and removal can be supported by inspection Urgent.
1 9/19/2015ã 2007, Spencer Rugaber Personal Software Process (PSP) Application of CMM principles to individuals Developed by Watts Humphrey of the Software.
Software Metrics - Data Collection What is good data? Are they correct? Are they accurate? Are they appropriately precise? Are they consist? Are they associated.
Chapter 3: Software Maintenance Process Omar Meqdadi SE 3860 Lecture 3 Department of Computer Science and Software Engineering University of Wisconsin-Platteville.
1 The Software Development Process  Systems analysis  Systems design  Implementation  Testing  Documentation  Evaluation  Maintenance.
Disciplined Software Engineering Lecture #7 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
© 1998 Carnegie Mellon UniversityTutorial The Personal Software Process (PSP) The overview of the PSP that follows has been built from material made.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #8 Software Engineering.
INFO 637Lecture #101 Software Engineering Process II Review INFO 637 Glenn Booker.
CS 350, slide set 5 M. Overstreet Old Dominion University Spring 2005.
C++ Programming Language Lecture 2 Problem Analysis and Solution Representation By Ghada Al-Mashaqbeh The Hashemite University Computer Engineering Department.
INFO 636 Software Engineering Process I Prof. Glenn Booker Week 9 – Quality Management 1INFO636 Week 9.
Winter 2005SE-280 Dr. Mark L. Hornick Personal Software Process: Initial Process Overview.
INFO 636 Software Engineering Process I Prof. Glenn Booker Week 8 – Reviews 1INFO636 Week 8.
PSP Quality Strategy [SE-280 Dr. Mark L. Hornick 1.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 7 1 Design and Code Reviews - Overview What are design and code.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
Disciplined Software Engineering Lecture #2 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #2 Software Engineering.
Chapter 19 Process Quality. 山东大学计算机学院 2 outline  Then meaning of process quality  Process measurement  COQ  Failure costs, Appraisal costs, Prevetion.
QA and Testing. QA Activity Processes monitoring Standards compliance monitoring Software testing Infrastructure testing Documentation testing Usability.
Implementation Phase CS4311 – Spring 2008 References: Shach, Object Oriented and Classical Software Engineering E. Braude, Software Engineering, an Object-Oriented.
The Software Development Process
CS 350: Introduction to Software Engineering Slide Set 2 Process Measurement C. M. Overstreet Old Dominion University Fall 2005.
INFO 637Lecture #71 Software Engineering Process II Product Implementation INFO 637 Glenn Booker.
Introduction to the Personal Software Process. Overview Process Fundamentals PSP Concepts and Structure PSP Planning and Measurement PSP Quality Management.
1 The Software Development Process ► Systems analysis ► Systems design ► Implementation ► Testing ► Documentation ► Evaluation ► Maintenance.
CSC 480 Software Engineering PSP Project 1 August 20, 2004.
CSC 205 Programming II Lecture 1 PSP. The Importance of High-Quality Work Three aspects to doing an effective software engineering job producing quality.
TMP3413 Software Engineering Lab Lab 01: TSPi Tool Support.
Personal Software Process Adam Graham Candidate for M.S. Computer Science Union College.
Verification and Validation
A possible solution: Personal Software Process (PSP)
Software Quality Engineering
Designing and Debugging Batch and Interactive COBOL Programs
An Introduction to Structured Program Design in COBOL
An Introduction to Debugging
Software Defect Reduction Top 10 List Barry Boehm, University of Southern California Victor R. Basili, University of Maryland IEEE Computer, January 2001.
CHAPTER 6 Testing and Debugging.
Presentation transcript:

Chapter 12 Defects

山东大学计算机学院 2 In the chapter  Concept of Defects  Defects and software quality  What is Defect?  Defects versus Bugs  Defect types  Recording defects and counting defects  The Defect Recording Log  The updated PSP process

山东大学计算机学院 3 Software quality  Must be in terms that are meaningful to the product’s users.  Meet users’ needs;  Reliably and consistently doing the user’s job.  It’s essential to have clear and exact requirements. So the development, clarification, and refinements of requirements is a major subject however it’s beyond the scope of this class.

山东大学计算机学院 4 Hierarchy of Needs  Software performs its required tasks  Product meets its performance requirements  Software is usable  Development is economical and timely  Product is dependable and reliable

山东大学计算机学院 5 Defects & Software quality  Defects are the primary measure of quality in PSP.  Finding and fixing defects will do great help to improving software quality.  Finding and fixing defects is necessary but not sufficient to assure software quality.

山东大学计算机学院 6 Top 10 lists about Defects and quality  Finding and fixing a software problem after delivery is often 100 times more expensive than finding and fixing it during the requirements and design phase.  About 40-50% of the effort on current software projects is spent on avoidable rework.  About 80% of the avoidable rework comes from 20% of the defects.  About 80% of the defects come from 20% of the modules and about half the modules are defect free.  About 90% of the downtime comes from at most 10% of the defects.

山东大学计算机学院 7 Top 10 lists about Defects and quality  Peer reviews catch 60% of the defects.  Perspective-based reviews catch 35% more defects than non-directed reviews.  Disciplined personal practices can reduce defect introduction rates by up to 75%.  All other things being equal, it costs 50% more per source instruction to develop high-dependability software products than to develop low-dependability software products. However, the investment is more than worth it if significant operations and maintenance costs are involved.  About 40-50% of user programs enter use with nontrivial defects.

山东大学计算机学院 8 Some Fix Time Data  Some typical fix time ratios  IBM rules of thumb - coding: 1.5; testing: 60; usage: 100  Boehm - design: 1; development test: 15 to 40; acceptance test: 30 to 70; operation: 40 to 1000  Remus - design: 1, code: 20, test: 82  Ackerman - test: times inspection time  Russell - inspection: 1, test: 2 to 4, use: 33  PSP research - unit test takes 12 times longer than code review to find and fix defects, also the cost!

山东大学计算机学院 9 Related concepts about Defects  Defect:  something wrong with a program, such as a syntax error, a misspelling, or an incorrect program statement.  Defect injection:  Defects introduced by engineers making errors.  All defects, in fact, result from human errors.  Defect Prevention  Finding defects is expensive so it is better to avoid them in the first place  Defect Removal  The improvement of defect finding and fixing process  Understanding the defects you have injected, identify the mistakes that caused them, and learn how to avoid repeating the same mistakes in the future.

山东大学计算机学院 10 Software Bugs  Latent bugs must  be operationally insignificant  not be destructive( 破坏性的 )  not be observed often  Bugs are not important to the customer if they do not  affect operations  cause inconvenience  cost time or money  cause loss of confidence in software results

山东大学计算机学院 11 Defects versus Bugs  ‘Bugs’ trivializes a critical problem and fosters a wrong attitude.  ‘Bugs’ versus ‘Time bomb’  Defects are more like time bomb than bugs  Trivial mistakes can have unforeseeable consequence.  For example, buffer overflow  Defects is a general concept than bugs

山东大学计算机学院 12 No Defects or Bugs!  The software engineer who writes a program is best able to find an d fix its defects.  They take personal responsibility for the quality of the programs they produce.  Learn to write a defect-free program is an enormous challenge for a software engineer and it takes data, effective technique,and skill.

山东大学计算机学院 13 Class exercise  Write a program to input the grades (Math, Program, Data structure, Algorithm Design, English) of a class and calculate the mean grades of each course.  写一个函数计算当参数为 n(n 很大 ) 时的 值 n  Use any language, 10 minutes.  Find the defects be injected  List the defects you often injected in your programming process

山东大学计算机学院 14 Answer 1  long fn(long n) { long temp=0; int i,flag=1; if(n<=0) { printf("error: n must > 0); exit(1); } for(i=1;i<=n;i++) { temp=temp+flag*i; flag=(-1)*flag; } return temp; }

山东大学计算机学院 15 Answer 2  long fn(long n) { if(n 0); exit(1); } if(0==n%2) return (n/2)*(-1); else return (n/2)*(-1)+n; }

山东大学计算机学院 16 Type No.Type nameDescription 10 documentation Comments, messages 20Syntax Spelling, punctuation, typos( 打字 ), instruction formats 30Build, PackageChange management, Library, version control 40AssignmentDeclaration, duplicate, names, scope, limits 50InterfaceProcedure calls and references, I/O, user formats 60CheckingError messages, inadequate checks 70DataStructure, content 80FunctionLogic, Pointer, loops, recursion, computation, function defects 90systemConfiguration, timing, memory 100EnvironmentDesign, compile, test, other support system problem Defect types

山东大学计算机学院 17 Understanding defects  1.gather defect data  Keep a record of every defect you find  Record enough information on each defect  Analyze these data to see what defect types caused the most problem  Devise ways to find and correct defects  2.understand the defects,avoid them  3.figure out how to find,fix,prevent

山东大学计算机学院 18 The Defect Recording Log Date Number Type Inject Remove Fix Time Fix Defect —— —— ——— ——— ———— ———— ————— Description —————————————————————————  Help to gather defect data.  Describe each defect in enough detail so you can later understand it.  Analyze the data to see where you injected and removed defect,and which types caused the most trouble.

山东大学计算机学院 19 How to complete the log?-1  1.When starting to develop a program  2.When you first encounter a defect  3.Use a separate line for each found  4.Enter the date the defect was found Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— ——— ——— ———— ———— —————  5.After fixing the defect, enter the defect type Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— —20— ——— ———— ———— —————

山东大学计算机学院 20 How to complete the log?-2  6.Enter the phase of the process when you injected the defect Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— —20— code ———— ———— —————  7.Enter the process phase when you removed the defect. Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— —20— code complie ———— —————  8.For the defect fix time, estimate the time from when you first were aware Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— —20— code complie —1 min— —————

山东大学计算机学院 21 How to complete the log?-3  9.The fix defect entry  10.Write a brief description of the defect in the description section Date Number Type Inject Remove Fix Time Fix Defect 10/28 —— —20— code complie —1 min— ————— Description ——missing;————————————————————

山东大学计算机学院 22 Counting Defects  Defect number  Defect type  When to count defect  Start counting defects whenever you complete a phase for a product or part of a product.  So, after the design phase,you could count all design defects.  In this class, we only count the defect in compiling and testing phase.

山东大学计算机学院 23 Why using the Defect Recording Log  To improve your programming  To reduce the number of defects in your program  To save time  The longer defects stay in a program, the more time they take to find and the harder they are to fix.  Remove the defects as soon as possible after you inject them  To save money  To do your job responsibly

山东大学计算机学院 24 Updated PSP process  Updated PSP scripts: See table 12.5 in p150

山东大学计算机学院 25 Updated PSP process

山东大学计算机学院 26 Updated PSP process

山东大学计算机学院 27 Updated PSP process

山东大学计算机学院 28 Updated PSP process

山东大学计算机学院 29 Updated PSP process

山东大学计算机学院 30 Updated PSP process

山东大学计算机学院 31 PSP Quality Strategy - part 1  Identify PSP quality objectives, e.g.  remove all defects before first compile  Establish PSP process quality measures, e.g.  overall process yield  LOC reviewed per hour  Examine products reviewed  determine their ratings on the measures  see which behaviors impacted these results

山东大学计算机学院 32 PSP Quality Strategy - part 2  Based on these data, identify your most effective work practices.  Incorporate these practices in your process artifacts  process scripts  checklists  forms  Identify measures that predict process quality  use these as control variables  set specifications for these variables

山东大学计算机学院 33 PSP Quality Strategy - part 3  Track your performance against these specifications.  Track your process to determine  when and if to change these specifications  actions to take for further process improvement

山东大学计算机学院 34 Summary  Summary  Software quality  Software defects  Record the software defect-Defect Recording Log  Defect types  Updated PSP process

山东大学计算机学院 35 remember  1. Software quality starts with defects.  2. If defects are not managed, more important quality issues cannot be adequately addressed.  3. The most effective way to manage defects is with the individual software engineer  4. If you don ’ t eliminate your own defects, they will be much more expensive and time consuming to remove later.

山东大学计算机学院 36 Assignment  Use the Defect Recording Log to record every defect find in the program you write. Summarize the defect data in the Project Plan Summary for each program.