Software Life Cycles Evolution Maintenance and Perpetual Development

  • Slides: 46
Download presentation
Software Life Cycles: Evolution, Maintenance, and Perpetual Development Dror Feitelson Software Engineering Hebrew University

Software Life Cycles: Evolution, Maintenance, and Perpetual Development Dror Feitelson Software Engineering Hebrew University

David Lorge Parnas Major contributor to information hiding and modularization Advocate of software development

David Lorge Parnas Major contributor to information hiding and modularization Advocate of software development as an engineering discipline “A sign that the Software Engineering profession has matured will be that Including good we lose our preoccupation documentation! with the first release and Opponent of “star wars” focus on the long term health of our products. ” Fellow of ACM, IEEE Software Aging, ICSE 1994

Textbook view: Maintenance Transfer Testing Construction Design Analysis Req's Software Lifecycle

Textbook view: Maintenance Transfer Testing Construction Design Analysis Req's Software Lifecycle

Req's Analysis Design Construction Testing Transfer Textbook view: Maintenance Transfer Testing Construction Design Analysis

Req's Analysis Design Construction Testing Transfer Textbook view: Maintenance Transfer Testing Construction Design Analysis Req's Software Lifecycle More realistic view: EVOLUTION, MAINTENANCE, AND ADDITIONAL RELEASES

Maintenance Transfer Testing Construction Design Analysis Textbook view: Req's Software Lifecycle Req's Analysis Design

Maintenance Transfer Testing Construction Design Analysis Textbook view: Req's Software Lifecycle Req's Analysis Design Construction Testing Transfer e h t f o 5% 7 “ a More realistic view: n i t r o eff t c e j o r p e r a softw ent on EVOLUTION, MAINTENANCE, is sp ” e c n a AND ADDITIONAL i. RELEASES n e t n a m

Meir (Manny) Lehman On team Building first computers in Israel in 1950 s Worked

Meir (Manny) Lehman On team Building first computers in Israel in 1950 s Worked at IBM studying OS/360 Professor at Imperial College London Received Harlan Mills award Passed away 29. 12. 10 in Jerusalem “Father of software evolution” Defined “E-type” systems that are ingrained with their environment Lehman's 8 Laws describe how such systems evolve

Lehman's Laws 1) Continuing change (adaptation) 2) Increasing complexity (unless refactored) 3) Self regulation

Lehman's Laws 1) Continuing change (adaptation) 2) Increasing complexity (unless refactored) 3) Self regulation (of rate of change) 4) Invariant work rate (inertia) 5) Conservation of familiarity (of users and developers) 6) Continuing growth (more features) 7) Declining quality (unless maintained) 8) Feedback system (at multiple levels)

All projects Terminating • Project defined by its goals • Requirements map to acceptance

All projects Terminating • Project defined by its goals • Requirements map to acceptance test • Develop-delivermaintain trajectory Evolutionary • Goals are uncovered as project progresses • Continue indefinitely as long as useful • Multiple releases along the way

All projects Terminating Evolutionary Staged model • Repeated cycles • Each one is planned

All projects Terminating Evolutionary Staged model • Repeated cycles • Each one is planned with well-defined goals Perpetual development • Plan as you go • Concurrent sub -projects • Fuzzy longterm goals

All projects Terminating Evolutionary Feasibility Three milestones Architecture Operational Single delivery Possible updates after

All projects Terminating Evolutionary Feasibility Three milestones Architecture Operational Single delivery Possible updates after ma intenanc e Staged model Multiple releases Perpetual development Continuous deployment

Timescales and Terminology Waterfall / unified process – Once – delivery Evolutionary development –

Timescales and Terminology Waterfall / unified process – Once – delivery Evolutionary development – Months Agile development Facebook Continuous deployment } Release – One day } Deployment – < Hour – Weeks Maintenance Evolution Requirements Feature requests

Perpetuity • Part of evolutionary development (and many agile and open source projects) •

Perpetuity • Part of evolutionary development (and many agile and open source projects) • New mindset: project will go on forever • Useless to make detailed long-range plans • Needs to be sustainable • Normal work rate • Initial development becomes progressively smaller part of the project • “Maintenance is 75% of investment” is meaningless

Evolution and Agile All software projects • Agile can be terminating • Agile implies

Evolution and Agile All software projects • Agile can be terminating • Agile implies a process Evolutionary/ perpetual may be processless e. g. Linux Terminating Evolutionary Perpetual Agile Staged

Staged Model • Each version passes conventional phases • E. g. full cycles of

Staged Model • Each version passes conventional phases • E. g. full cycles of Unified Process • New versions branch in parallel to maintenance Rajlich & Bennett, Computer 2000

size Perpetual Development Lifecycle l nt a i t e ini pm lo e

size Perpetual Development Lifecycle l nt a i t e ini pm lo e v de time

size Perpetual Development Lifecycle rel ea l nt a i t e ini pm

size Perpetual Development Lifecycle rel ea l nt a i t e ini pm lo e v de se Production use & maintenance time

size Perpetual Development Lifecycle rel ea l nt a i t e ini pm

size Perpetual Development Lifecycle rel ea l nt a i t e ini pm lo e v de se d t e nu en i t n pm o c elo feedback v e d & requests Production use & maintenance time

Perpetual Development Lifecycle rel size ea rel ea l nt a i t e

Perpetual Development Lifecycle rel size ea rel ea l nt a i t e ini pm lo e v de se se d t e Production use & maintenance nu en i t n pm o users c elo feedback v upgrade de & requests Production use & maintenance time

Perpetual Development Lifecycle rel size ea rel ea l nt a i t e

Perpetual Development Lifecycle rel size ea rel ea l nt a i t e ini pm lo e v de se se d t e nu en i t n pm o c elo feedback v e d & requests d t e Production use & maintenance nu en i t n pm o users c elo feedback v upgrade de & requests Production use & maintenance time

Perpetual Development Lifecycle rel ea rel size ea rel ea l nt a i

Perpetual Development Lifecycle rel ea rel size ea rel ea l nt a i t e ini pm lo e v de se se se d t e Production & maint. u en n i nt pm o users c elo feedback v upgrade de & requests d t e Production use & maintenance nu en i t n pm o users c elo feedback v upgrade de & requests Production use & maintenance time

Perpetual Development Lifecycle rel ea rel size ea rel ea l nt a i

Perpetual Development Lifecycle rel ea rel size ea rel ea l nt a i t e ini pm lo e v de se se se ed nt u tin me n co elop v e d d t e Production & maint. u en n i nt pm o users c elo feedback v upgrade de & requests d t e Production use & maintenance nu en i t n pm o users c elo feedback v upgrade de & requests Production use & maintenance time

Linux Example

Linux Example

“Linux is evolution, not intelligent design” -- Linus Torvalds

“Linux is evolution, not intelligent design” -- Linus Torvalds

Eric Raymond: The Cathedral and the Bazaar Planning and management Evolution

Eric Raymond: The Cathedral and the Bazaar Planning and management Evolution

Raymond’s Main Insights • Open-source developers are “scratching a personal itch”, so they know

Raymond’s Main Insights • Open-source developers are “scratching a personal itch”, so they know the requirements • Having real users leads to real feedback • “with enough eyeballs, all bugs are shallow” (Linus’s Law) • Users are co-developers, may come up with good ideas • “Release early, release often” leads to the most rapid progress

Linux Old Release Model

Linux Old Release Model

Linux Old Release Model • Distinction between versions • Production is stable • Development

Linux Old Release Model • Distinction between versions • Production is stable • Development is current • Distinction between releases • Minor production release for bug/security fixes • Minor development release every few days • A major release is a major operation taking months • Interval between major releases is long • Two years of delaying new features

Linux New Release Model (2. 6)

Linux New Release Model (2. 6)

Linux New Release Model (2. 6) • Only production versions are released • Development

Linux New Release Model (2. 6) • Only production versions are released • Development done separately in parallel • New version every 2 -3 months • • Merge window of 2 weeks ~2 months of stabilization and preparation Few minor releases as needed New merge window opened at time of release • Maintain some long-term versions for stability

Software Growth • Lehman’s Law I: Continuing change • Adapt to needs • Lehman’s

Software Growth • Lehman’s Law I: Continuing change • Adapt to needs • Lehman’s Law VI: Continuing growth • Add features • Code is rarely removed • Are you sure it is never needed? • Hard to figure out exactly what is not needed any more • Reluctance to throw away what took long to produce • Change is achieved by growth

Software Growth Lehman and Turski: A system's complexity grows with time It is harder

Software Growth Lehman and Turski: A system's complexity grows with time It is harder to modify a more complex system Assuming a constant effort per release, This leads to a diminished growth rate:

Software Growth Godfrey and Tu (2000): Linux (and other systems) is growing at a

Software Growth Godfrey and Tu (2000): Linux (and other systems) is growing at a super-linear rate

More Data 1994 to 2011 3541 l/d 78 x growth (29% annual) 1385 l/d

More Data 1994 to 2011 3541 l/d 78 x growth (29% annual) 1385 l/d Best models: Quad. -exponential Piecewise linear No theory 660 l/d

Growing Growth Rate • Possible explanation: Positive feedback • Successful project attracts more developers

Growing Growth Rate • Possible explanation: Positive feedback • Successful project attracts more developers • More developers produce more code • Suggests exponential growth • Contradicts Brooks’s Law (“adding manpower to a late project makes it later”) • System is modular so don’t need so much communication • Good information dissemination via mailing lists etc. • New developers are typically already experts, not novices

Complexity and Quality • Lehman’s Law II: Increasing complexity Ø Interactions between more and

Complexity and Quality • Lehman’s Law II: Increasing complexity Ø Interactions between more and more modules • Lehman’s Law VII: Declining quality Ø Harder to improve less satisfying • The tradeoff: Do it fast vs. do it right • The compromise: Technical debt Ø Fast-and-dirty = accumulate debt Ø Refactoring = pay off debt (with interest) Ø Cost-benefit decision of when (and if) to pay

Continuous Deployment Variant New software released in timescales of minutes, not days or weeks

Continuous Deployment Variant New software released in timescales of minutes, not days or weeks Each developer immediately deploys whatever he works on Based on passing a battery of automatic tests (unit + integration + regression) Requires strong framework to control releases and roll them back if needed Makes the whole notion of “a version” meaningless

Continuous Deployment Variant Popular mainly in web-based companies and applications Deploy to web site

Continuous Deployment Variant Popular mainly in web-based companies and applications Deploy to web site No need to download and install Immediately used by all Can be done at different granularities Facebook deploys front-end twice a day Amazon deploys update to some service every 11 seconds on average

Perpetual Development Benefits Lead time to first working version is short, and a working

Perpetual Development Benefits Lead time to first working version is short, and a working version is always available No danger of the project coming to nothing Real users doing real work are effectively brought into the development cycle Helps to test system functionality and find problems Used to prioritize further development according to what is really needed Ability to use new technology as it becomes available

Implications for Development No fixed goal that has to be reached Goal is to

Implications for Development No fixed goal that has to be reached Goal is to continually improve the system and maintain is usefulness Monitor system usage to identify inadequacies Prioritize Don't according to user needs plan too far ahead (YAGNI protection) Use contracts that take longevity into account Support Access for continued evolution to code if company becomes insolvent

Implications for Architecture Can't decide on architecture based on analysis of all the requirement

Implications for Architecture Can't decide on architecture based on analysis of all the requirement Need architecture that accommodates change Two tiers: stable core and evolving libraries Open system like e-commerce site based on web services Use refactoring May need to abandon project eventually But may still salvage parts for a followup project

Conservation of Familiarity Lehman's Law V of software evolution Limits the rate of progress

Conservation of Familiarity Lehman's Law V of software evolution Limits the rate of progress that can be sustained Need specialized tools to help new team members to become familiar with the system Newbies are at a disadvantage because they didn't see how the system developed Need to capture the history of design decisions

Explaining Monumental Failures caused by "feature creep" Developers made elaborate and beautiful plans But

Explaining Monumental Failures caused by "feature creep" Developers made elaborate and beautiful plans But these plans were obsolete by the time they were completed Do exactly what is most needed at each instant Failures caused by successful maintenance Delivered system was good for a very long time But when it is to be replaced, an attempt is made to do too much at once Make improvements continuously all the time

Experimental Evidence Experiment conducted by the World Wide Consortium for the Grid (W 2

Experimental Evidence Experiment conducted by the World Wide Consortium for the Grid (W 2 COG) The goal: develop a secure service-oriented architecture system Traditional approach: standard government acquisition process Alternative: use a "Limited Technology Experiment" based on evolutionary methods Both start with same government supplied software baseline

18 Months Later. . . Traditional: Evolutionary: A concept document with no functional architecture

18 Months Later. . . Traditional: Evolutionary: A concept document with no functional architecture Cost $1. 5 M No concrete deployment plan or timeline Delivered open architecture prototype addressing 80% of requirements Cost of $100 K Plan to complete in 6 months Denning, Gunderson, & Hayes-Roth, CACM 12/2008

Bottom Line Expect to see many more projects using evolutionary and agile methods Especially

Bottom Line Expect to see many more projects using evolutionary and agile methods Especially in environments challenged by rapid technological progress and rapid change These ideas are actually not new ― However, not articulated well till recently (except for Gilb) ― Contradict traditional engineering approach ― Nevertheless work well in practice

New Laws 1. Continuing growth o Super success leads to super-linear growth o Independent

New Laws 1. Continuing growth o Super success leads to super-linear growth o Independent sub-projects / modularity 2. Short release cycles (or continuous deployment) o Facilitate reorientation and acting on feedback 3. Individually sustainable work rate 4. Managing technical debt 5. Conservation of familiarity