If you read articles, visit websites, read tech books or visit conferences you will undoubtedly have heard about the term refactoring. There is a good chance you’ve been refactoring yourself already, whether you knew it or not. In this article you will be introduced to the practice of refactoring. The basic definition will be discussed, as well as reasons for refactoring and how to actually refactor your code. The difference between refactoring your code and rewriting your code will also be explained.