Refactoring is another way of improving the functionality and quality of existing code. From what I understand about it is, it prevents you from duplicating code while maintaining the same functionality and behavior of the site. This is a great way to improve your skills as a programmer. Below are a few links you can check out:

 

refactoringBook

 

 

 

 

http://martinfowler.com/books/refactoring.html

http://www.lynda.com/Developer-Programming-Foundations-tutorials/What-refactoring/122457/135616-4.html

http://www.lynda.com/MySQL-tutorials/PHP-MySQL-Essential-Training/119003-2.html