What Is Refactoring?

The term “refactoring” has become quite popular in the workplace. We developers say, “I need to refactor this thing,” then proceed to rewrite a large chunk of code. From a big-picture view, this use of the term carries the same intent as its proper definition: we want to change the way the code does its work without changing its behavior. This matches the definition from the book Refactoring: Improving the Design of Existing Code, 2nd Edition [Fow18]:

Refactoring is the process of changing a software system in a way that does not alter the external behavior of the code yet improves its internal structure.

But the common use of the word ignores both the methodology and the mechanics shown in the book. We get no further ...

Get iOS Unit Testing by Example 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.