When Should You Refactor Code

Code smells, technical debt and changing requirements are just some things that can lead code bad and confusing code.  It is important to refactor your code base as this helps to keep it clean and manageable.  But when should you refactor you code?  

In this video I talk about code refactoring, when to refactor your code and what you should do when altering fragile code.  

Refactoring code is the act of making code more readable, understandable, more concise and cleaner. Refactoring code is not the practice of adding, modifying or removing features. Feature alterations and code refactoring are two separate things and should be handled independently. In this video I discuss how and when to refactor your code. I also explain the importance of having automated code tests when refactoring code.