Topic X Personal software process (PSP) Parts of this topic use material from the textbook W. S. Humphrey, “A Discipline for Software Engineering”, Addison-Wesley, 1995
Literature • Watts S. Humphrey • “A Discipline for Software Engineering: The Complete PSP Book” • Addison Wesley, 1995. • Watts S. Humphrey • “Introduction to the Personal Software Process” • Addison Wesley, 1997.
PSP: A Self-Improvement Process for Software Engineers published • Watts S. Humphrey • “PSP: A Self-Improvement Process for Software Engineers” • Addison Wesley Professional, 2005.
X. Personal software process (PSP) • PSP overview • PSP0 – PSP0.0 & PSP0.1 • PSP1 – PSP1.0 & PSP1.1 • PSP2 – PSP2.0 & PSP2.1 • PSP3 • PSP usage and results
Why are you a better programmer than a first year student? Why are some organizations better than others? (deliver software on time; deliver with high quality and few defects) Do some of the same things for a personal level scale up to organizations? What makes you better?
“Software improvement must begin at the individual level.” Watts S. Humphrey PSP - Personal software process • Awareness • Best practices • Commitment
Software Engineering Institute (SEI) • An applied research laboratory situated as a college-level unit at Carnegie Mellon University. • Supported by industry and the US government. • Established in 1984. • Offices in Arlington, Virginia (USA), Pittsburgh, Pennsylvania (USA), and Frankfurt (Germany). • Mission is to foster improvement of software processes. www.sei.cmu.edu
Watts S. Humphrey • A fellow at the SEI of Carnegie Mellon University, which he joined in 1986. • Established the Process Program, led initial development of the CMM, introduced the concepts of Software Process Assessment and Software Capability Evaluation, and most recently, the PSP and TSP. • From 1959 to 1986 he was associated with IBM Corporation where he was director of programming quality and process. • Holds a bachelor's degree in physics from the University of Chicago, a master's degree in physics from the Illinois Institute of Technology, and a master's degree in business administration from the University of Chicago. • Was awarded an honorary Ph.D. degree in software engineering by Embry Riddle Aeronautical University in 1998. Humphrey’s lecture
Watts Humphrey awarded prestigious National Medal of Technology Watts S. Humphrey has been awarded the prestigious 2003 National Medal of Technology for his contributions to the software engineering community. • The National Medal of Technology is the highest honor awarded by the President of the United States to America's leading innovators. • A formal ceremony took place March 14, 2005, at the White House.
The software problem • Poor software quality in delivered systems is expensive • expensive service and enhancement • potential for accident or loss of life. • Organizational progress with process improvement is limited because • process improvement takes time / is hard to sell. • The PSP addresses these problems by • providing convincing evidence of the benefits of process improvement • exposing the engineers to the benefits of using effective processes in their work • teaching the engineers effective process improvement methods • providing the historical data to better manage cost, schedule, and quality.
Objectives for process improvement schedule (delivery date) quality (defects) functionality (features)
History of process models • 1980s DoD Std 2167, AQAP 13 (NATO), industry standards (nuclear) • 1983 IEEE 730 (software quality assurance plans) • 1987 ISO 9000 • 1988 TickIT (ISO 9001) • 1990 ISO 9000-3 (guideline for software) • 1991 Capability Maturity Model (CMM) • 1992 SPICE (ISO 15540)
Models for software process improvement CMM U.S. DoD ISO Industry, professional (c) 1998 Software Productivity Consortium MFP, Inc.
Quality umbrella CMM/CMMI - fororganizational capability TSP - forquality products on cost and schedule PSP - forindividual skill and discipline Adapted From “Three Dimensions of Process Improvement,” Watts Humphrey, CROSSTALK, February 1998
PSP background • From 1970s, W. Edwards Deming and J. M. Juran convinced U.S. industry to focus on improving the way people did their jobs. • Principal quality management & improvement methods: • Most software communities rely on test-and-fix. • Michael Fagan introduced software inspection (1976). • Capability Maturity Model (1987): focuses on the management for the software organizations. • Personal Software Process: individual engineers.
PSP is a framework of techniques to help software engineers improve their performance. PSP is a self-improvement process designed to help control, manage, and improve the way you work. It is a structured framework of forms, guidelines, and procedures for developing software. (PSP as introduced in 1995 by its author, Watts S. Humphrey, SEI) What is PSP? (1) • PSP • takes those large scale project methods and practices which can be used by individuals, • structures them so that they can be introduced gradually, and • provides a framework for teaching them.
What is PSP? (2) • Provides engineers with a disciplined personal framework for doing software work. • Provides a set of methods, forms, and scripts that show how to plan, measure, and manage the work. • Emphasizes effort estimation & software quality. • Designed for use with any programming language or design methodology. • Can be used for any aspect of software development. • Provides a rapid way to infuse each engineer with software engineering skill and experience. • Goal – produce zero defect products on schedule and within planned costs. • Key – ability to recognize and handle undue pressures.
How was the PSP developed? • How to apply CMM to small software teams or individuals? --- personally use CMM principle • Humphrey developed 62 programs and defined 15 PSP process versions, proved 12 KPAs of CMM were applicable to individuals. • Humphrey wrote the manuscript. • Howie Dow taught the first PSP course to graduates in 1993 (University of Massachusetts). • Humphrey taught PSP at CMU from 1993-1994. • Humphrey published the PSP textbook in later 1994. • How to apply the same principles to engineering teams? --- Team Software Process (TSP) • The First course to train instructors to teach PSP in industry (Jim Over & Neil Reizer)
Planning and quality principles of PSP (1) • PSP principles: • System quality depends on the quality of its worst components. • Component quality depends on individual developers. • Every engineer is different; to be most effective, engineers must plan their work and they must base their plans on their own personal data. • To consistently improve their performance, engineers must personally use well-defined and measured processes. • To produce quality products, engineers must feel personally responsible for the quality of their products. Superior products are not produced by mistake; engineers must strive to do quality work.
Planning and quality principles of PSP (2) • It costs less to find and fix defects earlier in a process than later. • It is more efficient to prevent defects than to find and fix them. • The right way is always the fastest and cheapest way to do a job. • PSP applies a CMM-like assessment for individual work • Measurement & analysis framework to help you characterize your process. • Self-assessment and self-monitoring. • Prescribes defined programming steps, data collection forms and standards. • Assumes individual scale & complexity. • Well-defined individual tasks of short duration.
CMM and the PSP Level 5 Process change management* Technology innovation* Defect prevention* Level 4 Quality management* Process measurement and analysis* Level 3 Peer reviews* Intergroup coordination Software product engineering* Integrated software management* Training program Organization process definition* Organization process focus* Level 2 Software configuration management Software quality assurance Software subcontract management Software project tracking and oversight* Software project planning* Requirements management *PSP key practices W. S. Humphrey, “A Discipline for Software Engineering”, 1995 Level 1
What is TSP? • A measurement driven framework that helps engineering teams more effectively develop software-intensive products. • Provides structure, organization and discipline to running a team-based project. • TSP is built upon PSP. • TSP is an instance of a CMMI level 5 process for software teams.
Requirements HL Design Test TSP and PSP flow TSP TSP PSP Detailed Design Detailed Design Detailed Design Unit Test Unit Test Unit Test Implementation Implementation Implementation TSP Adapted From “Three Dimensions of Process Improvement,” Watts Humphrey, CROSSTALK, February 1998
PSP CMMI TSP Engineering The Team Building the Skills Environment Team Project roles and goals Personal measures Goals and tracking Team communication Process discipline Policies and practices Project and quality plans Estimating & planning Organizational process Risk analysis Quality management Training and resources Project reporting Project tracking Tools and facilities Sound Committed Skilled Team Management Teams Members Effective Engineering Teams Three process perspectives Adapted From “Three Dimensions of Process Improvement,” Watts Humphrey, CROSSTALK, February 1998
PSP overview • 7 upward compatible steps and four levels: • PSP0.0 & PSP0.1 • PSP1.0& PSP1.1 • PSP2.0 & PSP2.1 • PSP3 • Each level contains all the activities in the prior level plus some new ones. • Starting point is level PSP0 - current programming practice. • When learning PSP s/w engineers write 10 module-sized programs using the PSP steps. • They gather and analyze data on their work. • Based on these analyses they improve their working methods.
PSP evolution PSP3 Cyclic development Cyclic Personal Process PSP2.1 Design templates PSP2 Code reviews Design reviews Personal Quality Management PSP1.1 Task planning Schedule planning PSP1 Size estimating Test report Personal Planning Process PSP0.1 Coding standard Size measurement Process improvement proposal (PIP) Baseline Personal Process PSP0 Current process Time recording Defect recording Defect type standard W. S. Humphrey, “A Discipline for Software Engineering”, 1995
PSP - process elements W. S. Humphrey, “A Discipline for Software Engineering”, 1995
PSP Process Planning Development Design Design review Code Code review Compile Test Postmortem PSP process flow W. S. Humphrey, “A Discipline for Software Engineering”, 1995 Requirements Process scripts guide Time and defect logs Project plan summary Project and process data summary report Finished product
PSP courses • The “full” PSP course: • industry course: 3 intensive weeks (60 hours per week) • academic course: 12 to 15 weeks (3 hours per week) • includes 10 programming assignments and 5 reports • course results similar in industry and academia • uses A Discipline for Software Engineering [Humphrey 1995]. • The “introductory” PSP course: • does not teach the complete PSP • is often offered as part of a project management course • may start in the 1st year of a computing degree • uses Introduction to the Personal Software Process [Humphrey 1997].
X. Personal software process (PSP) • PSP overview • PSP0 – PSP0.0 & PSP0.1 • PSP1 – PSP1.0 & PSP1.1 • PSP2 – PSP2.0 & PSP2.1 • PSP3 • PSP usage and results
PSP0 – the baseline personal process • Provides a convenient structure for small-scale tasks. • Has three phases: planning, development (which includes design, code, compile, and test), and postmortem. • Uses scripts and logs to measure the normal software development life cycle (design, code, compile, test). • Forms are used to ensure a consistent and complete reporting of needed information. • Basic measurements include the time for each phase, and the defects found and removed. • The net result, other than the actual software, is a Plan Summary which compares the planned effort to the actual effort, and contains defect data.
PSP0 - tasks • Define current process (PSP0.0) • Time recording (PSP0.0) • Defect recording (PSP 0.0) • Defect type standard (PSP0.0) • Code standard (PSP0.1) • Size measurement (PS0.1) • Process improvement proposal or PIP form (PSP0.1)
PSP0 – current process script • Planning: • produce a requirement statement • estimate the required development time • estimate the total LOC (PSP0.1) • enter initial project data in the project plan summary • enter initial project data in the time recording log. • Development: • 4 steps (PSP0.1), collect time recording log data. • The last step: postmortem phase (PM) • enter the plan summary form with actual data • complete the PIP (PSP0.1). • Delivery of the finished product with forms.
PSP0 - software plan • The software plan is key to the PSP. • Primary contents of a software plan include: • Job size – size of the product, and time to create it • Job structure – how will work be done? In what order? • Job status – is the project on time and on schedule? • Assessment – how good was the plan? What lessons can be learned for next time? • Commitment – what will be delivered, when, and for how much money? • What will the product quality be? Will it meet the needs of the customer? • Scope of the plan must be clear, or it can’t be accurate.
PSP0.0 – time recording log W. S. Humphrey, “A Discipline for Software Engineering”, 1995
Defects: basic quality measure (1) • Defects are not important to the user as long as they do not: • affect operations • cause inconvenience • cost time or money • cause loss of confidence in the program’s results. • Low defect content is essential to a quality software process. (Experienced software engineers typically inject around 100 defects per KLOC.) • Defects are injected at the ‘PSP level’ and this is where the engineers should: remove them, determine their causes and learn to prevent them.
Defects: basic quality measure (2) • If you want a quality product out of test, you must put a quality product into test: • testing removes only a fraction of the defects • test is only meant to find defects - correction goes to developers. • Data show that it is much more efficient to find defects in reviews than in testing: • in unit test, typically only about 2 to 4 defects are found per hour • code reviews typically find about 10 defects per hour • experienced reviewers can find 70% or more of the defects in a product • unit test rarely exceeds a 50% yield. • PSP data show that reviews find 2 to 5 times as many defects per hour as unit test.
Defect injection CMU 94 data
PSP0.0 – defect recording log W. S. Humphrey, “A Discipline for Software Engineering”, 1995
PSP0.0 – defect type standard W. S. Humphrey, “A Discipline for Software Engineering”, 1995
Why make plans? • To make commitments you can meet. • To provide a basis for agreeing on the job. • To guide your work. • To help track your progress. • To project completion.
Project planning framework Customer need Items Define the requirements The PROBE Method Tasks Produce the conceptual design W. S. Humphrey, “A Discipline for Software Engineering”, 1995 Estimate the product size Size database Customer Estimate the resources Productivity database Produce the schedule Resources available Management Delivered product Tracking Reports Develop the product Size, resource, schedule data Analyze the process
PSP0.1 - product size estimation • To make better plans. • To assist in tracking development. • To normalize other measures: • development resources • defect rates. • Size data is used in estimating development time and the expected number of defects. • There are a number of criteria for good size measures: • has good correlation with effort • has a precise definition • can be counted automatically • is suitable for planning • is sensitive to language, design, and development method. • LOC measure satisfies most of those criteria.
C++ LOC versus development time CMU 94 data
Pascal LOC versus development time CMU 94 data
Text pages versus development time CMU 94 data
Script LOC versus development time CMU 94 data
70 60 50 40 Time (hours) 30 20 10 0 0 1000 2000 3000 4000 5000 6000 7000 8000 Report LOC Report LOC versus development time CMU 94 data
Screen LOC versus development time CMU 94 data
Measurement precision • When 2 people measure the same thing will they get the same result? • To do so requires a precise measurement definition. • The measure must also be properly applied: • Pascal LOC do not equate to assembler LOC • new LOC do not equate to modified LOC • logical LOC do not equate to physical LOC. • Machine countable • Size measurement is time consuming and inaccurate. • Automated counters can only work on definable program characteristics. • Counters can be complex: • size definition selected • counting method.