When reinventing, I also like to retain the original version for sanity checking.
This way you always have the option of switching between the new and old to see if a bug is particular to one or the other.
This of course isn't always feasible or worthwhile...
(Usually this is most useful when trying different numerical algorithms.)
in reply to Reusing code is good; reinvention might be better