Chapter 21. Refactoring is about Features
When you clean up code, you are always doing it in the service of the product. Refactoring is essentially an organizational process (not the definition of "organizational" meaning "having to do with a business" but the definition meaning "having to do with putting things in order"). That is, you're putting in order so that you can do something.
When you start refactoring for the sake of refactoring alone, refactoring gets a bad name. People start to think that you're wasting your time, you lose your credibility, and your manager or peers will stop you from continuing your work.
When I say "refactoring for the sake of refactoring alone," what I mean is looking at a piece of code that has nothing to do with what you're actually working on, saying, "I don't like the way that this is designed," and moving parts of the design around without affecting the functionality of the...