Software Mod6 Shashank
Software Mod6 Shashank
1
Topics covered
 Evolution processes
    Change processes for software systems
 Program evolution dynamics
    Understanding software evolution
 Software maintenance
    Making changes to operational software systems
 System re-engineering
    Re-writing legacy systems without change its functionality
                                                                  2
Software change
                                                                     3
              Types of changes
                                     its requirements.
                                 Adapt software to a different operating environment
                                    Changing a system so that it operates in a different
                                     environment (computer, OS, etc.) from its initial
                                     implementation.
“Evolution”
                                                           5
A spiral model of development and evolution
                                              6
Evolution processes
                                                                     7
Change identification and evolution processes
                                                8
The software evolution process
                                 9
Change implementation
                                                            10
Change implementation
                        11
Urgent change requests
                                                                    12
Agile methods and evolution
                                                                     13
Handover problems
                                                                      14
Change is inevitable
                                                           15
Software maintenance
                                                           16
Software maintenance
                                                                      18
Types of maintenance
                                                            19
Types of maintenance
 Perfective maintenance:
    to support new features required by users.
    to change some functionality
     of the system due to customer demands.
                                          Perfective
                                          Adaptive
                                          Corrective
                                                       20
Maintenance effort distribution
                                  21
Maintenance costs
                                                          22
Figure 9.9Development and maintenance costs
                                              23
Causes of Maintenance
 During development:
    Software not anticipated to last very long (e.g., Y2K
     problem).
 Rate of hardware obsolescence:
    immortality of software products
    maintenance necessary for software performing low-
     level functions.
                                                             24
Causes of Maintenance
                                                          25
Maintenance cost factors
 Team stability
    Maintenance costs are reduced if the same staff are involved
     with them for some time.
 Contractual responsibility
    The developers of a system may have no contractual
     responsibility for maintenance so there is no incentive to design
     for future change.
 Staff skills
    Maintenance staff are often inexperienced and have limited
     domain knowledge.
 Program age and structure
    As programs age, their structure is degraded and they become
     harder to understand and change.
                                                                     26
Maintenance prediction
                                                               27
Law’s of Maintenance
                                                           29
Maintenance prediction
                         30
Change prediction
                                                          31
System re-engineering
                                                            32
Advantages of reengineering
 Reduced risk
    There is a high risk in new software development. There may be
     development problems, staffing problems and specification
     problems.
 Reduced cost
    The cost of re-engineering is often significantly less than the
     costs of developing new software.
                                                                       33
The reengineering process
                            34
Reengineering process activities
                                                        35
Figure 9.12 Reengineering approaches
                                       36
Reengineering cost factors
                                                                  37
Preventative maintenance by refactoring
                                                               39
‘Bad smells’ in program code
 Duplicate code
    The same or very similar code may be included at different
     places in a program. This can be removed and implemented as a
     single method or function that is called as required.
 Long methods
    If a method is too long, it should be redesigned as a number of
     shorter methods.
 Switch (case) statements
    These often involve duplication, where the switch depends on
     the type of a value. The switch statements may be scattered
     around a program. In object-oriented languages, you can often
     use polymorphism to achieve the same thing.
                                                                       40
‘Bad smells’ in program code
 Data clumping
    Data clumps occur when the same group of data items (fields in
     classes, parameters in methods) re-occur in several places in a
     program. These can often be replaced with an object that
     encapsulates all of the data.
 Speculative generality
    This occurs when developers include generality in a program in
     case it is required in the future. This can often simply be
     removed.
                                                                       41
Major Maintenance Problems
 Use of gotos
 Lengthy procedures
 Poor and inconsistent naming
 Poor module structure
 Weak cohesion and high coupling
 Deeply nested conditional statements
 Functions having side effects
                                         43
Maintenance activities
                                                          44
Software Maintenance Process Models
                                                       45
Software Maintenance Process Model - 1
Change Requirements
Design Design
Code Code
                                                       48
Software Reengineering
 Advantages of reengineering:
    produces better design than the original product,
    produces required documents,
    often results in higher efficiency.
 Efficiency improvements are brought about by better
  design.
    However, this approach is more costly than the first
     approach.
 An empirical study indicates:
    process 1 is preferable when amount of rework is no
     more than 15%.                                      49
Software Reengineering
                                           50
Activity: System evolution
                                    51
Key points
                           1
Topics covered
 Change management
 Version management
 System building
 Release management
                       2
Configuration management
                                                             3
CM activities
 Change management
    Keeping track of requests for changes to the software from customers
     and developers, working out the costs and impact of changes, and
     deciding the changes should be implemented.
 Version management
    Keeping track of the multiple versions of system components and
     ensuring that changes made to components by different developers do
     not interfere with each other.
 System building
    The process of assembling program components, data and libraries,
     then compiling these to create an executable system.
 Release management
    Preparing software for external release and keeping track of the system
     versions that have been released for customer use.
                                                                            4
Configuration management activities
                                      5
CM terminology
Term Explanation
Configuration item or Anything associated with a software project (design, code, test data,
software configuration document, etc.) that has been placed under configuration control. There are
item (SCI)             often different versions of a configuration item. Configuration items have a
                       unique name.
Configuration control  The process of ensuring that versions of systems and components are
                       recorded and maintained so that changes are managed and all versions of
                       components are identified and stored for the lifetime of the system.
Version                An instance of a configuration item that differs, in some way, from other
                       instances of that item. Versions always have a unique identifier, which is
                       often composed of the configuration item name plus a version number.
Baseline               A baseline is a collection of component versions that make up a system.
                       Baselines are controlled, which means that the versions of the components
                       making up the system cannot be changed. This means that it should
                       always be possible to recreate a baseline from its constituent components.
Codeline               A codeline is a set of versions of a software component and other
                       configuration items on which that component depends.
                                                                                                  6
CM terminology
Term              Explanation
Mainline          A sequence of baselines representing different versions of a
                  system.
Release           A version of a system that has been released to customers (or
                  other users in an organization) for use.
Workspace         A private work area where software can be modified without
                  affecting other developers who may be using or modifying that
                  software.
Branching         The creation of a new codeline from a version in an existing
                  codeline. The new codeline and the existing codeline may then
                  develop independently.
Merging           The creation of a new version of a software component by merging
                  separate versions in different codelines. These codelines may have
                  been created by a previous branch of one of the codelines
                  involved.
System building   The creation of an executable system version by compiling and
                  linking the appropriate versions of the components and libraries
                  making up the system.
                                                                                       7
Change management
                                                           8
The change management process
                                9
A partially completed change request form (a)
                                                                                   10
A partially completed change request form (b)
                                                                                   11
Factors in change analysis
                                               12
Change management and agile methods
                                                                             14
Version management
                                                             15
Codelines and baselines
                                                            16
Codelinesand baselines
                         17
Baselines
                                                                     18
Version management systems
                                                                    19
Version management systems
 Independent development
    The version management system keeps track of components
     that have been checked out for editing and ensures that changes
     made to a component by different developers do not interfere.
 Project support
    A version management system may support the development of
     several projects, which share components.
                                                                   20
Storage management using deltas
                                  21
Check-in and check-out from a version
repository
                                        22
Codeline branches
                                                                  23
Branching and merging
                        24
System building
                                                              25
Build platforms
                                           27
Reserve and Restore Operation in CC
                                      28
SCCS and RCS
                                                          30
System building
                  31
Build system functionality
                                          32
Minimizing recompilation
 Modification timestamps
    The signature on the source code file is the time and date when
     that file was modified. If the source code file of a component has
     been modified after the related object code file, then the system
     assumes that recompilation to create a new object code file is
     necessary.
 Source code checksums
    The signature on the source code file is a checksum calculated
     from data in the file. A checksum function calculates a unique
     number using the source text as input. If you change the source
     code (even by 1 character), this will generate a different
     checksum. You can therefore be confident that source code files
     with different checksums are actually different.
                                                                       34
Timestamps vs checksums
 Timestamps
   Because source and object files are linked by name rather than
    an explicit source file signature, it is not usually possible to build
    different versions of a source code component into the same
    directory at the same time, as these would generate object files
    with the same name.
 Checksums
   When you recompile a component, it does not overwrite the
    object code, as would normally be the case when the timestamp
    is used. Rather, it generates a new object code file and tags it
    with the source code signature. Parallel compilation is possible
    and different versions of a component may be compiled at the
    same time.
                                                                             35
Agile building
 Once the system has passed its tests, check it into the
  build system but do not commit it as a new system
  baseline.
 Build the system on the build server and run the tests.
  You need to do this in case others have modified
  components since you checked out the system. If this is
  the case, check out the components that have failed and
  edit these so that tests pass on your private workspace.
 If the system passes its tests on the build system, then
  commit the changes you have made as a new baseline
  in the system mainline.
                                                             37
Continuous integration
                         38
Daily building
                                                                   39
Release management
                                                           42
Release planning
                                                                       43
Release components
                                                                      44
Factors influencing system release planning
 Factor                 Description
 Technical quality of   If serious system faults are reported which affect the way in
 the system             which many customers use the system, it may be
                        necessary to issue a fault repair release. Minor system
                        faults may be repaired by issuing patches (usually
                        distributed over the Internet) that can be applied to the
                        current release of the system.
 Platform changes       You may have to create a new release of a software
                        application when a new version of the operating system
                        platform is released.
 Lehman’s fifth law     This ‘law’ suggests that if you add a lot of new functionality
 (see Chapter 9)        to a system; you will also introduce bugs that will limit the
                        amount of functionality that may be included in the next
                        release. Therefore, a system release with significant new
                        functionality may have to be followed by a release that
                        focuses on repairing problems and improving performance.
                                                                                         45
Factors influencing system release planning
 Factor            Description
 Competition       For mass-market software, a new system release may be
                   necessary because a competing product has introduced
                   new features and market share may be lost if these are not
                   provided to existing customers.
 Marketing         The marketing department of an organization may have
 requirements      made a commitment for releases to be available at a
                   particular date.
 Customer change   For custom systems, customers may have made and paid
 proposals         for a specific set of system change proposals, and they
                   expect a system release as soon as these have been
                   implemented.
46