What is Refactoring PHP Code?


For whatever reasons, I am in the mood to write … and I have a video too! So, what the heck is code refactoring? In a nutshell:

It is the process of code refinement – taking messy code and reorganizing it into much more manageable (cleaner) chunks. Refactoring is such an important part of coding, that I slap my programmers on back of the head, if they fail to refactor their code!

The video:

To summarize:

  • Refactoring is something you should do as you are programming – not 6 months later!
  • A common refactoring strategy is to take big multipurpose methods/functions and create two or more smaller fined-grained functions out of them.
  • Code that could be used in multiple functions, is a good candidate for refactoring.

Stefan Mischook

This entry was posted on Thursday, January 16th, 2014 at 8:58 am and is filed under Advanced PHP, Real World PHP. You can follow any responses to this entry through the RSS 2.0 feed. Both comments and pings are currently closed.

Comments are closed.

Created By Stefan Mischook  |  Top of page  go to top of page