When do you know it's time to refactor/review some piece of code ? And better yet, when do you do it?
Probably like others, I've found myself knowing that something needs a refactor/review but deadlines and management left no time for that. I'd also like to hear how you include code review in the general development process.
Lately I've found myself doing it before working on new features/code. For example, if I have to develop something new or change something in module X of an application, I do a code review on that module. I found it also helps me understand the module better so I can then make the changes more easily.
So when do you know it's time and when do you do it? And most of all how do you include it in the planning of a project?