THE FOLLOWING CODE, CONFIGURATION, AND SCRIPT excerpts show a few simple examples of how the sample application in this book was refactored as it was being built incrementally.
The book’s code zip file contains two project directories for our sample application:
timex2/. The latter contains much of the refactored code discussed next.Because you have both versions, you can compare the two code bases to see how refactoring works in the real world. Remember, it isn’t about being perfect the first time—just good enough. Get everything working first; then optimize your code later. This is what refactoring is all about—continuous design and redesign, by improving code as necessary, versus ...