Refactoring Presentation
This is the companion page for my presentation Better Software Through Refactoring. I’ve included the slides, sample code, and some additional books for further reference below.
Abstract
Refactoring is the process of improving the design of code without changing the behavior. The practice of refactoring is increasingly becoming a required skill for any professional developer, particularly as agile methodologies and incremental development spread. This presentation will bring you up to speed in refactoring for Java but will applicable for any OO language.
This presentation will cover some of the fundamental refactorings with real-life code examples, including extract method, replace conditional with polymorphism, and composed method.
We will discuss the importance of testing when refactoring, the role of upfront design, and how to sell refactoring to management. We’ll also discuss how to use refactoring in non-agile environments and how to leverage modern IDE’s for automated refactorings. You’ll leave this presentation with practical skills to drive better designs and create better code.
Example Code
Grab the full zip file. Note that I’ve included the Eclipse metadata file (the .* files in the root), but if you use a different IDE you can just delete them. If you are using Eclipse 3.1, you should be able to do a straight import and be set to go.
Presentation
Download the zipped powerpoint file until I can get it into a more web-friendly format. The slides are done in a pretty sparse style, so I doubt if they will make a whole lot of sense by themself. The file is about six megabytes.
References:
- Big Ball of Mud by Brian Foote and Joseph Yoder
- Refactoring catalog
Recommended books:
all book links go to Amazon’s page on the book

The seminal book on refactoring by Martin Fowler. Refactoring was being researched and practiced before his book, but his is the one that really kick started it.
Kierevsky’s book really takes refactoring to the next level and bridges the gap between patterns and refactoring. His book builds very nicely on Fowler’s.
Kent Beck’s book is a great introdution to test driven development, which will ultimately result in having code much easier to refactor from the start.
Legacy code == any code without unit tests. Feather’s book is a fantastic resource for all sorts of dependancy breaking techniques to get just enough code under test to start cleaning it up. I also have a longer review I wrote a little while ago.

This book is not refactoring specific and covers the entire practice of software development. However, if you are interested in improving your craft, I can’t recommend it enough.
