jargon

Comparison

Characterisation testvsLegacy system

Characterisation test

you did not know what the function was supposed to do, so you wrote down what it currently does.

A test that records the existing behaviour of code, correct or not, so that a refactor can be shown not to change it. It is the standard first move in untested legacy code: you are not asserting the behaviour is right, only that you have not altered it. Bugs found this way get recorded as tests too, because in a system this old somebody downstream may already depend on them.

Full entry →

Legacy system

everyone agrees it should be replaced, and everyone also agrees it is the only thing that knows the pricing rules.

A system that is still valuable, still running and no longer well understood by the people who maintain it. The useful working definition is code without tests, because that is what makes it frightening to change rather than merely old. Calling something legacy is not an insult and not an argument for replacement: it is a statement that changes to it carry unknown risk, which is a cost to plan for.

Full entry →

Related comparisons