tl;dr:Thou shalt: (1) Have a comprehensive suite of tests. (2) Take small steps. (3) Run tests frequently. (4) Use continuous integration. (5) Not add extra functionality while refactoring. (6) Refactor often. (7) Automate refactoring. (8) Not prematurely optimize. (9) not suffer duplicated code. (10) Not suffer excessively long functions, or excessively large classes.