Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

Refactoring

When implementing a program feature, the programmers always ask if there is a way of changing the existing program to make adding the feature simple. After they have added a feature, the programmers ask if they now can see how to make the program simpler, while still running all of the tests. This is called refactoring.

Note that this means that sometimes you do more work than absolutely necessary to get a feature running. But in working this way, you ensure that you can add the next feature with a reasonable amount of effort, and the next, and the next. You don't refactor on speculation, though; you refactor when the system asks you to. When the system requires that you duplicate code, it is asking for refactoring.


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial