1 Lecture 7 Project planning part 2 Effort and time estimation 22.2.2015
Lecture schedule 12.01 Introduction to the course and software engineering 19.01 Life-cycle/process models Project planning (part 1) 26.01 Scrum (part 1) 02.02 Requirement management 09.02 Version and configuration management 16.02 Scrum part 2. Roles of Scrum master, product owner. How to be use backlog as a RM tool. 23.02 Project planning (part 2): effort estimation 02.03 Modern practices Continuous Integration, Continuous Deployment, DevOps,.. 9.03 No lectures - exam week 2
Learning goals 3 Planning and agile The factors of time and effort Estimation techniques COCOMO II FISMA Division of work Distributed work
Structure of the lecture 4 A few points about project planning Effort estimation + budgeting
Estimates improve as the project progresses Picture 12.8 in Haikala&Mikkonen, 23.9 in Sommerville 5 Prestudy Requirement specification Architecture design Detailed design Implementation Real value
Plan-driven scheduling 6 Start with constraints. Make work breakdown structure Including dependencies Estimate efforts for tasks (e.g. days) best to take input from several people Check availability of resources Put to calendar Who, when Project planning tools help in mechanical work The challenge is the guessing in advance
Examples of constraints 7 Software must in in operational use 01.01.2016 3-man project Can use at least Ahto and halt of Teemu s time New version of database software is not available earlier than May 2015.
The tools often use Gantt Charts (Source: http://orgmode.org) 8
Iron triangle 9 Scope/features Resources Quality Time/ Schedule
Plan-driven vs Agile 10 Plan driven The order and timing of all events is planned in advance. The plan is updated during the work. Accuracy improves during the project. It is very hard to estimate effort in the beginning Agile Only major milestones (e.g. releases) planned in advance. Content of each sprint is planned just before the sprint according to current customer requirements In many Agile methods strict time-boxing drives the work Mini effort estimation in the beginning of every sprint
Problems with waterfall 11 Does not support division of the software to distinct stages It is difficult to take out and use partial functionality Difficult to respond to changing customer requirements Management and motivation challenges of developers Does not utilize full talent and motivation of talented and highly trained software developers Does not show trust and empowerment Usually, waterfall is considered suitable for projects where Requirements can be known in advance Milestone reviews and audits are needed for example by security standards, 19.1.2015 TIE-21100&21106/K.Systä
Agile manifesto February 2001 17 inventors We are uncovering better ways of developing software by doing it and helping others do it. Through this work we have come to value: Individuals and interactions over processes and tools Working software over comprehensive documentation Customer collaboration over contract negotiation Responding to change over following a plan That is, while there is value in the items on the right, we value the items on the left more. 19.1.2015 TIE-21100&21106/K.Systä 12
Iterative, agile Vendor research bid Planning Spec. imp test SW Planning imp test SW Planning imp test SW Planning imp test Deploym. Planning spec. SW SW SW Deploym. Tender call Bid a. Customer 13 19.1.2015 TIE-21100&21106/K.Systä
Planning in Scrum 14 Goal setting 24 hours Planning Sprint goal Estimation Sprint 2-4 weeks Sprint backlog Commitment Estimation Risk analysis Go / no-go decision Resource allocation
15 EFFORT ESTIMATION
Availability and contribution 16 (NOTE: assume detailed planning, but these things should always be remembered) We need to know contribution of all members (typically assume 5 days a week) Reduce vacations, training, responsibilities on other projects Reserve time for surprising tasks Reduce non-productive work (admin, meetings, travel) The remaining productive work should be used in remaining planning
Estimation of available effort 17 100 % 90 % 80 % 70 % 60 % 50 % 40 % 30 % Remaining Holidays Other proj. Admin 20 % 10 % 0 % 1 2 3 4 5 6 7 8 9 10 11 12
Partitioning of the project 18 Impossible to partition Easy to partition People What one programmer can do in a day, two programmers can also do in day. A man's got to know his limitations. -- Dirty Harry.
Consequence 19 Cost Time is expensive! Minimum cost Time Minimum time
But time is also money 20 (From an imaginary example from a keynote by professor Jan Bosch) In company X R&D is 10% of revenue, e.g. 100M for a 1B$ product New product development cycle: 12 months Alternative 1: improve efficiency of development with 10% => 10 M reduction in development cost Alternative 2: reduce development cycle with 10% => 100M add to top line revenue (product starts to sell 1.2 months earlier)
Structure of the lecture 21 A few points about project planning Effort, resources and time don t have linear dependencies Effort estimation + budgeting
Effort estimation 22 Necessary for planning: timetable and budget Factors Complexity of the software often hard to know in advance Productivity of the team Skills Experience Spirit Required quality Timetable (recall previous slides)
Why so difficult 23 Productivity of individuals vary (10-times is not rare) And team dynamics make situation event more complex The exact requirements are seldom known Plan driven: customer changes mind => plan is changed Agile: replanning for each sprint Required implementation effort for each requirement Especially if nothing similar has been done earlier Surprising technical problems often appear
why so difficult 24 Too many unknowns Wishful thinking Too much self-confidence People have their own agendas For example sales want to win the deal (Too often the worst estimate wins!) Too complex and big system under estimation Lack of historical data
Methods for effort estimation 25 Planning poker Cocomo (constructive cost model) will be described today FPA (function point analysis) Use your experience and historical data Collect information for next projects
Planning poker - what 26 Often used in agile projects Collects and combines understanding from several participant. Developers are very involved [K. Molokken-Ostvold, N.C. Haugen] More accurate and less optimistic than mechanical methods to combine individual estimates Competes with expert estimation
Planning poker - how 27 Participants get a deck of cards with numbers Often Fibonacci series 0, 1, 2, 3, 5, 8, 13 Somebody present the task to be estimated Everybody shows a card that describes his or her opinion about the effort The cards are shown synchronously (at the same time) Those who are different from common opinion defend their view As long as there are different opinions repeat
Cards for planning poker 28
Background and disclaimer 29 DO NOT PANIC Effort estimation is a profession of its own Here we zoom in to some advanced estimation models to get an idea what they are composed of. You do not need learn how to use them in practice only to get an idea what they are
General model 30 Size Productivity Environment Number on lines # of function points # of classes. Skills Experience Motivation. Technologies Timetable. (# of lines / day)
Simple formula from Sommerville 31 Effort = A Size B M A is a constant that represent local practices and type of the software Size is size, e.g., in function point B is in between 1 and 1.5 and reflects the fact that size do not affect linearly the effort M is multiplier combining process, product and organizational aspects
COCOMO 32 First version about n. 1980. Our material is based on COCOMO-II Input: Size of the product (SLOC, source lines of code) Scaling factors of the whole product Cost drivers for different parts of the project, about properties of Product Development methods, tools etc Developers Project Outcome Effort Calendar time Four submodels: application composition, early design, reuse, and post-architecture
COCOMO-II levels 33 Early prototyping level Based on object points Simple formula Early design As the name says this approach is used when only draft design of the system exists Based on function points that are then translated to lines of source code (LOC) Post-architecture After architecture design has finalized, a more accurate estimation can be done Based on LOC
Early prototype 34 PM = ( NOP (1 - %reuse/100 ) ) / PROD PM is the effort in person-months NOP is the number of object points PROD is the productivity
Early design 35 Early design Estimates made after requirements confirmed PM = A Size E πem i A = 2.5 in initial calibration (Boehm proposes 2.94) Size given in KLOC E varies from 1.1 to 1.24 depending on novelty of project, development flexibility, risk management approaches, and process maturity E = 0.91 + 0.01 *( SF 1 + SF 2 + SF 3 + SF 4 + SF 5 ) EM i are coefficients (7 in early design and 17 in post design)
36 https://www.rose-hulman.edu/users/faculty/young/cs- Classes/csse372/201310/SlidePDFs/session12.pdf AN EXAMPLE AIRLINE SALES SYSTEM IS TO BE BUILT IN C. THIS IS A NEW PROJECT AND THE BACK-END DATABASE SERVER HAS BEEN BUILT.
Early prototype 37 At the early stage, we need 3 screens and 1 report: a booking screen to record a new advertising sale booking a pricing screen showing the advertising rate for each day and each flight an availability screen showing which flights are available a sales report showing total sales for the month and year, and comparing them with previous months and years Name Object Complexity Weight Booking Screen Simple 1 Pricing Screen Simple 1 Availability Screen Medium 2 Sales Report Medium 5 Total 9
Estimate 38 The assessment on the developers and the environment shows that the developers experience is very low (4) and the CASE tool is low (7). So, based on tables with data from real project we have a productivity rate of 5.5. According to COCOMO II, the project requires approx. PM = ( NOP (1 - %reuse/100 ) ) / PROD 1.64 (= 9/5.5) person-months.
Early design example 39 Name External user types Complexity FP Booking External output type Low 4 Pricing External inquiry type Low 3 Availability External inquiry type Medium 4 Sales External output type Medium 5 Converting to KSLOC in C (From published figures: 1 FP = 128 SLOC in C): Total 16 Estimated Size = 16 * 128 / 1000 = 2.048 KSLOC
Let s calculate 40 Name Precedente dness PM = A Size E M + πem i First E Very low (0.05) Thoroughly unpreceden ted Low (0.04) Largely unpreceden ted Flexibility Rigorous Occasional relaxation Significant risks eliminated Team interaction process Process maturity Little (20%) Very difficult Some (40%) Some difficult Nominal (0.03) Somewhat unpreceden ted Some relaxation Often (60%) Basically cooperative High (0.02) Generally familiar General conformit y Generall y (75%) Largely cooperati ve Very High (0.01) Largely familiar Some conformit y Mostly (90%) Highly cooperati ve Extra High (0.00) Thorough ly familiar General goals Full (100%) Seamless interactio ns Assess ment Valu e Very high 0.01 Very high 0.01 Nominal 0.03 High 0.02 Level 1 Level 2 Level 2+ Level 3 Level 4 Level 5 Low 0.04 Add 1.01 Total 1.13
41 Then EM i Identifier Name Ranges (VL EH) Assessment VL/L/N/H/VH/EH Values RCPX product Reliability and ComPleXity 0.5 1.5 low 0.75 RUSE required reusability 0.5 1.5 nominal 1.0 PDIF Platform DIFficulty 0.5 1.5 high 1.1 PERS PREX PERSonnel capability PeRsonnel EXperience 1.5 0.5 high 0.75 1.5 0.5 very high 0.65 FCIL FaCILities available 1.5 0.5 nominal 1.0 SCED SChEDule pressure 1.5 0.5 low 1.2 Product 0.4826
The verdict 42 The effort estimation of IIST airline sales system is: Effort = 2.45 (2.048) 1.13 0.4826 = 2.66 person-months
The post-design calculation 43 http://csse.usc.edu/tools/cocomoii.php PM Months
44 Phase Phase Effort (Personmonths) Effort (Personmonths) Schedule (Months) Schedul e (Months) Averag e Staff Inception 6.5 1.4 4.5 Elaboration 25.9 4.3 6.0 Construction 82.0 7.2 11.4 Transition 13.0 1.4 9.0 Average Staff Inception 4.5 2.5 1.8 Elaboration 18.1 7.5 2.4 Constructio n 57.4 12.4 4.6 Transition 9.1 2.5 3.6 Phase Phase Effort (Personmonths) Effort (Personmonths) Schedul e (Months ) Schedul e (Months) Average Staff Inception 4.5 1.9 2.4 Elaboration 18.1 5.7 3.2 Construction 57.4 9.6 6.0 Transition 9.1 1.9 4.7 Average Staff Inception 4.5 3.1 1.5 Elaboration 18.1 9.2 2.0 Construction 57.4 15.3 3.8 Transition 9.1 3.1 3.0
45 Scaling factors SF i Each factor estimated in a 6-level scale: very low, low, nominal, high, very high, extra high VL L N H VH EH Precedentedness 6.20 4.96 3.72 2.48 1.24 0.00 Development Flexibility 5.07 4.05 3.04 2.03 1.01 0.00 Architecture/Risk Resolution 7.07 5.65 4.24 2.83 1.41 0.00 Team Cohesion 5.48 4.38 3.29 2.19 1.10 0.00 Process Maturity 7.80 6.24 4.68 3.12 1.56 0.00 From those: E = 0.91 + 0.01 *( SF 1 + SF 2 + SF 3 + SF 4 + SF 5) ) F = 0.28 + 0.2 * (E 0.91)
Factors EM post design 46 Product VL L N H VH EH RELY Required Software Reliability 0,82 0,92 1,00 1,10 1,26 DATA Database Size 0,90 1,00 1,14 1,28 DOCU Documentation Match to Lifecycle Needs 0,81 0,91 1,00 1,11 1,23 CPLX Product Complexity 0,73 0,87 1,00 1,17 1,34 1,74 RUSE Required Reusability 0,95 1,00 1,07 1,15 1,24 Platform 1,00 TIME Execution Time Constraint 1,00 1,11 1,29 1,63 STOR Main Storage Constraint 1,00 1,05 1,17 1,46 PVOL Platform Volatility 0,87 1,00 1,15 1,30 Personnel 1,00 ACAP Analyst Capability 1,42 1,19 1,00 0,85 0,71 APEX Applications Experience 1,22 1,10 1,00 0,88 0,81 PCAP Programmer Capability 1,34 1,15 1,00 0,88 0,76 PLEX Platform Experience 1,19 1,09 1,00 0,91 0,85 LTEX Language and Tool Experience 1,20 1,09 1,00 0,91 0,84 PCON Personnel Continuity 1,29 1,12 1,00 0,90 0,81 Project 1,00 TOOL Use of Software Tools 1,17 1,09 1,00 0,90 0,78 SITE Multisite Development 1,22 1,09 1,00 0,93 0,86 0,80 SCED Required Development Schedule 1,43 1,14 1,00 1,00 1,00 Schedule Compression Percentage 0,75 0,85 1,00 1,30 1,60
Yet another example 47 Compiler for a Pascal-language (Language from history books) 50000 source code lines Skillful develops New HW platform Assume normal scaling factors E = 0.91 + 0.01 *(3.72+3.04+4.24+3.29+4.68 ) ) = 1.1 F = 0.28 + 0.2 * (E 0.91) = 0.32 Cost factor personnel&project-factor are VH, other N PM ns = 2.94 * 50 1.1 * 0.71*0.81*0.76*0.85*0.84*0.81*0.78*0.86 =~37person months TDEV NS = 3.67 * 37 0.32 = ~12monts, => 3 persons in one year If schedule is tighter, SCED increases effort. For example if SCED=VL TDEV decreases 25% (9 months), but effort raises to ~53PM I.e. 6 people for 9 months!
Background and disclaimer 48 DID YOU PANIC? Effort estimation is a profession of its own Here we zoom in to some advanced estimation models to get an idea what they are composed of. You do not need learn how to use them in practice only to get an idea what they are
49 AN OTHER APPROACH: FISMA
Function points 50 Wikipedia definition: A function point is a unit of measurement to express the amount of business functionality an information system (as a product) provides to a user. Should be (but result debated) independent from programming language Number of function points can be automatically measured from source code Number of function points can be estimated from (detailed) functional specification of the system
Estimation based of Function points (FiSMA) (Source: Pekka Forselius: Toimintopistelaskenta tuottavuuden todentajana) 51
Estimation based of Function points (FiSMA) 52 Situation multiplier (0.5-2.5) Q (quality) * tools * technology_maturity Reuse (0.7 1.5) Delivery rate measures how long it takes to deliver a funtion point
53
54 AND IT IS ALSO ABOUT MONEY
About budgeting with an arbitrary example 55 A small software company of 10 employee Fulltime manager; no admin personel Other employee do billable work 75% of the time Reasonable rotation: on average 1 person leaves and joins Salaries + compulsory side costs 1.6 * 3.5 k * 12 kk = ~67k Office, rents, equipment, supplies 50% 1.5 * 67k = 100k 10 employees => costs are ~1000k
example 56 Since managers work cannot be invoiced, 9 people generate the revenue. Due to rotation, sick leaves, etc, we use estimate 8. Thus the company can invoice: 8 * 1700 * 0.75 = ~10000 working hours minimum price for a working hour is 1000k / 10000 = 100 Working day costs 7.5 * 100 = 750 And year 1700 * 100 = 170k
example with speculations 57 The IIST airline sales system needs 2.66pm = 20 * 2.66 = 53 working days Costs 170*43 = 7300 and cost / line = 7300 / 2048 = ~3.5 / line Pascal compiler 37pm 20 * 37 * 170 = 127800 127800$ / 50000 = 2,5 / line
Google found me: http://discuss.joelonsoftware.com/default.asp?biz.5.467536.25 58 I'm at about $1,200 / kloc. About $26,500.00 per 1K of code for the year OK, so I guess thats $2,000 per kloc then.