This chapter has focused entirely on refactoring. We have touched on the importance of refactoring. We have also discussed the various code smells that can be cleared up with refactoring. We have also discussed the stages in the life cycle when refactoring can be undertaken. It is something that should be done at the earliest possible time. Refactoring also completes the test-driven life cycle of Red-Green-Refactor, just before it starts again.
We touched upon various refactoring techniques, focusing in particular on the ones that are relevant to programming in Scala. It would be a good idea to go through the example application code and compare our code to see what can be refactored.