Agile Engineering
practices training and
courses

1 day

Agile Engineering
practices training and
courses

Refactoring Legacy Code

1 day

Refactoring Legacy Code

The Refactoring workshop is a one day training module.

Engineering practices such as Clean Code, OOP, TDD etc. are noble ideas, and it’s not that hard to implement them when the code is new and shiny, but when it comes to an old and tangled legacy code, things are a bit more complicated.

In this workshop we will provide you techniques and skills that will help you tackle the difficulties that pop up when you come to refactor a legacy code.

 

Target Audience

This workshop is for developers who have struggled (or are struggling) with a legacy code. Also, we assume that these developers have a basic knowledge of how to write unit tests.

 

You will leave this one day workshop with:

  • Understanding of the economics of refactoring.
  • Skills to do a day-to-day refactoring.
  • Techniques to write unit tests for legacy code.
  • Skills to deal effectively with large scale refactorings.

 

Syllabus

  • The importance of refactoring:
    • The definition of refactoring
    • Lehman’s law of increasing complexity
    • Technical debts
  • IDE refactoring catalog:
    • Rename
    • Extract Method
    • Introduce Parameter Object
    • Extract Class
    • Extract Superclass
    • Extract Interface
    • Move Method/Field
    • Pull Up / Push Down
    • Hands-on exercise
  • Dealing effectively with legacy code
    • The definition of legacy code.
    • Working with feedbacks
    • Legacy code dilemma
    • Identify change points
    • Find tests points
    • Make the code testable (break dependencies)
    • Write the right tests
    • Hands-on exercise
  • Mikado – dealing effectively with large scale refactorings
    • Hands-on exercise

 

This is a general syllabus and in case of an in-house training, it is possible to make the necessary adjustments to make it more appropriate for your organization’s specific needs.