CS 350, slide set 5 M. Overstreet Old Dominion University Spring 2005.

Slides:



Advertisements
Similar presentations
Verification and Validation
Advertisements

Chapter 3: Editing and Debugging SAS Programs. Some useful tips of using Program Editor Add line number: In the Command Box, type num, enter. Save SAS.
Describing Process Specifications and Structured Decisions Systems Analysis and Design, 7e Kendall & Kendall 9 © 2008 Pearson Prentice Hall.
Chapter 7: User-Defined Functions II Instructor: Mohammad Mojaddam.
Copyright © 1994 Carnegie Mellon University Disciplined Software Engineering - Lecture 1 1 Disciplined Software Engineering Lecture #7 Software Engineering.
Testing Without Executing the Code Pavlina Koleva Junior QA Engineer WinCore Telerik QA Academy Telerik QA Academy.
Personal Software Process
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.
6/19/2007SE _6_19_TSPImp_SVT_Lecture.ppt1 Implementation Phase Inputs: Development strategy & plan Completed, inspected & baselined SRS & SDS.
CS 350: Introduction to Software Engineering Slide Set 5 Software Quality C. M. Overstreet Old Dominion University Spring 2006.
1 Chapter 4 The Fundamentals of VBA, Macros, and Command Bars.
Chapter 2: Input, Processing, and Output
Guide To UNIX Using Linux Third Edition
School of Computer ScienceG53FSP Formal Specification1 Dr. Rong Qu Introduction to Formal Specification
Programming Logic and System Analysis
Personal Software Process Overview CIS 376 Bruce R. Maxim UM-Dearborn.
Wizards, Templates, Styles & Macros Chapter 3. Contents This presentation covers the following: – Purpose, Characteristics, Advantages and Disadvantages.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
CHAPTER 4: INTRODUCTION TO COMPUTER ORGANIZATION AND PROGRAMMING DESIGN Lec. Ghader Kurdi.
Software Quality Chapter Software Quality  How can you tell if software has high quality?  How can we measure the quality of software?  How.
Verification and Validation Yonsei University 2 nd Semester, 2014 Sanghyun Park.
Structured COBOL Programming, Stern & Stern, 9th edition
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 Debugging and Testing Overview Defensive Programming The goal is to prevent failures Debugging The goal is to find cause of failures and fix it Testing.
Writing Quality Requirements Karl E. Wiegers Presented by: Ricardo Carlos.
CS 350, slide set 6 M. Overstreet Old Dominion University Spring 2005.
By Touseef Tahir Software Testing Basics. Today's Agenda Software Quality assurance Software Testing Software Test cases Software Test Plans Software.
1 Functions 1 Parameter, 1 Return-Value 1. The problem 2. Recall the layout 3. Create the definition 4. "Flow" of data 5. Testing 6. Projects 1 and 2.
CS 350, slide set 10 M. Overstreet Old Dominion University Spring 2006.
Introduction Algorithms and Conventions The design and analysis of algorithms is the core subject matter of Computer Science. Given a problem, we want.
Disciplined Software Engineering Lecture #7 Software Engineering Institute Carnegie Mellon University Pittsburgh, PA Sponsored by the U.S. Department.
© 2001 Business & Information Systems 2/e1 Chapter 8 Personal Productivity and Problem Solving.
C++ Programming: From Problem Analysis to Program Design, Fifth Edition, Fifth Edition Chapter 7: User-Defined Functions II.
© 2007 Pearson Education, Inc. Publishing as Pearson Addison-Wesley 1 Product Design Finalization; Inspections.
© 1998 Carnegie Mellon UniversityTutorial The Personal Software Process (PSP) The overview of the PSP that follows has been built from material made.
Programming for Beginners Martin Nelson Elizabeth FitzGerald Lecture 5: Software Design & Testing; Revision Session.
This material is approved for public release. Distribution is limited by the Software Engineering Institute to attendees. Sponsored by the U.S. Department.
INFO 637Lecture #101 Software Engineering Process II Review INFO 637 Glenn Booker.
Software Engineering Prof. Dr. Bertrand Meyer March–June 2007 Chair of Software Engineering Lecture 2: The Personal Software Process.
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 8 – Reviews 1INFO636 Week 8.
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.
SE-280 Dr. Mark L. Hornick 1 Design and Code Reviews Review Checklists.
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.
PRODUCT IMPLEMENTATION Chapter 8 Tawatchai Iempairote September 23, 2041.
Personal Design and Development Software Process PD 2 SP “The unexamined life is not worth living.” Plato.
Software Quality Assurance and Testing Fazal Rehman Shamil.
The Hashemite University Computer Engineering Department
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
CS 350, slide set 2 M. Overstreet Old Dominion University Spring 2005.
Introduction to the Personal Software Process. Overview Process Fundamentals PSP Concepts and Structure PSP Planning and Measurement PSP Quality Management.
CSC 480 Software Engineering PSP Project 1 August 20, 2004.
CS 350, slide set 4 M. Overstreet Old Dominion University Spring 2005.
CS 350, slide set 10 M. Overstreet Old Dominion University Spring 2005.
CSC 205 Programming II Lecture 1 PSP. The Importance of High-Quality Work Three aspects to doing an effective software engineering job producing quality.
CMSC 104, Section 301, Fall Lecture 18, 11/11/02 Functions, Part 1 of 3 Topics Using Predefined Functions Programmer-Defined Functions Using Input.
4 - Conditional Control Structures CHAPTER 4. Introduction A Program is usually not limited to a linear sequence of instructions. In real life, a programme.
Applied Software Testing
Chapter 7: User-Defined Functions II
Chapter 2: Input, Processing, and Output
Chapter Topics 2.1 Designing a Program 2.2 Output, Input, and Variables 2.3 Variable Assignment and Calculations 2.4 Variable Declarations and Data Types.
A possible solution: Personal Software Process (PSP)
An Introduction to Debugging
Chapter 2: Input, Processing, and Output
CHAPTER 6 Testing and Debugging.
Presentation transcript:

CS 350, slide set 5 M. Overstreet Old Dominion University Spring 2005

Reading PSP text, ch. 11, 12, 13, 14

Topics A software development process Measuring software quality Finding defects A code review checklist

Process A sequence of steps to complete a task Provides guidance Can provide a record of what has been accomplished Can provide an indication of percent of project which has been completed After we’ve used 50% of time allocated, have we finished 50% of the work?

Some basic definitions Recall defn’s from Ch. 5 Product: something you produce, usually for someone else Project: produces a product Task: an element of work Process: the steps to produce a product Plans: the way a specific project is to be done; how, when, at what costs Job: something you do; either a project or a task More Processes can have various phases Each phase can consist of several activities

PSP process Planning Code Design Test Design Code Compile Test Post Mortem Requirements Finished product Scripts Project plan summary Logs Plan and actual project and process data Time and defect data Guidance Plan data Actual data

PSP process script - 1 Purpose To guide you in developing programs Entry Criteria Problem statement PSP Project Plan Summary form Actual size and time data from old projects Time Recording Log 1Planning Identify program functions Identify test objectives Estimate max, min, and total LOC Determine minutes/LOC Calculate max, min, and total time Enter data in Project Plan Summary Form Record planning time in Time Recording Log 2Code design Design the program Record design in specified format Enter code design time in Time Recording Log 3Test design Prepare test plans and data Enter test design time in Time Recording log

PSP Process Script - 2 3Code Implement the design Complete a Makefile Use a standard format for entering code Record coding time in Time Recording Log 4Compile Compile the code Fix defects as discovered Record time in Time Recording Log 5Test Test the program Fix defects as discovered Complete test reports Record time in Time Recording Log 6Postmortem Complete the Project Plans Summary with actual time and size data Record postmortem time in Time Recording Log Exit criteria A thoroughly tested program A properly documented design Complete source code Documented and corrected test data A Makefile A completed set of test reports A completed Project Plan Summary Completed Time Logs; All required submitted.

Software Quality Complex topic How do customers measure the quality of a product? How do developers measure the quality of a product? Includes, among many possibilities: How many problems does a typical user encounter when using the product? Does the product provide key functionalities to the user? How do features of this product compare with competing products? How easy is it to enhance/modify/extend/revise/tailor the product? How easily can components from this product be used in other products? We’re going to keep it simple: defects/KLOC

What’s a defect in PSP? Anything wrong with a program: Misspelling in comment Bad punctuation, poor formatting Incorrect logic Missing functionality Documentation, format does not conform to organizational standard In short, any change you make to code after you type it in and proofread it. Errors are mistakes people make. Some result in defects in code.

Why record defect types? To have real data on what is causing problems To help direct possible changes to software processes Pointless unless defect types, frequencies, and times-to-fix are periodically analyzed and acted upon

Goals of defect form Improve your programming Reduce number of defects in your code Save you time To do you job responsibly: you find your own mistakes rather than someone else finding them

Fixing defects Recognize defect symptoms From symptoms, deduce likely locations of defects Sometimes hard to do, sometimes not Identify source Fix it Verify that the fix: Resolved the problem Did not introduce new problems

Ways to find code defects Let others find them (not recommended) This approach has some disadvantages Use testing to locate defects Widely used; very expensive; misses many Use mathematical methods (proofs of correctness) to locate defects Rarely used; very expensive, maybe infeasible in most cases Use Code Reviews Use Code Inspections (will discuss later)

Why Code Reviews? Compilers miss lots of typo/syntax errors (probably 10% -- depends on language) Testing misses lots of defects (some assert 50%) No matter how many defects are in the code to begin with! Testing and code reviews are probably complimentary activities Code reviews can find some defects not easily found in testing Testing finds can some defects not easily found by code reviews

Review before compiling! Takes as long to do review before as after Saves some compile time Typically 10% to 15% if done without review Typically ~3% if done with review Compiles finds errors equally well with or without review Reviewers don’t find errors as effectively if they know the code has compiled cleanly. Probably human nature: if we don’t really expect to find things, we don’t look as hard. if we expect to find things and don’t, we probably look again.

Additional comments In PSP, you do your own reviews. Goal is to save you time, improve your code quality In TSP (remember the next textbook?), this is supplemented by inspections. Since fixing code is so expensive, we have much industrial data that shows reviews pay!

Code review script - 1 Entry criteriaCheck that the following are on hand: 1. The requirements statement 2. The program design 3. The program source code 4. The coding standards 5. A Defect Recording Log 1Review procedureFirst produce the finished program source code. Before compiling, print a source listing Next, do the code review During the code review, carefully check every line of source code to find and fix as many defects as possible 2Fix the defectsFix all defects found Check the fixes to ensure they are correct Record the defects in the Defect Recording Log 3Review for coverage Verify that the program design fulfills all of the functionality described in the requirements Verify that the source code implements the design

Code Review Script - 2 4Review the program logic Verify that the design logic is correct Verify that the source code correctly implements the design logic 5Check names and types Verify that all names and types are correctly declared and used Check for proper declaration of integer, long int., and floating point data types 6Check all variablesEnsure that every variable is initialized Check for overflow, underflow, and out-or-range problems 7Check program syntax Verify that the source code properly follows the language specifications Exit criteriaAt completion you must have: 1 The completed and corrected source code 2. Completed Time Recording Log 3. Completed Defect Recording Log

Code Review Checklist See text, table 14.1, pg. 177 Use different checklists for different languages Different languages have different short comings While some mistakes are common-place in many languages, features of a particular language often cause people to make similar mistakes Your checklist should evolve and be based on what you discover about your own behavior from your own code reviews!

C++ Coding Standard See text, Table 14.9, pg. 189 Starting with assignment 4, this is what the grader will use for future assignments. Follow formatting rules. Some editors automatically indent. Take advantage of this. Grading rules: Any submitted code that does not fully comply with the coding standard from the text will not be graded.