You have inherited some code. Congratulations. Now you need to change it. There, there. Michael Feathers once wrote that legacy code is “code without unit tests”. I use a slightly more general definition. By “legacy code”, I mean profitable code that we feel afraid to change. I think that both parts matter. You probably accepted the “afraid to change” part without any need for convincing. (If not, then this article probably won’t interest you.) Moreover, if the code doesn’t ge...