Refactoring

Book by Kent Beck and Martin Fowler

The term “refactoring” can be used either as a noun or a verb.

Also read: https://wou.edu/las/cs/csclasses/cs161/Lectures/rulesofthumb.html#

Chapter 1

There were three major stages to this refactoring episode: decomposing the original function into a set of nested functions, using Split Phase (154) to separate the calculation and printing code, and finally introducing a polymorphic calculator for the calculation logic. Each of these added structure to the code, enabling me to better communicate what the code was doing.

Bulb moments

Chapter 2

image