September 2004
Intermediate to advanced
464 pages
10h
English
One of the hardest things about working in legacy code is dealing with large methods. In many cases, you can avoid refactoring long methods by using the Sprout Method (59) and Sprout Class (63) techniques. Even when you are able to avoid it, though, it’s just a shame that you have to. Long methods are quagmires in a code base. Whenever you have to change them, you have to go back and attempt to understand them again, and then you have to make your changes. Often that takes longer than it would if the code was cleaner.
Long methods are a pain, but monster methods are worse. A monster method is a method that is so long and so complex that you really don’t feel comfortable ...