Fluent Refactoring @ YouTube
It’s about refactoring. There have already been many refactoring related videos/documents, but interesting point of this presentation is the “Refactoring is Math” statement.
It iteratively follows through the small set of logical conversions to reshape the code structure.
For example, flattening the multiple layers of if/else statements and re-order them to make it easier to move around. Then, remove the duplication appeared through this process. It’s like mathematical conversions of formula.
In the refactoring process, it’s common to use unit tests to verify the original behavior is being maintained and doesn’t break anything. However, unit tests is not the perfect solution due to the nature of its lack of coverage.
Therefore, minimizing the change of each step would be important, and this kind of mathematical (logical) break-down of modification is interesting approach to reduce the risk of breaking change during the process.