liveBook · Manning

Legacy code

Also called legacy codebase

Legacy code is existing software code carried forward from earlier development for maintenance or change, regardless of its test coverage or current usefulness.

How 3 Manning books explain it

The Art of Unit Testing 3e

Older application source code that is difficult to change, test, or understand and may no longer be supported in its original environment.

How it is used
Frames the problem of choosing where to add tests and how to refactor an existing system safely.
How deep it goes
Defines competing meanings and gives a test-prioritization procedure; defers detailed refactoring techniques.
Examples
Illustrates testing and tooling obstacles through a large billing-software organization maintaining intertwined .NET, Java, and C++ products.
What you can do after
Practice/perform a component assessment, choose a testing starting point, and protect a large refactoring with integration tests.

Read how The Art of Unit Testing 3e explains legacy code →

Build High Value Software Systems

Legacy code is existing software that a team inherits and must understand or change, regardless of whether it is still useful and operational.

How it is used
Frames inherited production software as a change-risk problem and guides investigation and incremental improvement.
How deep it goes
Defines legacy by insufficient change safety and offers investigation and improvement heuristics, without prescribing a full migration implementation.
Examples
Uses a Java payment service whose Tuesday European confirmations expose an undocumented US-business-hours rule.
What you can do after
Diagnose inherited behavior by observing runtime, reading tests, and tracing code; prioritize incremental changes with safety nets.

Read how Build High Value Software Systems explains legacy code →

Test Driven: Practical TDD and Acceptance TDD for Java Developers

Legacy code is existing software that must be maintained or changed, often with limited tests or a design that makes changes difficult.

How it is used
Uses test-driven development to make controlled changes to an existing codebase that was not developed test-first.
How deep it goes
Defines legacy code and outlines three change phases, without specifying the individual procedures for those phases.
Examples
Uses a new configuration parameter that switches between two alternative behaviors as a motivating change.
What you can do after
Apply test-driven development to changes in an existing codebase by testing the target code and proceeding through analysis, preparation, and test-driving.

Read how Test Driven: Practical TDD and Acceptance TDD for Java Developers explains legacy code →

Also covered in

What to know first

Related concepts

Questions about legacy code

What is legacy code?

Legacy code is existing software code carried forward from earlier development for maintenance or change, regardless of its test coverage or current usefulness.

Which Manning books explain legacy code?

The Art of Unit Testing 3e, Build High Value Software Systems and Test Driven: Practical TDD and Acceptance TDD for Java Developers.

What should I know before learning legacy code?

Manning books that teach legacy code usually introduce dependency, maintainability, test-driven development and unit test first.

What is the difference between legacy code and seam?

Legacy code is existing software code carried forward from earlier development for maintenance or change, regardless of its test coverage or current usefulness. A software seam is a boundary where behavior or dependencies can be varied, replaced, or isolated with limited disruption to the surrounding system.

What kinds of legacy code are there?

Kinds of legacy code include AI-generated pull request.

What is legacy code a kind of?

Legacy code is a kind of code. Code is a set of instructions and declarations expressed in a programming language to specify a computer program’s operations or behavior.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.