software evolution -- good practices

Download Software evolution -- Good practices

If you can't read please download the document

Upload: nicolas-anquetil

Post on 16-Apr-2017

966 views

Category:

Education


0 download

TRANSCRIPT

Software Evolution

Nicolas Anquetil
RMod teamrmod.lille.inria.fr

Why this course?Soft. Maint. is important

Soft. Maint. is poorly understood

Soft. Maint. is poorly performed

GoalsYou understand some important problems linked to maintenance

You know good practices/solutions

Some important issuesSystems need to be controlled

Software is knowledge

Maintenance need to be controlled

Some important issuesSystems need to be controlled

Software is knowledge

Maintenance need to be controlled

When you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meager and unsatisfactory kind.

Lord Kelvin

When you can measure what you are speaking about, and express it in numbers, you know something about it; but when you cannot measure it, when you cannot express it in numbers, your knowledge is of a meagre and unsatisfactory kind.

Lord Kelvin

You cannot control what you cannot measure.

Tom DeMarco

Metrics

Important to have an objective view on the system

Maintainers often have a biased viewOnly ear complains and problems

Metrics

Eg: How did my fuel expenses vary last year?

Metrics

Eg: How did my fuel expenses vary last year?

Is it good?

Metrics

Eg: How did my fuel expenses vary last year?

Is it good?

April

August(holidays)

December

Metrics

Be careful with metricsNeed to be analyzed in context

Not an end but a mean
(not a goal but a tool)

Metrics

Eg: How did my fuel expenses vary last year?

It is good

August(holidays)

December

April

Metrics

Some basic metrics for Maintenance (SEI Carnegie Melon)System size (eg: LOC)

Effort (eg: man/hour)

Schedule (eg: start/end dates)

Quality (eg: number of errors)

Metrics

Can also give an overview of a system

SourceCity

Some important issuesSystems need to be controlled

Software is knowledge

Maintenance need to be controlled

Knowledge

Software implements a model of the worldContains a lot of knowledge about the world

40% to 60% of maintenance is spent reading (understanding) the code

Maintenance needs this knowledge

Knowledge

Knowledge about:Application Domain

Organizational structure

Processes

Software system itself

Computer science techniques

Knowledge

Application DomainBusiness rules

Concepts (eg: selective breeding, contour plowing)

Tasks

Knowledge

Organizational structurePeople positions

People responsibilities

Organizational units

Processes, procedures, directives

Tools used (eg: IDE, VCS)

Knowledge

Processes impact softwareTheir activities

Strengths, weaknesses

Artifacts generated

Knowledge

Software systemExisting documents

Components

Architecture

Knowledge

Computer science techniquesProgramming techniques (OO, AOP, SPL, models, )

Tools (eg: compiler specificities)

A good part of development is spent on acquiring this knowledge

To put it in the system

Then people forget or go away

Often the knowledge only exists in the software

A good part of maintenance is spent on re-acquiring this knowledge

To understand the system and how to change it

It is important to try to save this knowledge

DocumentationCode comments (javadoc), architecture sketch, wiki, formal document, (UML) models

Some important issuesSystems need to be controlled

Software is knowledge

Maintenance need to be controlled

Software processes help ensurePeople do the right things (best practices)

They follow the same rules (any collaborative activity need some common rules)

Software maintenance process ISO/IEC 14764Process to formalize some basic rules

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Process

Special cases must be made for emergency situationsWho decide what is emergency?

Even for that there should be some process (ex: 1fix ; 2document the fix)

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Software and organization need to be prepared

Prepare maintenance when development starts

Process

Prepare software (examples)Where is the source code?

Is there documentation?

How to make change (VCS)?

Process

Prepare organization (examples)What is the maintenance process?

Who is responsible of what?

Process

Prepare maintenance when development starts (examples)Who will maintain?

When/How will they learn the system?

Prepare client: Estimate cost of maintenance

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Analyze request, confirm it, propose a solution, document the request and the solution, obtain authorizations to apply solution

Process

Analyze requestConfirm it (reproduce) test (TDD)

Classify it (adaptive, corrective, emergency corrective, )
contract issues

Check its validity (Real bug? Needed new feature?)

Process

Propose a solutionEstimate costs, plan (schedule)

Force yourself to consider several possible solutionsAnd compare them objectively

Process

Document the request and the solution proposalSoftware is knowledge

Documentation can take several form (comments, javadoc, wiki, formal document, commit message, )

Process

Obtain authorizationYou might be the authorizing authority (simplified process)

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Implement and test

Process

Implement solutionBug fix for corrective maintenance

Development process for evolution

Test modification and systemRegression testing (did not break some other part of the system)

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Review and approval

Process

Review and approvalMight require formal approval (ex: Quality Assurance authority)

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Plan and notify people

Process

Large modification

Potentially affects all users

Might change more than the softwareHardware, OS, DB,

Process

PlanWhen, who, why

Parallel operations

Data conversion

Backup old version, old data

Process

NotifyIdentify affected people

Notify in advance

Notify when finished

Process

Implementation

Problem and
modification
analysis

Modification
implementation

Modification
acceptance

Migration

Retirement

Plan and notify people

Process

End of life of software system

Similar to migration

Plan, Notify, Parallel operation, Archive

Closing remarks

Software evolution is very important

Some solutions, good practices exist

Click to edit the title text format