Duration: 2 to 3 days
Recommended Class Size: 10 to 20 
Basic to advanced understanding of object oriented design principles.

Refactoring is the process of changing software without altering its external behavior. Refactoring software to make it maintainable and extendable has become a recognized best practice and has been incorporated into many Agile practices such as Scrum, TDD and XP. Refactoring improves the structure of the design of a system to allow for later extensions or to make maintenance easier. This course teaches attendees how to recognize that code needs to be refactored (code smells) and the steps for common refactorings including the refactorings provided by tools such as those in Eclipse and the Refactoring Browser. It is important to refactor software in a disciplined way to minimize disruptions and to allow the system to safely evolve. C#/.NET, Java, C++, and Smalltalk examples will be shown that illustrate how and when to refactor.

Exercises will enable students to gain proficiency in spotting poorly structured code and then making appropriate refactorings. Advanced Refactorings will also be examined including Refactoring to Patterns.

Joe's training provided me with the knowledge and skills needed to assist my company in the process of TDD adoption. The course gathers theory and practice and provides a solid foundation on refactoring. As a bonus, you have the opportunity to meet Joe, a guru from our area, an extremely fun person with incredible teaching skills. -- Guilherme Utrabo, Software Engineer

Course Objectives:

  • Motivation for refactoring: when and where and why do it?
  • How refactoring supports agile object-oriented development
  • An overview of common “code smells”—signs that code needs to be refactored
  • Avoiding cut-copy-paste-modify reuse
  • Coding best practices: public methods, using inheritance properly, method size/level of detail, and intentional name
  • A review of the most important refactorings in Martin Fowler’s Refactoring book
  • Learning how to use automated refactorings such as those in Eclipse and the Refactoring Browser
  • Showing how refactoring meshes with emerging lightweight agile development processes
  • Showing how refactoring and testing can facilitate safe, graceful code evolution and rehabilitation

This course is recommended for object-oriented designers and software developers; specifically, those who are creating object-oriented systems and frameworks. To complete the course exercises, attendees should understand object-oriented programming concepts and have experience coding in C# or Java. It is also recommended that the attendees should be familiar with Design Patterns or have taken a Design Patterns course.