CS 501: Software Engineering Lecture 4 Project Management 1 CS 501 Spring 2005 Administration Projects • Announcements by project teams Quiz 1 • Quiz 1 is next Thursday. Information is posted on the web site. 2 CS 501 Spring 2005 OS 360 The operating system for the IBM 360 was two years late. Question: How does a project get two years behind schedule? Answer: One day at a time! Fred Brooks Jr., The Mythical Man Month 3 CS 501 Spring 2005 The Aim of Project Management To complete a project: • On time • On budget • With required functionality • To the satisfaction of the client • Without exhausting the team To provide visibility about the progress of a project 4 CS 501 Spring 2005 Aspects of Project Management Planning • Outline schedule during feasibility study • Detailed schedule at the beginning of a project or phase of a project Progress tracking • REGULAR COMPARISON OF PROGRESS AGAINST PLAN Final analysis • Analysis of project for improvements during next project 5 CS 501 Spring 2005 Terminology Deliverable Work product that is provided to the customer (report, presentation, documentation, code, etc.) Milestone Completion of a specified set of activities (e.g., delivery of a deliverable) 6 CS 501 Spring 2005 Terminology Activity Part of a project that takes place over time (also known as a task). Event The end of a group of activities. Dependency An activity that cannot begin until some event is reached Resource 7 Staff time, equipment, or other limited resources required by an activity. CS 501 Spring 2005 General Approach to Project Planning Identify deliverables and milestones Divide project into activities (tasks) For each task estimate: • time to complete from when activity begins • dependencies on events before beginning • resource requirements Build a model that uses this data to create a work-plan, including schedule, resource allocation, and flexibility 8 CS 501 Spring 2005 Project Planning Methods Critical Path Method, Gantt charts, Activity bar charts, etc. • Build a work-plan from activity data. • Display work-plan in graphical form. Project planning software (e.g., Microsoft Project) 9 • Maintain a database of activity data with input tools • Calculate and display schedules • Provide progress reports CS 501 Spring 2005 Project Planning Methods All project planning methods are best when: 1. Plan is updated regularly (e.g., weekly or monthly) 2. The structure of the project is well understood 3. The time estimates are reliable 4. Activities do not share resources Unfortunately, #2, #3, #4 rarely apply to software development 10 CS 501 Spring 2005 A Simple Gantt Chart 11 Source: Microsoft using Excel CS 501 Spring 2005 A More Complex Gantt Chart 12 Source: SmartDraw CS 501 Spring 2005 Gantt Charts • Dates run along the top (days, weeks or months). • Each row represents an activity. Activities may be scheduled sequentially, in parallel or overlapping. • The scheduled for an activity is a horizontal bar. The left end marks the planned beginning of the task. The right end marks the expected end date. • The chart may be updated by filling in each activity to a length proportional to the work accomplished. • Progress to date can be compared with the plan by drawing a vertical line through the chart at the current date. 13 CS 501 Spring 2005 Activity Graph A scheduling technique that emphasizes dependencies An activity A dummy activity An event A milestone 14 CS 501 Spring 2005 Example: Activity Graph An Open University Course Deliverables: 16 8 8 4 1 4 15 Written texts (bound in pairs) Television programs Radio programs Computer programs Home experimental kit Assignments and sample solutions CS 501 Spring 2005 Activity Graph (part) other activities START 16 Revise Unit 3 Edit Unit 3 Print Unit 3 Mail Unit 3 END CS 501 Spring 2005 Activity Graph (continued) other activities Revise Unit 3 Edit Unit 3 START other activities 17 Revise Unit 4 Edit Unit 4 Typeset Unit 3 Print Units 3/4 Mail Units 3/4 Typeset Unit 4 CS 501 Spring 2005 Activity Graph (continued) Script TV 2 Edit Unit 3 Make TV 2 START Edit Unit 4 Mail Document Computer 1 Program Computer 1 Prototype Computer 1 18 CS 501 Spring 2005 Scheduling: Background PERT Program Evaluation and Review Technique introduced by the U.S. Navy in 1957 to support the development of its Polaris submarine missile program. PERT/Time Activity graph with three time estimates (shortest, most probable, longest) on each activity to compute schedules. PERT/Cost Added scheduling of resources (e.g., facilities, skilled people, etc.) 19 CS 501 Spring 2005 Critical Path Method Uses Activity Graph with single time estimate for each activity to estimate: earliest start date -- every activity begins at first possible time latest start date -- every activity begins at the last possible time slack -- difference between the latest and earliest start dates A standard method for managing large construction projects. On big projects, activity graphs with more than 10,000 activities are common. 20 CS 501 Spring 2005 Time Estimates for Activities (Weeks) 4 1 3 2 6 12 3 12 3 3 2 4 1 1 2 8 4 21 CS 501 Spring 2005 Earliest Start Dates All activities beginning at a given event have the same earliest start date. 1 1 12 4 3 5 15 2 17 3 12 0 12 12 3 15 17 6 20 22 23 24 1 23 3 2 19 2 4 4 22 4 1 25 8 8 17 CS 501 Spring 2005 Latest Start Dates Each event must be achieved by the date shown or the final date will not be met. 11 1 12 10 0 4 3 15 2 17 3 12 6 23 12 14 3 13 1 24 1 3 18 17 2 4 23 19 20 4 20 2 25 8 22 17 CS 501 Spring 2005 Critical Path 1/11 12/12 Every activity on the critical path must begin on the earliest start date. 15/15 17/17 22/23 0/0 12/14 4/13 24 17/17 23/24 25/25 19/20 17/17 CS 501 Spring 2005 Slack 1/11 10 1 12/12 Slack of activity = (latest start)end - (earliest start)begin - (time estimate) 4 10 15/15 17/17 6 2 25/25 3 0 2 0 3 22/23 3 0/0 12 0 1 23/24 0 1 1 1 122 12/14 13 17/17 19/20 3 2 1 25 0 2 8 4 9 0 4/13 17/17 4 9 25 CS 501 Spring 2005 Estimating the Time for an Activity With experienced staff, estimating the actual time to carry out a single task is usually fairly accurate, but ... The little bits and pieces are underestimated • The time from almost "done" to completely "done" is much longer than anticipated. (There's just one thing to tidy up. I need to put the comments into better shape. I really should get rid of that patch.) • The distractions are not planned for. (My system crashed and I decided to upgrade the software. My child's school was closed because of snow. I spent the day showing visitors around.) Some things have to be done twice. 26 CS 501 Spring 2005 Start-up Time On a big project, the start-up time is typically three to six months: • Personnel have to complete previous projects (fatigue) or be recruited. • Hardware and software has to be acquired and installed. • Staff have to learn new domain areas and software (slow while learning). • Clients may not be ready. 27 CS 501 Spring 2005 Final Analysis with Critical Path Method Administrative computing department at Dartmouth used the Critical Path Method for implementation phase of major projects (plan developed after project was well-understood). Experience: Elapsed time to complete projects was consistently 30% to 40% longer than predicted by model. Analysis: • Some tasks not anticipated (incomplete understanding) • Some tasks had to be redone (change of requirements, technical changes) • Key personnel on many activities (schedule conflicts) • System ZZZ (non-billable hours) 28 CS 501 Spring 2005 Adding Resources to Activity Graph or Gantt Chart Each activity is labeled with resources, e.g., Number of people (e.g., 2 Java programmers) Key personnel (e.g., chief system architect) Equipment (e.g., 3 servers with specified software) Facilities (e.g., video conference center) Each resource is labeled with availability, e.g., Hiring and training Vacations Equipment availability 29 CS 501 Spring 2005 Using Critical Path Method for Resources Assume every activity begins at earliest start date: In each time period, calculate: resources required resources available Identify shortage / surplus resources Adjust schedule acquire extra staff (e.g., consultants) rearrange schedule (e.g., change vacations) change order of carrying out activities The earlier that a problem is known, the easier it is to fix. 30 CS 501 Spring 2005 Key Personnel: The Mythical Man Month In computing, not all people are equal • The best are at least 5 times more productive. • Some tasks are too difficult for everybody. Adding more people adds communications complexity • Some activities need a single mind. • Sometimes, the elapsed time for an activity can not be shortened. What happens to the project if a key person is sick or quits? 31 CS 501 Spring 2005 Open University Example: Flexibility Schedule: Dates for broadcasting TV and radio programs are fixed. Printing and mailings can be accelerated if overtime is used. Functionality: The course team can decide what goes into the components of the course. Resources: The size of the course team can be increased slightly. 32 CS 501 Spring 2005 Value of Scheduling Tools Planning discipline • Identify all activities and inter-relationship • Provide schedule for each resource (identify clashes) • Early warning of difficulties (e.g., timing of equipment purchase) Routine updating of schedule • Focus on key milestones • Visibility for management Weekly staff meeting -- What did we expect to accomplish? What did we accomplish? What is expected for next week? 33 CS 501 Spring 2005 The Project Manager • • • • Create and maintain the schedule. Track progress against schedule. Keep some slack in the schedule (minimize risk). Continually make adjustments: Start activities before previous activity complete Sub-contract activities Renegotiate deliverables • Keep senior management informed (visibility). 34 CS 501 Spring 2005 Updating the Plan A PROJECT PLAN IS USELESS IS IT IS NOT UPDATED: • Whenever changes occur • On a regular schedule (weekly or monthly) The project manager needs the support of the head of the development team and the confidence of the team members. A realistic, current project plan is an essential part of visibility. * 35 CS 501 Spring 2005