On that note though if you compare the old code to say a water pipe, the old code could be a pipe with tons of duct-tape over every leak and a new pipe could in fact be a good choice. It's not always a great idea to rewrite from scratch but it isn't always the best to keep old code around either.