Chapter 2. Finding your starting point
This chapter covers
- Deciding where to focus your refactoring efforts
- Thinking more positively about your legacy software
- Measuring the quality of software
- Inspecting your codebase using FindBugs, PMD, and Checkstyle
- Using Jenkins for continuous inspection
After reading chapter 1, you should have a clear idea of what legacy software is and why you’d want to improve it. In this chapter we’ll look at how to formulate a plan for improvement and how to measure your progress once the plan is in place.
Let’s start with a small thought experiment. I want you to choose one piece of legacy software that you have experience maintaining. Think hard about this software and try to remember everything you can about it. Every bug you fixed, every new feature you added, every release you made. What kind of problems did you encounter? Was it a nightmare just getting the thing to run on your local machine, or working out how to deploy it to production? Are there any classes in particular that you grew to hate? Any memories of whole days wasted on failed refactoring missions? How about edit-and-pray fixes that led to horrific bugs in production?