Software lifecycle CS 351 Software Engineering AY 2004

  • Slides: 26
Download presentation
Software lifecycle CS 351 - Software Engineering (AY 2004)

Software lifecycle CS 351 - Software Engineering (AY 2004)

Software lifecycle “student view” Design & Specification Coding >90% <10% Testing (optional) Hand it

Software lifecycle “student view” Design & Specification Coding >90% <10% Testing (optional) Hand it in CS 351 - Software Engineering (AY 2004) 2

Comments • • The “student lifecycle model” clearly has many limitations: – It doesn’t

Comments • • The “student lifecycle model” clearly has many limitations: – It doesn’t always earn you the grades you want. – It doesn’t scale. – You have little assurance of quality – somewhat of an issue for paying customers! – It isn’t consistent. We need a better model, a better process to follow, to give us a chance of delivering quality code in a timely manner. CS 351 - Software Engineering (AY 2004) 3

Software production process models • • Ad–hoc approach: “Code and Fix” – intuitive “model”

Software production process models • • Ad–hoc approach: “Code and Fix” – intuitive “model” – undesirable even for small tasks Build first version – impossible for large tasks Many formal process models exist Modify until – Waterfall Model Client is satisfied – Spiral Model – Prototyping/Evolutionary Model Operations mode Development Maintenance CS 351 - Software Engineering (AY 2004) Retirement 4

Waterfall model – overview • • A process model addresses these questions: – What

Waterfall model – overview • • A process model addresses these questions: – What shall we do next? – How long shall we continue to do it? A framework for software development methodology Clearly identifies – Deliverables – Standards Waterfall model provides a sequential, linear flow between phases CS 351 - Software Engineering (AY 2004) 5

Minimal waterfall model Analysis Design Code Testing Maintenance CS 351 - Software Engineering (AY

Minimal waterfall model Analysis Design Code Testing Maintenance CS 351 - Software Engineering (AY 2004) 6

Waterfall model – requirements stages • • Feasibility study – Cost/benefit analysis – Needs

Waterfall model – requirements stages • • Feasibility study – Cost/benefit analysis – Needs understanding of problem – Deliverable - a feasibility study document • Costs alternative solutions Requirements – Analysis • Functionality etc of software – Specification document • “Contract” between customer and software engineers • Complete, precise, modifiable • Specifies – Functional requirements – Non-functional requirements – Development and maintenance procedures CS 351 - Software Engineering (AY 2004) 7

Waterfall model – final stages • • • Design and specification – Modules •

Waterfall model – final stages • • • Design and specification – Modules • Preliminary and detailed design – Deliverable - design specification document – Standards Coding and module testing – Deliverable - tested modules – Standards for coding and testing, quality control Integration and system testing – Delivers running application - alpha tested within organization CS 351 - Software Engineering (AY 2004) 8

Waterfall model – final stages • Delivery and maintenance – Beta testing then product

Waterfall model – final stages • Delivery and maintenance – Beta testing then product delivery – Maintenance • Problems – Time between requirements and maintenance phases – Integrating changes into correct phases CS 351 - Software Engineering (AY 2004) 9

Detailed waterfall model Requirements Verify Changed Requirements Verify Specification Verify Planning Verify Development Maintenance

Detailed waterfall model Requirements Verify Changed Requirements Verify Specification Verify Planning Verify Development Maintenance Design Verify Implementation Test Integration Test Operations Mode Retirement CS 351 - Software Engineering (AY 2004) 10

Waterfall model – example/analysis • • Documentation, verification and management – “Document driven" –

Waterfall model – example/analysis • • Documentation, verification and management – “Document driven" – Quality control: reviews, walk-throughs and inspections – Management: methodology, configuration and personnel Analysis – Linear, rigid, monolithic – Disciplined – Disadvantages • Commitments too early • Rigidity and linearity make feedback difficult • Change often achieved as a "fix": distorts maintenance phase • Somewhat bureaucratic CS 351 - Software Engineering (AY 2004) 11

Waterfall model - reality Requirements analysis System design Maintenance Program design Delivery System testing

Waterfall model - reality Requirements analysis System design Maintenance Program design Delivery System testing Program implementation Integration testing Unit testing CS 351 - Software Engineering (AY 2004) 12

Rapid prototyping model Rapid Prototyping Verify Changed Requirements Verify Specification Verify Planning Verify Development

Rapid prototyping model Rapid Prototyping Verify Changed Requirements Verify Specification Verify Planning Verify Development Maintenance Design Verify Implementation Test Integration Test Operations Mode Retirement CS 351 - Software Engineering (AY 2004) 13

Evolutionary model Requirements Verify Specification Verify Planning Verify Development Maintenance Architectural design Verify For

Evolutionary model Requirements Verify Specification Verify Planning Verify Development Maintenance Architectural design Verify For each build: perform detailed design, implementation and integration. Test. Deliver to client Operations Mode Retirement CS 351 - Software Engineering (AY 2004) 14

Evolutionary model • • • Incremental development to – Deliver partial functionality early (non-monolothic)

Evolutionary model • • • Incremental development to – Deliver partial functionality early (non-monolothic) – Provide feedback on requirements May be associated with incremental delivery – Delivered increment is a product – User provides feedback for design of next increment Approach may be combined with waterfall model – During implementation phases • Requirements document identifies subsets • Allowance for later change – At all stages • Finer grained application of waterfall model to each increment CS 351 - Software Engineering (AY 2004) 15

Evolutionary model – prototyping • • • Prototyping – “Throw-away” • Build system once

Evolutionary model – prototyping • • • Prototyping – “Throw-away” • Build system once - as basis for understanding requirements • Discard and rebuild – Build-upon • Iterative process – Decide objectives of prototype – Plan, build and document prototype – Evaluate prototype • Eventually refine into a completed system Provides feedback on requirements and functionality Facilitates understanding of requirements and interfaces Flexible Inherently less disciplined - needs careful management CS 351 - Software Engineering (AY 2004) 16

Evolutionary model – prototyping Specification Implementation & Integration Design Specification Design . . .

Evolutionary model – prototyping Specification Implementation & Integration Design Specification Design . . . Specification Deliver to client Design Build 1 Deliver to client Implementation & Integration Build 2 Deliver to client Build 3 . . . Implementation & Integration Deliver to client Build n Specification team Design team Implementation/integration team CS 351 - Software Engineering (AY 2004) 17

Spiral model Integration Implementation Design Planning Specification Risk Rapid analysis prototype Risk R. A.

Spiral model Integration Implementation Design Planning Specification Risk Rapid analysis prototype Risk R. A. Verify analysis Verify Risk Verify analysis CS 351 - Software Engineering (AY 2004) 18

Spiral model • • • A Meta–model really – Any of the other process

Spiral model • • • A Meta–model really – Any of the other process models can be used with it Cyclic, not linear Attempts to identify risks Usually coupled with prototyping Each “turn” around the spiral resolves more risks and (possibly) yields a prototype CS 351 - Software Engineering (AY 2004) 19

Spiral model – prototyping CS 351 - Software Engineering (AY 2004) 20

Spiral model – prototyping CS 351 - Software Engineering (AY 2004) 20

Is it worth it? • Estimates for a 200, 000 line data processing product:

Is it worth it? • Estimates for a 200, 000 line data processing product: CMM Level Level • • 1 2 3 4 5 Duration Effort (months) (person months) 29. 8 593. 5 18. 5 143. 0 15. 2 79. 5 12. 5 42. 8 9. 0 16. 0 Faults detected during to client development 1348 61 328 12 182 7 97 5 37 1 Faults delivered of and installed $5, 440, 000 $1, 311, 000 $728, 000 $392, 000 $146, 000 Total cost development CMM = Capability Maturity Model CMM is a measure of an organizations ability to follow a process and refine it to suit that organization’s activities. It is covered in more detail in CS 460. CS 351 - Software Engineering (AY 2004) 21

Observations • • • We need to understand the software development lifecycle and have

Observations • • • We need to understand the software development lifecycle and have a process in place to help us deliver software on-time and within budget. Error rates and cost of development decrease the more we understand the software process. While discussion on requirements gathering etc is defered until CS 460, we can certainly do a great deal to improve our own software by understanding what we do when we build software systems. As individuals, we most likely follow one of the lifecycle models described earlier – or a hybrid of one or more of the models. We may skip some steps, we may not pay sufficient attention to some aspects. CS 351 - Software Engineering (AY 2004) 22

Our behavior • • A better understanding of our personal behavior will help us

Our behavior • • A better understanding of our personal behavior will help us fit into a team environment better, and will help us deliver higher quality code. To understand what we do, we must objectively assess what we do. – This is difficult as we first have to overcome our belief that we are doing everything correctly. – We have to examine what we do and constantly ask “how can I improve? ” – We have to measure what we do in order to know if the changes we make are working, and to identify those aspects of our behavior that require change. CS 351 - Software Engineering (AY 2004) 23

Personal software process • • • We have already seen the personal software process

Personal software process • • • We have already seen the personal software process as a means to identify several of the common errors we make. You should apply the PSP to all code you write – not just for this subject. Over time you will gather the information on yourself that you need to see what needs improving. – It will then, of course, be up to you to address those deficiencies and improve. – You should continue to use the PSP to measure the success of your changes and to identify further areas for improvement. CS 351 - Software Engineering (AY 2004) 24

Journal • • • If addition to the use of the PSP, we also

Journal • • • If addition to the use of the PSP, we also recommend you need a journal. A journal is where you record all of your thoughts, design your algorithms, plan the testing strategy for these algorithms, make notes on the performance of your code, make notes on the kinds of errors you make, record how you ntend to rectify these deficiencies, … You record everything related to software development. You should throw nothing away. Ideally, the journal is a bound book with numbered pages. At regular intervals (every few months), you should read through your journal and look for trends, look for errors you regularly make, look for things you don’t understand. Once identified, plan a strategy to deal with these issues – record the plan in the journal and stick to it. CS 351 - Software Engineering (AY 2004) 25

Summary • • This course focuses on your personal ability to produce high quality

Summary • • This course focuses on your personal ability to produce high quality software. You should make observations in your journal of errors you make including: – Not fully understanding the requirements – Poor testing – Typical coding errors – Poorly designed interfaces – Integration issues These are all aspects of the software lifecycle If we can get things right as an individual, we have a better chance of getting things right in a team. CS 351 - Software Engineering (AY 2004) 26