Refactoring
The process that was just performed—separating a unit of code into a set of separate functions—is called refactoring. This is a critical activity when creating a complex program, especially when doing so by evolving it from a simpler form.
Many programmers believe that the act of improving (often called enhancing) or repairing a program inevitably makes that program more complex and harder to understand. However, if maintenance of this sort is used as an opportunity for refactoring, it can actually improve the program. And some programmers (the author included) believe that refactoring programs is a worthwhile activity in itself, separate from enhancement or repair.
In this case, the activity of refactoring is fairly simple. In fact, ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access