What’s a Legacy?

The phrase “legacy code” is often used as a synonym for “bad code.” While the two categories clearly overlap, assuming the legacy code is always awful isn’t the most helpful way to think about a legacy.

What makes code “legacy” is not the quality, but the extent to which you have access to the context in which it was created and the reasons previous developers made the choices they made.

Prescription 50When dealing with legacy code, respect code that works. You don’t know what constraints the previous coders worked under.

Legacy code is scary—not because it’s bad, but because you don’t know what parts of the design are incidental and what parts are critical. When two different actions are backed by the ...

Get Rails 4 Test Prescriptions now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.