SimplicityInLegacy






I feel that often we find our selves dealing with legacy code that is not simple or testable. I think one of the main causes of this is that previous developers have chosen to emphasize the code that runs in production and neglect almost everything else.

Now days it is increasingly rare to inherit a project that has lost the source code and has only the executable, what ever the problems that are with it. An more and more people are using build scripts, but still I want more.

When I come to a project I want the tools the original developers used to create it. Not just the unit tests that all TDDers desire, but the stubs, the mocks, the special modes and the test harnesses. I want developers to see that those tools are what a profession leaves behind for others, because they are useful in the that boilings have catwalks for maintenance and modification not scaffolding quickly torn down when the current job is done. Then the next guy has to painfully reconstruct it, or do dangerous things to make changes like the janitor who has to use a ladder on a set of stairs to change a light bulb.

What would happen if we keep those tools around as we built our own code? What if the frameworks we used were developed with this mindset?

Would legacy code start to have a meaning closer to inheritance?



The original document is available at http://sdtconf.com/wiki/tiki-index.php?page=SimplicityInLegacy

Show php error messages