One of the best things you can do before you refactor code is have a good test suite/type definitions in place so when you inadvertently break something you can be made aware of the mistake right away. Butyour test suite can't do you any good if you have to throw it away when you ...