Turn the legacy code in a totally new code starting with unit testing, style checking, documentation generation and finally the awaited continuous integration with various automation.
3. Legacy code is source code that relates to a
no-longer supported[citation needed]
or
manufactured operating system or other
computer technology.
http://en.wikipedia.org/wiki/Legacy_code
4. The term can also mean code inserted into
modern software for the purpose of
maintaining an older or previously supported
feature.
http://en.wikipedia.org/wiki/Legacy_code
5. More recently, the software engineering
community has developed other interpretations
for the term legacy code. Among the most
prevalent are source code inherited from
someone else and source code inherited from
an older version of the software. Michael
Feathers[1]
introduced a definition of legacy
code as code without tests, which reflects the
perspective of legacy code being difficult to
work with in part due to a lack of automated
regression tests. He also defined
Characterization Tests to start putting legacy
code under test.
http://en.wikipedia.org/wiki/Legacy_code
8. Continuous integration (CI) is the practice, in
software engineering, of merging all developer
working copies with a shared mainline several
times a day.
http://en.wikipedia.org/wiki/Continuous_integration