Code Cast: Legacy Coderetreat Episode 5 - Basic Rules of Refactoring [Java]

preview_player
Показать описание
During this code cast you can see how to use the Basic Rules of Refactoring in order to make sure you minimize the mistakes when extracting a method.

The steps described in this video are:
1) Cover with system tests
2) Duplicate implementation
3) Cover duplicated implementation with tests
4) Reroute original code
5) Remove old implementation
6) Test whole system
7) Test manually

All these steps ensure taking a minimum risk when changing code that you do not know. This is a fast way of refactoring because we are sure we minimize the probability of introducing defects when extracting methods. We have a basic safety net (system tests), then we write more focused tests on a code that is not yet used in production and only after that we change the production code to reroute to the extracted method.

Programming Language: Java
Рекомендации по теме
Комментарии
Автор

Nice videos, Adi! I am definitely looking forward to more. PS: it seems to me that the sound volume level in this video is significantly lower than in the rest of YouTube. Or is it perhaps just my computer? :)

Pawel-D
visit shbcf.ru