Book cover copyright Martin Fowler
This chapter explains several refactoring methods for moving code around and making it easier to clean them up.
My One Takeaway
Two this time:
- I love how much easier to read the “Replace Loop with Pipeline” refactoring makes the example. I think I’ll definitely be spending some time looking into how to do this with PHP.
- “Remove Dead Code” is my favorite refactor ever. In an earlier job, we had a
functions.phpthat was included in every file and it had an if statement that could never resolve to true. Everyone was afraid of removing it for fear that it would break something. I wasn’t. :-)
Scott is the Director of Technology at WeCare Connect where he strives to provide solutions for his customers needs. He's the father of two and can be found most weekends working on projects around his house with his loving partner.