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 50||When 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 same method but one of ...