C H A P T E R  2

image

Finding “Bad Smells” in Code

Kent Back's grandmother once said, “When it stinks, change it. ” Obviously she was talking not about code, but about Back's child. Well, we do not believe it, but the same sentence should be totally applied to the development of software.

Martin Fowler talks about this strange history in his book Refactoring: Improving the Design of Existing Code, and Kent Back, the father of Agile Method, helped him write this book. We will take a lot of Martin Fowler and Kent Back's refactoring concepts and try to move them into a PHP context.

Why Code Can Smell

Often, we must work with code that stinks, or rather, ...

Get Pro PHP Refactoring now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.