RubiconMD interview question

How do you approach refactoring code?