Presentation on theme: "Software Engineering II Scheduling"— Presentation transcript:
1 Software Engineering II Scheduling TUMProf. Bernd Brügge, Ph.DTechnische Universität MünchenInstitut für InformatikLehrstuhl für Angewandte Softwaretechnik31 May 2005
2 Where are we? SPMP IEEE Std 1058 0. Front Matter 1. Introduction 2. Project Organization3. Managerial Process4. Technical Process5. Work Elements, Schedule, Budget5.1 Work Breakdown Structure5.2 Dependencies between tasks5.3 Resource Requirements5. 4 Budget5.5 Schedule (Today’s lecture)Optional Inclusions
3 Where are we? SPMP IEEE Std 1058 0. Front Matter 1. Introduction 2. Project Organization3. Managerial Process4. Technical Process5. Work Elements, Schedule, Budget5.1 Work Breakdown Structure5.2 Dependencies between tasks5.3 Resource Requirements5. 4 Budget5.5 Schedule (Today’s lecture)Optional Inclusions
4 Cassin Ridge West Rib Summit of Denali (Mt. McKinley) Camp III Camp I July 1July 4July 6July 1When you want to climb McKinley, you have several alternatives:West Rib: Takes 3 camps for normal climbers, degrees at the cruxSecond hardest route, but can be done for good climbersCassin: can be done with one Camp, duration 2 days, hard climbing, the hardest route , only for very good climbersThe West Rib climb can be broken down into 5 tasks: Climb to Camp1, climb to Camp2, Climb to Camp 3, Climb to Summit, climb back to Base camp. Duration: 4 days to summit, 1 day back to base camp (not shown, but definitely a must do task:-)The summit via the Cassin ridge can be done in 2 days (again for mere mortals), so the cassin route back to base camp can be done in 2 days.2 days is shorter than 5 days. Which route should we do? Should you do the Cassin because it can be done in 12 days?Maybe none of these, but the normal route, the west buttress route?BTW, the exceptional russian climber did the West Rib solo in 10 hours!West ButtressRoute
5 Outline Dependency diagrams Determing times of activities Determining critical path and slack timesDetermining project durationScheudling HeuristicsHow to live with a given deadlineOptimizing schedulesRearranging schedulesThe last lectures dealt with Work Breakdown Structures, Estimation, Organization.Today we focus on Scheduling. In particular, we will look at techniques that allow us to determine the schedule when we have estimated times for tasks.
6 Why Dependency Diagrams? Example:You are assigned a project consisting of 5 activities each of takes one week to completeHow long does the project take?You are assigned a project consisting of 5 activities each of takes one week to complete. 2 and 3 of these activities can be done in parallel, respectively. The fifth depends on the first activity.Can the project be finished in 4 weeks?When activity dependencies become complex, you cannot to compute the schedule in your head any more.Dependency Diagrams are a formal notation to help in the construction and analysis of complex schedulesDuration of first example project: 1 week.Duration of second example project: not possible in 3 weeks, because the 2 activity thread has to wait for completion until the 3 activity thread is completed.
7 Dependency Diagrams (Overview) Dependency diagrams consist of 3 elementsEvent: A significant occurrence in the life of a project.Activity: Work required to move from one event to the next.Span time: The actual calendar time required to complete an activity.Span time parameters: availability of resources, parallelizability of the activityDependency Diagram are drawn as a connected graph of nodes and arrows. 2 commonly used notations to display dependency diagrams:Activity-on-the-arrowActivity-in-the-nodeActivity-on-the-arrow => Mealy automatonActivity-in-the-node => Moore automatonEvent is often called milestoneSpan time is also called duration or elapsed time.
9 PERT (Program Evaluation and Review Technique) PERT is an activity-on-the-arrow notationDeveloped in the 50s to plan the Polaris weapon system in the USA.Algorithm:Assign optimistic, pessimistic and most likely estimates for the span times of each activity.Compute the probability that the project duration will fall within specified limits.
10 2) Activity-in-the-node Diagram Notation A Node is either an activity or an event.Distinction: Events have span time 0ABCAtA = 0BtB = 2CtC = 0Event (Milestoneor Deliverable)Milestone boxes are often highlighted by double-linesSystem Designt = 2 weeksRADavailablet = 0SDDavailablet = 0
11 Example of an Activity-in -the -Node Diagram Startt = 0Endt = 0Activity 3t3 = 1Activity 4t4 = 3Activity55 = 2
12 What do we do with these diagrams? Compute the project durationDetermine activities that are critical to ensure a timely deliveryAnalyse the diagramsto find ways to shorten the project durationTo find ways to do activities in parallel2 techniques are usedForward pass (determine critical path)Backward pass (determine slack time)The critical path is the sequence of activities that take the longest time to complete. Let’s take a more precise look, let’s define critical path and slack time
13 Definitions: Critical Path and Slack Time A sequence of activities that take the longest time to completeThe length of the critical path(s) defines how long your project will take to complete.Noncritical path:A sequence of activities that you can delay and still finish the project in the shortest time possible.Slack time:The maximum amount of time that you can delay an activity and still finish your project in the shortest time possible.
14 Example of a critical path Activity 2t2 = 1Startt = 0Activity 1t1 = 5EndActivity5t5 = 2Critical path in bold faceActivity 1t1 = 5Startt = 0Endt = 0Activity 3t3 = 1Activity 4t4 = 3Activity55 = 2
15 Analizing Dependency Graphs Determination of critical pathsDetermination of slack times
16 Analizing Dependency Graphs Determination of critical pathsCompute earliest start and finish dates for each activityStart at the beginning of the project and determine how fast you can complete the activites along each path until you reach the final project milestone.Also called forward path analysisDetermination of slack timesStart at the end of your project, figure out for each activity how late it can be started so that you still finish the project at the earliest possible date.Also called back path analysis
17 Definitions: Start and Finish Dates Earliest start date:The earliest date you can start an activityEarliest finish date:The earliest date you can finish an activityLatest start date:The latest date you can start an activity and still finish the project in the shortest time.Latest finish date:The latest date you can finish an activity and still finish the project in the shortest time.
18 Computing Start and Finish Times To compute start and finish times, we apply 2 rulesRule 1: After a node is finished, we can proceed to the next node(s) that is reachable via a transition from the current node.Rule 2: To start a node all nodes must be complete from which transitions to that node are possible.
19 Summary: Analyzing Dependency Diagrams Forward pass: Goal is the determination of critical pathsCompute earliest start and finish dates for each activityStart at the beginning of the project and determine how fast you can complete the activites along each path until you reach the final project milestone.Backward pass: Goal the determination of slack timesCompute latest start and finish dates activityStart at the end of your project, figure out for each activity how late it can be started so that you still finish the project at the earliest possible date.Rules for computing start and finish timesRule 1: After a node is finished, proceed to the next node that is reachable via a transition from the current node.Rule 2: To start a node all nodes must be complete from which transitions to that node are possible.
20 Forward Path Analysis Project Duration = 7 Activity 3tA = 1Activity 4tA = 3Activity 2t2 = 1Startt = 0Activity 1t1 = 5EndActivity5t5 = 2Activity 2t2 = 1Project Duration = 7Activity 3t3 = 1Activity 4t4 = 3Activity Earliest Start(ES) Earliest Finish(EF)A1 Start of week 1 End of week 5A2 Start of week 6 End of week 6A3 Start of week 1 End of week 1A4 Start of week 2 End of week 4A5 Start of week 6 End of week 7
21 Backward Path Analysis Activity 3tA = 1Activity 4tA = 3Activity 2t2 = 1Startt = 0Activity 1t1 = 5EndActivity5t5 = 2Activity 2t2 = 1Project Duration = 7Activity 3t3 = 1Activity 4t4 = 3Activity Latest Start(LS) Latest Finish(LF)Now we have the project duration, we can determine the latest start and finish timesA End of week 5A4 End of week 5Start of week 1A End of week 7Start of week 7A3 End of week 2Start of week 2Start of week 3A End of week 7Start of week 6
22 Computation of slack times Slack time ST of an activity A:STA = LSA - ESAExample: STA4 = ?STA4 = = 1Slack times on the same path influence each other.Example: When Activity 3 is delayed by one week, activity 4 slack time becomes zero weeks.With the results of the forward and backward analysis we can determine the slack timesSTA = LSA-ESA Subtract the earliest start date from the latest start date for each activityActivity 3tA = 1Activity 4tA = 3Activity 2t2 = 1Startt = 0Activity 1t1 = 5EndActivity5t5 = 2t4 = 3ActivityA1A2A3A4A5Slack time1
23 Path types in dependency graphs Critical path: Any path in a dependency diagram, in which all activities have zero slack time.Noncritical path: Any path with at least one activity that has a nonzero slack time.Overcritical path: A path with at least one activity that has a negative slack time.Overcritical paths should be considered as serious warnings: Your plan contains unreal time estimates
24 Path types in dependency graphs 2 Any dependency diagram with no fixed intermediate milestones has at least one critical path.A project schedule with fixed intermediate milestones might have no critical pathExample:The analysis review must be done 1 month after project startThe estimated time for all activities before the review is less than 4 weeks.
25 Frequently used formats for dependency graphs Milestone View:A table that lists milestones and the dates on which you plan to reach them.Activities View:A table that lists the activities and the dates on which you plan to start and end themGantt chart View:A graphical illustrating on a timeline when each activity will start, be performed and end.Combined Gantt Chart and Milestone View:The Gantt Chart contains activities as well as milestones.Milestone View is also often called the “Key-Events report”:
26 Milestone View (Key-Events Report) Date MilestoneAugust Project Kickoff (with Client)October Analysis ReviewOctober System Design ReviewNovember 7 Internal Object Design ReviewNovember Project Review (with Client)Nov Internal Project ReviewDec Acceptance Test (with Client)Good for introduction of project and high executive briefings
27 Activities View Date Project Phases Jul 17-Aug 23 Preplanning Phase Aug 26 - Sep 24 Project PlanningSep 11-Oct 8 Requirements AnalysisOct 9 - Oct System DesignOct 28-Nov Object DesignNov 8 - Nov 20 Implementation & Unit TestingNov 22 - Dec 4 System Integration TestingDec 4 - Dec 10 System TestingDec 11- Dec Post-Mortem PhaseGood for SPMP Section 5.5 and during developer meetings
28 Gantt Chart Easy to read Activity 1 Activity 2 Activity 3 Activity 4 1234567Easy to readTime (in weeks after start)
29 with milestones Gantt Chart Good for reviews Project Start Activity 1 Design ReviewActivity 4Activity 5Project Finish1234567Good for reviewsTime (in weeks after start)
30 Two Types of Gantt Charts Person-Centered ViewTo determine people‘s task loadActivity-Centered ViewTo identify teams working together on the same tasksTimeJoeMaryTobyClaraA1A3A2TimeJoe, TobyA1A2A3JoeClara, Toby, JoeJoe has the most to do. The manager should probably assign one of Joes tasks to Mary
31 Which view should you use? Milestone view:Good for introduction of project and high executive briefingsActivity view:Good for developer meetingsGantt Chart Views: Base the view on the WBS structure and on the experience of the participantsManaging experienced teams: use a person-centered viewManaging beginners: use an activity oriented viewIn General : Choose one view, stay with it.
32 Tools support Microsoft Project : PERT, Gantt, Milestone/Gantt Charts WindowsDemo:Fast Track: GanttMultiplatform: Windows, Macintosh, PalmDemo:Shared Plan: PERT, Gantt, Milestone/Gantt ChartsMultiplatform: Windows, Macintosh, LinuxCompatible with Microsoft ProjectDemo:Merlin: Gantt Charts, MindmapsMacosXDemo:Many products available. ExamplesTool support forGraphical user interface for entering activity dataAutomatic computation of critical pathsMultiple views (PERT, Gantt, table views) and switching between these viewsTool use and training beyond the scope of this class
33 Scheduling Heuristics How to develop an initial project scheduleHow to shorten the project durationMistakes made during preparation of schedulesThe danger of fudge factorsHow to identify when a project goes off-track (actual project does not match the project plan).How to become a good software project manager
34 How to develop an Initial Project Schedule Identify all your activities (reuse a template if possible)Identify intermediate and final dates that must be metAssign milestones to these datesIdentify all activities and milestones outside your project that may affect your project’s scheduleIdentify “depends on” relationships between the activitiesDraw a dependency diagram for the activities and relationshipsDetermine critical paths and slack times of noncritical paths.Example:Establish a schedule for system integration testingFrom: Bruegge&Dutoit 2003, Chapter 9 Testing
35 Developing a Schedule for Integration Testing Five Steps:1. Start with System Decomposition2. Determine your Integration Testing Strategy3. Determine the Dependency Diagram4. Add Time Estimates5. Visualize the activities on a time scale: Gantt Chart
37 2. Determine Your Integration Testing Strategy There are many different integration testing strategiesWe choose sandwich testingSandwich testing requires 3 layersReformulate the system decomposition into 3 layers if necessaryIdentification of the 3 layers and their components in our exampleTop layer: ATarget layer: B, C, DBottom layer: E, F, GWe choose sandwich testing. Why?It allows many parallel testing activities, possibly shortening testing time
38 3. Determine the Dependency Diagram (UML Activity Diagram) Target layer components: B, C, D
42 What do we cover now? How to develop an initial project schedule How to shorten the project durationMistakes made during preparation of schedulesThe danger of fudge factorsHow to identify when a project goes off-track (actual project does not match the project plan).How to become a better software project manager
43 How to reduce the planned project time Recheck the original span time estimatesAsk other experts to check the estimatesHas the development environment changed? (batch vs interactive systems, desktop vs laptop development)Consider different strategies to perform the activitiesConsider to Buy a work product instead of building it (Trade-off: Buy-vs-build)Consider extern subcontractor instead of performing the work work internally
44 How to reduce the planned project time 2 Hire more experienced personnel to perform the activitiesTrade-off: Experts work fast, but cost moreTry to find parallelizable activites on the critical pathContinue coding while waiting for the results of a reviewRisky activity, portions of the work may have to be redone.Develop an entirely new strategy to solve the problem
45 Typical Mistakes when Developing Schedules The „Backing in“ MistakeUsing Fudge Factors
46 The “Backing in” Mistake Definition “Backing In”:You start at the last milestone of the project and work your way back toward the starting milestone, while estimating durations that will add up to the amount of the available timeProblems with Backing in:You probably miss activities because your focus is on meeting the time constraints rather than identifying the required workYour span time estimates are based on what you allow activites to take, not what they actually requireThe order in which you propose activities may not be the most effective one.Instead, start with computing all the required times and then try to shorten the project duration
47 Using Fudge Factors Fudge factor: A fudge factor is the extra amount of time you add to your best estimate of span time “just to be safe”.Example: Many software companies double their span time estimates.Don’t use fudge factors!If an activity takes 2 weeks, but you add a 50% fudge factor, chances are almost zero that it will be done in less then 3 weeks.Reason: Parkinson’s lawParkinson formulated this law for project completion:Work tends to expand to fill the time allotted for it.To deal with this phenomen, an experienced project manager introduces a fudge factor.
48 Heuristics for dealing with Time 1. First set the Project Start Time =>Determines the planned project timeDetermine the critical path(s)2. Then try to reduce the planned project timeIf you want to get your project done in less time, you need to consider ways to shorten the aggregate time it takes to complete the critical path.Avoid fudge factors
49 Identifying When a Project Goes Off-Track Determine what went wrong: Why is your project got off track?Behind scheduleOverspending of resource budgetsNot producing the desired deliverablesIdentify the reasonsIdentify the Reason(s):You are new on the job, this is your first project, and you made mistakesKey people left the teams or new ones are joining itKey people lost interest or new ones entered the pictureThe requirements have changedNew technology has emergedThe business objectives have changedOrganizational priorities have shifted (for example after a merger)
50 Heuristics to get a project back on track Reaffirm your planReaffirm your key peopleReaffirm your project objectivesReaffirm the activities remaining to be doneReaffirm roles and responsibilitiesRefocus team direction and commitmentRevise estimates, develop a viable scheduleModify your personnel assignmentsHold a midproject kickoff sessionClosely monitor and control performance for the remainder of the projectGet practical experience
51 What makes a Software Project successful? User involvementSupport from upper managementClear Business ObjectivesExperienced Project Manager 15Shorter project phases („Small milestones“) 10Firm core requirements („basic requirements“)Competent StaffProper PlanningOwnershipOther100 %Source: Standish Group 1998
52 Become a better software project manager End User and Management involvement %Learn how to involve the customer and end usersLearn how to get support from your upper managementPractice project management %Do as many projects as possibleLearn from your project failuresFocus on business objectives and requirements %Distinguish between core, optional and fancy requirements
53 How to become a better project manager Don’t assume anythingTake the time to find out the facts.Use assumptions only as a last resort.With every assumption comes a risk that you are wrong.Communicate clearly with your people.Being vague does not get your more leeway, it just increases the chances for misunderstanding.Acknowledge good performanceTell the person, the person’s boss, team members, peers.View your people as allies not as adversariesFocus on common goals, not on individual agendas.Make people comfortable by encouraging brainstorming and creative thinkingBe a manager and a leaderDeal with people as well as to deliverables, processes and systems.Create a sense of vision and excitement.
54 Additional Readings[IEEE Std 1058] Standard for Software Project Management PlansStanley E Portny, Project Management for Dummies, Hungry Minds, 2001, ISBN XStandish Group: Chaos, Sample Research Paper, 1998[Royse 1998], Software Project Management, Addison-Wesley, ISBN
55 SummaryDependency Graph: Identification of dependency relationships between activities identified in the WBSSchedule: Dependency graph decorated with time estimates for each activityCritical path and slack timeForward and Backward Path AnalysisPERT: One of the first techniques proposed to analyse complex dependency graphs and schedulesGantt Chart: Simple notation used to visualize a schedule
56 Summary: Another view:-) Developing a project plan is is an art. Practice it!Use project templates for yourself or your organization, build these templates iterativelyStart with a WBSA dependency graph is the WBS plus dependencies.A schedule is a dependency graph plus time estimatesThe detailed planning horizon should not got beyond a 3 month time frameBudget should not be specified before the work is clear:If the preplanning phase needs a budget, ask for a separate budgetAlways be prepared for surprises
57 Example: Spider Clouds on Mt McKinley Spider clouds above the West Buttress, meaning bad weather.McKinley generates its own weather, blizzards at the summit while it is nice at base camp, are not uncommon.When you see these clouds, you wait out one or more extra days, no matter what your schedule is.
59 Sandwich TestingSandwich testing combines top-down and bottom-up testingTop-down testing tests the top layer incrementally with the components of the target layerBottom-up testing tests the bottom layer incrementally with the components of the target layerModified sandwich testing is more thoroughIndividual layer testsTop layer test with stubs for target layerTarget layer test with drivers and stubs replacing top and bottom layersBottom layer test with a driver for the target layerCombined layer testsTop layer access the target layerTarget layer accesses bottom layer
60 West ButtressDescription: Route follows the winding Kahiltna Glacier to a large basin, where 2,000 feet of climbing yields the West Buttress.Ascent to Denali Pass, from which the final ascent is made.Rating Alaska Grade 2This route has the reputation of being an easy climb,but its steep grade, severe weather, and numerous crevasses demand caution and respVery dangerous is the denali pass, where many people have died on the descent after successfully clmbingThe summit. However, the route below 18,200-foot Denali Pass is not the deadliest place on McKinley.That dishonor belongs to the Upper West Rib, on the southwest side of the mountain,where 16 people have died since 1972, including 15 climbers who fell to their deaths.
61 West RibDescription Provides a direct route to the summit. The short, steep ascent requires only 3 miles of climbing, compared to 17 miles for the normal route on the West Buttress.The route is steep (including short sections of up to 60-degree ice), but otherwise poses few serious technical difficulties.Rating Alaska Grade 4Picture: My own.Description from :The West Rib was first climbed June 19, 1959 by the Jackson Hole climbers, Sinclair, Breitenbach, Corbet, and Buckingham.
62 Cassin RidgeDescription This is a direct, 9,000-foot granite ridge up the South Face to McKinley's summit.The route includes 40- to 65-degree snow and ice climbing, and up to 5.8 rock on several pitches below 16,400 feet.Rating Alaska Grade 6First ascent in 1961: An Italian party led by Ricardo Cassin is the first to summit McKinley via the Cassin Ridge.The crux: The chimney after the Japanese Couloir.Grade V.Picture from FromDescription from
63 Difficulty of Upper West Rib (Denali 6190m. Alaska) ALLEVATION: 6,194 mROUTE:Upper West Rib, Alaska Grade III, 4000 m (13,000’) elevation gain, 49,6 Kilometer (31 miles)Duration: days Given a Grade IV, the Upper West Rib is considerably more difficult than the West Buttress due to the steeper terrain and awesome exposure , ice and snow and mixed terrain characterize the Rib's upper face.Summit day is a big push from 16,300' and requires a significant amount of fortitude and stamina.Unique to Denali's rating system is an implied severity grade that makes any route a serious undertaking.High altitude, extreme weather, and active glaciation combine to make Denali one of the most difficult and severe mountains in the world to climb.
64 Cassin Ridge The crux: The chimney after the Japanese Couloir. Grade V FromFrom
65 Leadership and Team Work From Successful expeditions are properly equipped, have the necessary skills, but most importantly they learn to become a strong team.Leadership reflects the art of effective team building. From base camp to advanced base camp (ABC) your instructors teach classes and initiate you to the expectations of un-supported expedition life.Above ABC all the way to the summit is the testing phase and a place to show signs of strength: tight camps, efficient travel techniques, and a positive attitude.We expect you to stay organized, participate fully, have fun and support the goal of being on a strong and safe expedition.
66 Leadership and Team Work 2 FromOf primary importance is taking responsibility for monitoring yourself; you know best how you feel, how you sleep, how you recover each day.As a team, we are able to help if someone is having a bad day and communicates this.Every member must ultimately be a regular contributor for the expedition to be successful.Not participating, or failing to meet the day-to-day demands may mean your departure from the expedition.We expect you to have self-leadership skills and good expedition behavior (EB): be supportive, solution-oriented, hard working, patient, and take initiative and you will be rewarded with the climb of a lifetime.
Your consent to our cookies if you continue to use this website.