Refactoring: extract method

Extract method is one of the most popular refactoring method when dealing with legacy code. In legacy code we can often find methods that are very long. My favorite findings methods about 2000 lines of code. Cool, isn’t it? Those methods have usually many responsibilities and they are hard to debug. Having more than one responsibility in one method leads also to duplicated code because some responsibility is required in more than one place in code.

 

NB! This blog is moved to gunnarpeipman.com

Click here to go to article

2 Comments

Comments have been disabled for this content.