Legacy code development and maintenance

Preview:

DESCRIPTION

Long-lasting SW is goal of all SW development, it indicates that product is successful and probably widely used. But long life brings it own problems and has dramatic influence on developing process. This presentation will provide you some highlights on how to deal with legacy code and what should be remembered starting new SW product that is targeted for long life.

Citation preview

Legacy codeDevelopment and Maintenance

● Code after deployment● Successful● Long-lasting software● Meets customers’ needs● Hard to evolve:

○ design degradations○ too many use cases○ many different customers

What is the Legacy code?

Lustre® FSparallel distributed file system

● C● > 600 KLOC● kernel space code● https://github.com/Xyratex/lustre-stable/

Development and Sustaining teams

Development Cycle unpredictable

priority

changing

estim

atio

n

rough

Planing

Development

Retrospective

Nature of processesPlanning

Pulling

Lost feedback from Sustaining

Retrospective

● Defects Escapes show what missed in Quality● Feedback:

○ Process changes○ Design○ Review Checklists○ Test coverage○ Feature/Refactoring planning

Future looks bright

Tested and works. Don’t touch.

Discovered bug and hidden one

Only not used product has no bugs

Fixing bug could uncover other

Changing code always risky

Just fixing is not enough

Bugs are never ending

Legacy Quality: Continuous Refactoring

Preventive measures

“premature optimization is the root of all evil” Donald Knuth

● Refactoring SHOULD BE - proven, based on statistic and metrics○ Metrics and stat from Defects Escapes○ Code metrics (Complexity, LOC based stat, Function

points, etc)○ SCM:

■ churn (added + changed)■ age of changes (freshness)■ distance■ etc

Legacy Quality: Continuous Refactoring

● Chris Lewis and Rong Ou, “Bug Prediction at Google”● Bug Prediction, Bug Introducing Changes, BugCache,

FixCache, Predicting faults and etc. Key phrases to search in web

Readings

Thank YouDenis_Kondratenko@xyratex.com

http://www.linkedin.com/in/kondratenko

Recommended