Book Review: “Pro PHP Refactoring” by Francesco Trucchia and Jacopo Romei

by Udi

Pro PHP Refactoring” written by Francesco Trucchia and Jacopo Romei, published by Apress.
This book is for beginners and professional web developers.

I never read a book about refactoring, maybe few chapters or articles here and there, but I never learned this subject. To me it was always just doing what feels right, I never thought about “what technic should I use here…”. If you are like me, and you feel that this book can’t really teach you something, you better take a look at the table of contents [Google Preview in Apress], I’m sure you’ll find few interesting chapters there.

My favorite chapter is Chapter 1 – Finding “Bad Smells” In Code – they explain really well and clearly how to recognize bad code. Now, I don’t even wait for the second-look on a code, while I write I’m starting to feel where I did it wrong and where should I make some changes. This chapters helps you code better. Not only refactor better.

In this book you’ll see and read a lot about unit testing in PHP with PHPUnit and what is TDD and why you need it. You’ll also get familiar with Selenium which is quite useful tool for web app testing [and from now on I’m using it as one of my testing tools].

In conclusion,
reading this book will help you not only refactor other’s code, but write your much better. You’ll learn about test driven design and testing in general. All of those will help you become much better developer.