Docsity

Post Delivery Maintenance - Software Engineering I | EECS 448, Study notes of Software Engineering

Toggle sidebar
bg1
EECS 448 Dr. Douglas Niehaus © 20091
Post-Delivery Maintenance
Chapter 15
EECS 448
Dr. Douglas Niehaus
EECS 448 Dr. Douglas Niehaus © 20092
Development vs. Maintenance
Most of the same activities
Fix faults (corrective maintenance)
Extend product capabilities (enhancement)
Some computer scientists prefer the term evolution
Viewing the entire software life-cycle as an
evolutionary process
Maintainability should be built into the product from
the very beginning of the development process
Different context: post-delivery maintenance begins
after a client accepts the first version of the product
Maintenance is generally cheaper than re-
implementation
Though it can be harder in some ways and less
fun in most ways
EECS 448 Dr. Douglas Niehaus © 20093
Why Maintenance is Necessary
Three reasons for making a change to a product
Corrective Maintenance: changes required to
correct a discovered fault
Analysis, design, coding, documentation fault
Perfective Maintenance: changes to improve a
product's effectiveness
New features
Adaptive Maintenance: changes accommodating a
change in the environment
New compiler, OS or hardware
Percentages of time from a study of 69 organizations
Corrective: 17.5%, Perfective: 60.5%,
Adaptive: 18%, Other : 4%
EECS 448 Dr. Douglas Niehaus © 20094
Post-Delivery Programmer Requirements
Even though, on average, 67% (2/3) of the total cost
of a product can be attributed to post-delivery
maintenance
Many organizations assign this to beginners and
less competent programmers
Those with less influence over their work
assignments
New development is generally more satisfying so
everyone gravitates to it, if they can
Contradiction:
Post-delivery maintenance is the most difficult, but
is assigned to the lest able
Counter-point: post-delivery maintenance is easiest
on best designed products
pf3
pf4
pf5
pf8
pf9
pfa

Partial preview of the text

Download Post Delivery Maintenance - Software Engineering I | EECS 448 and more Study notes Software Engineering in PDF only on Docsity!

EECS 448 1 Dr. Douglas Niehaus © 2009

Post-Delivery Maintenance

Chapter 15

EECS 448

Dr. Douglas Niehaus

Development vs. Maintenance

 Most of the same activities

 Fix faults (corrective maintenance)

 Extend product capabilities (enhancement)

 Some computer scientists prefer the term evolution

 Viewing the entire software life-cycle as an

evolutionary process

 Maintainability should be built into the product from

the very beginning of the development process

 Different context: post-delivery maintenance begins

after a client accepts the first version of the product

 Maintenance is generally cheaper than re-

implementation

 Though it can be harder in some ways and less

fun in most ways

EECS 448 3 Dr. Douglas Niehaus © 2009

Why Maintenance is Necessary

 Three reasons for making a change to a product

 Corrective Maintenance: changes required to

correct a discovered fault

 Analysis, design, coding, documentation fault

 Perfective Maintenance: changes to improve a

product's effectiveness

 New features

 Adaptive Maintenance: changes accommodating a

change in the environment

 New compiler, OS or hardware

 Percentages of time from a study of 69 organizations

 Corrective: 17.5%, Perfective: 60.5%,

Adaptive: 18%, Other : 4%

Post-Delivery Programmer Requirements

 Even though, on average, 67% (2/3) of the total cost

of a product can be attributed to post-delivery

maintenance

 Many organizations assign this to beginners and

less competent programmers

 Those with less influence over their work

assignments

 New development is generally more satisfying so

everyone gravitates to it, if they can

 Contradiction:

 Post-delivery maintenance is the most difficult, but

is assigned to the lest able

 Counter-point: post-delivery maintenance is easiest

on best designed products

EECS 448 5 Dr. Douglas Niehaus © 2009

Post-Delivery Programmer Requirements

 Post-delivery maintenance (PDM) incorporates all

aspects of other phases

 Thus, properly managed, it is an excellent training

ground for inexperience programmers

 Debugging skills are required to determine where a

fault lies

 Mandatory tour of product to learn its structure

well enough to isolate fault

 Sometimes requires considerable debugging skills

 Fixing a fault without introducing others

 Requires considerable study and understanding of

existing product software architecture

 Excellent training it product is well written

Post-Delivery Programmer Requirements

 Updates to incomplete, incorrect, or out-of-date

documentation also an excellent learning experience

 Testing

 Specific test cases for corrected fault or extended

product feature

 Regression tests to check for regression faults

 Also excellent education in product

development if they are done well

 Documentation of all changes and implications is aprt

of PDM

 Adaptive and perfective maintenance

 Programmer must perform requirements, analysis,

design, implementation and testing work-flows

EECS 448 7 Dr. Douglas Niehaus © 2009

Post-Delivery Programmer Requirements

 So, PDM is potentially quite educational

 If approached correctly

 If supervised well

 Provide inexperienced programmers with a

mentor

 However, PDM is often, still, a thankless job

 Dealing with dissatisfied customers

 You do not meet them unless they are unhappy

in some way

 Fixing their problem cheers them up, though!

 Problems caused (usually) by original

developer, not the maintainer

Post-Delivery Programmer Requirements

 Further perils

 Code may be badly written

 Many developers consider it a lower-status job

 Being too good at it may get you stuck

 Managers want a quiet life and programmers

efficient at fixing problems a major asset

 PDM most challenging aspect of life-cycle and

management can help

 Restrict PDM to programmers with required skills

 Original developers can fix their bugs

 Give PDM higher status and pay

 Use it as a training ground – master-apprentice

pairs

EECS 448 13 Dr. Douglas Niehaus © 2009

Authorizing Changes to a Product

 PDM is a significant cost and testing is a significant

part of PDM expense

 It is estimated that the first “fix” of a PDM fault is

itself incorrect 70% of the time

 Care in conducting PDM and care in oversight is thus

important

 Causal and inadequately tested “fixes” often cause

more problems than the original fault

 Probability of cascading problems greatly increases if

the regression test suite

 Does not exist

 Is not automated

Ensuring Maintainability

 PDM is not a one time effort

 Successful products go through many versions

over its lifetime

 Some are PDM

 Some are “new development”

 Planning for orderly and efficient PDM during

entire software process is crucial

 Well designed software architecture explicitly

supports extension and modification

 Object orientation helps with information hiding

 High cohesion and low coupling

 Variable names, comments, documentation all

contribute

EECS 448 15 Dr. Douglas Niehaus © 2009

Ensuring Maintainability

 During PDM the maintainability of product

 Ideally should improve

 Optimistically should get no worse

 Realistically, entropy always wins

 Major rewrites and revisions are often a result

of long-term PDM entropy

 Fixing individual faults always involves a restricted

view of the product

 Leading to greater entropy of changes

 Even if a broad view is taken in fixing each fault,

changing conditions often mean that some PDM

work pushes the existing design beyond its limits

Problem of Repeated Maintenance

 Moving target problem is one of the biggest

difficulties of PDM

 Client changes requirements

 Frustrating for developers

 Can result in poorly structured code

 Can add to the cost of product

 All these issues only get worse during PDM

 The more a completed product changes,

 The more it deviates from its original design

 Documentation becomes less reliable

 Moving target has a management component

 Firm control of client expectations and need to

freeze requirements for PDM

 Some PDM should be development of new

product version

EECS 448 17 Dr. Douglas Niehaus © 2009 Object-Oriented Software Maintenance

 OO paradigm promotes maintainability

 Well designed objects exhibit high level of

conceptual independence

 Encapsulation, high cohesion, low coupling

 Generally easy to see which part(s) of a product

require changes

 Good locality, usually

 Information hiding increases object independence

 Reduces undesirable and unnecessary interaction

 Changes to one object rarely affect another object

Object-Oriented Software Maintenance

 Obstacles to OO SW maintenance

 PDM programmer must study entire class hierarchy

which was (often) designed by others

 To understand context of a class requiring

modification

 Good CASE tool support for browsing class

hierarchies is a big help

 Some tools can provide a “flattened” view of a

class with all inherited features appearing explicitly

 Polymorphism and dynamic binding

 Programmer must consider a wider range of more

complex possible behaviors and implications

 Simple is almost always better

 Clever should always have a good reason

EECS 448 19 Dr. Douglas Niehaus © 2009 Object-Oriented Software Maintenance

 Consequences of inheritance

 Changes are propagated to all descendants

 “Fragile class problem” is descriptive phrase

 Inheritance increases scope of the analysis

 Inappropriate uses of inheritance tend to make

this much worse

 Inheritance is often an advantage during initial

development but a disadvantage during PDM

 Clarity, Clarity, Clarity

 Simplicity, Simplicity, Simplicity

PDM vs Development Skills

 Many basic skills of reasoning and coding are, of

course, common to both BUT

 Remarkably important set of differences

 Ability to diagnose the cause of a problem

 Starting point and among the most important PDm

skills

 Ability to read code to learn about it, especially when

inadequate, incomplete, or out-of-date

documentation is available

 Learning from and about code written by someone

else is much harder in some ways than working on

code you wrote

 Strong analysis, design, implementation and testing

EECS 448 25 Dr. Douglas Niehaus © 2009

Reverse Engineering

 Option 1

 Attempt to reconstruct the specifications

 Modify the reconstructed specifications

 Re-implement the product in normal forward-

engineering manner

 BUT BUT BUT

 Reconstruction of specifications is hard

 When successful, often crucially depends on

extensive experience

 Option 2

 Modify reconstructed design and forward engineer

from there

 More frequently used, but it leaves specification

documents out-of-date

Reverse Engineering

 Situation is vastly more difficult if source code is lost

and the executable version is all that is available

 Should never happen, yet does more often

than you might think

 Essentially impossible of source code control tools

are used

 Some version of code is always available

 Almost as bad, however, is that the executable

being used is not built by the “corresponding”

source code

 All options are painful, but there are 3 approaches

that can be used

EECS 448 27 Dr. Douglas Niehaus © 2009

Reverse Engineering

 Option 1

 Use disassembler (machine code-> assembler)

 Use reverse compiler (assembler -> C)

 Problems:

 Variable names are all lost

 Compiler optimization makes deducing

structure harder and makes understanding

deduced structure harder

 Loops in assembler have more than one

possible source code progenitor

 Option 2: treat existing product as a black box

 One possible use for virtualization is to provide

specific environment for such products

Reverse Engineering

 Option 3

 Reverse engineering is used to deduce

specifications from black box behavior

 Reconstructed specifications are updated to reflect

current environment

 New version of product is built from updated

specifications

 Best approach

 Make sure it never happens

EECS 448 29 Dr. Douglas Niehaus © 2009

Case Study: Source-Exec Mismatch

 1985: Convergent Technologies is building the first

desktop UNIX box for AT&T

 Unix-PC or 3B

 Deliver first product version of entire UNIX release

 OS, compilers, DB, Editors, applications, etc

 50 5-1/4” floppies

 Deliver source code and a machine the size of top-

opening freezer to build it

 Machine provided the specific version of UNIX

software necessary to build release

 I was given the task to build the release from source

 Not easy

Case Study: Source-Exec Mismatch

 First set of problems

 Environmental variables and structure of source

code was not all set up correctly

 Not too frightening

 Second set of problems

 Not all makefiles called each other well and some

makefile variables had to be defined

 More serious

 Third set of problems

 Executables built did not match executables being

tested!

 All failed at 4-8th^ bytes: executable timestamp

 Create a tool to fix this

EECS 448 31 Dr. Douglas Niehaus © 2009

Case Study: Source-Exec Mismatch

 Fourth set of problems

 Executables built from source still don't match

testing executables after compare tool ignoring

time-stamps is built

 Fifth set of Problems

 How can I possibly tell my boss this incredibly bad

news without being shot or otherwise damaged?

 Need more evidence of what is happening and

why but I cannot delay for too long, either

 Sixth set of problems

 Code and compilation analysis for ~ 24 hours

 Found multiple copies of 4-5 header files that were

different

Case Study: Source-Exec Mismatch

 Sixth set of problems

 Telling my bosses

 Told my boss at 9AM

 Explained evidence and write-up until 9:

 Issue when up 4 levels of management above me

 2 PM - “When can you leave for California”

 Seventh set of problems

 Proving to Convergent there was a problem

 Denial vs $250 Million dollar check

 Seventh set of problems

 Designing a reliable source code control and

software manufacturing method

EECS 448 37 Dr. Douglas Niehaus © 2009

CASE Tools for PDM

 Source code control tools manage versions of

individual files and perhaps sets of files

 Content Management Systems add DB support for

product version numbers correspondence to

specific versions of all component files

 Huge number of components

 CCC (change and configuration control) also a term

used

 If an organization is not buying a complete CCC tool

 Then at least as version control (CVS) and build

tool (make) must be used together

 Defect tracking DB is also mandatory for PDM

CASE Tools for PDM

 Other useful tools can produce representations of

code structure for reverse engineering

 Rational Rose, Together

 Doxygen

 Disassemblers, reverse compilers

 Binutils: objdump

 Battlemap, Teamwork, Bachman Reengineering

Product Set

 Defect tracking

 Rational ClearQuest

 Bugzilla

 Trac

EECS 448 39 Dr. Douglas Niehaus © 2009

Metrics for PDM

 Metrics for analysis, design, implementation, testing,

and documentation all apply to PDM

 Metrics specific to PDM include

 Measures related to software defect reports

 Number, classification, severity, duration

 Current status metrics and Monthly or Yearly

performance statistics

Challenges for PDM

 Toughest aspects of PDM

 PDM is usually harder than development

 PDM work is often lower status and avoided by

those who can

 PDM is often paid less than other development

work

 Future influences

 Greater use of formal techniques for development

would have use implications for PDM

 Intensive code reuse

 Certainties

 SWE will still be hard and fun (if you like it)

EECS 448 41 Dr. Douglas Niehaus © 2009

Conclusions

 PDM is often given far less attention and credit than

it deserves

 PDM very difficult and educational

 PDM is a common first job for developers

 Emphasize educational opportunities

 Prepare for difficulties