Two weeks ago now I gave an introductory tutorial on “From Code Smells to Unit Tests” (pdf) at Agile Tour Toronto (thanks to the organizers for a great conference). The slides walk cover an introduction to Technical Debt, SOLID Principles, The Sea of Complexity, Basic Code Smells, Refactoring and Unit Testing Basics, Good Practices, Bad Practices. As usual the slides are only taste of what was said. In the session two elements didn’t work: First I wasn’t expecting to have to explain SOLID Principles – I was caught off guard and was ill prepared. Second the pair Refactoring Demo tanked. The plan was to invite audience members up to refactor Martin Fowler’s Movie Example (git hub browseable, zip file) – the plan was that people would make small improvements five minutes at a time. The goal was to help people integrate what we had covered in the seminar already by doing it live. There has to be another way of providing an integration event, basically I would need to give the audience a way for experiencing refactoring for themselves.
Please try the Movie Example (git hub browseable, zip file) and see how far you can get with some simple refactorings.
References:
BTW David Koontz did the hard work of typing in Martin Fowler’s Movie sample – I just modernized it (Java 1.2 –> 1.6).
Caveat Emptor - if you buy any of the books after clicking on my link I get 4% of the price. In all likelihood that means I might be able to afford a coffee or two.
If you enjoyed this post, subscribe now to get free updates.