Transcript
Page 1: Legacy code development and maintenance

Legacy codeDevelopment and Maintenance

Page 2: Legacy code development 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?

Page 3: Legacy code development and maintenance

Lustre® FSparallel distributed file system

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

Page 4: Legacy code development and maintenance

Development and Sustaining teams

Development Cycle unpredictable

priority

changing

estim

atio

n

rough

Planing

Development

Retrospective

Page 5: Legacy code development and maintenance

Nature of processesPlanning

Pulling

Page 6: Legacy code development and maintenance

Lost feedback from Sustaining

Retrospective

● Defects Escapes show what missed in Quality● Feedback:

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

Page 7: Legacy code development and maintenance

Future looks bright

Tested and works. Don’t touch.

Page 8: Legacy code development and maintenance

Discovered bug and hidden one

Only not used product has no bugs

Page 9: Legacy code development and maintenance

Fixing bug could uncover other

Changing code always risky

Page 10: Legacy code development and maintenance

Just fixing is not enough

Bugs are never ending

Page 11: Legacy code development and maintenance

Legacy Quality: Continuous Refactoring

Preventive measures

Page 12: Legacy code development and maintenance

“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

Page 13: Legacy code development and maintenance

● 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

Page 14: Legacy code development and maintenance

Thank [email protected]

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