TossIt is especially important for projects that are trying to go extreme.
TossIt is how you maintain ExtremeNormalForm when you RefactorMercilessly.
You shouldn't have things around you because "you might, sort of, kind of, may need them later (and besides, it's already there)." No.
No. That is what version control tools are for.
And what company ever actually profited from old software they had lying around, anyway?
Never had to patch an old release? It's not all IllusionOfControl. Plus a good SCM tool will let you integrate by merging rather than locking - very needful in larger developments.
Yes, I've often found, in projects with dead code lying around, that we frequently find ourselves spending time maintaining and attempting to test code that is not used at all. It happens when you change function "X", and then go fix everything that calls X. You get confused with some of the code calling X, because you can't see how it could have worked before your change. Discovery: It didn't work! And no one noticed, because the code wasn't been used anyway. So DELETE IT! If you need it later, get it from the source control system. -- JeffGrigg
So here's a principle: if it's difficult to replace, don't toss it just yet, TentativeTossIt.
There's also another principle here, something about MuseumsArchivesLibraries?, something that balances (grossly overgeneralized) YouArentGonnaNeedIt. Some things are valuable to keep permanently even though they're obsolete. The trick is to hold on to the baby pictures and first working prototypes without becoming a packrat.
Just as reading the titles or the contents of your old books, browsing your old VCS repository can be good sometimes. You see today how you thought yesterday. You're able to reminde what kind of mistake you did on the old days, and remember why you don't do the same mistakes anymore. You're able to see the evolotion of your software and your mind. A well-set ViewCVS page is really nice to browse from time to time. Better yet if you like to include CommitLogJokes?.
That's really great if you have version control and are very methodical about always recording every little test, utility, and code fragment you have ever committed to mass storage. Some of us work in a sloppier environment, so TentativeTossIt works better. Even more so when you need to record TheRoadNotTraveled.
Contrast: TentativeTossIt, TheRoadNotTraveled
This page mirrored in ExtremeProgrammingRoadmap as of April 29, 2006