Testing and Refactoring Legacy Code
Today at work I did a shameless remake of "Testing and Refactoring Legacy Code" kata by Sandro Mancuso. I've seen it recently at GeeCON and immediately wanted to steal a little bit from his fame share this experience with my coworkers. IMHO author did a very good job preparing example code which gives great opportunity for presenting variety of testing and refactoring techniques. Most importantly it's presented in a manner interesting for both complete beginners and intermediate practitioners.
Original presentation took only 1h. I used over 3h split in 2 parts (interrupted by moving the team from one floor to another :)). Why so long? We are mostly .NET shop, so I ported it from Java to C# and used equivalent .NET tools/libraries. But no, no, it's not a reason :). There was a lot of discussion
- which is GREAT - it means I didn't bore them too much! Also, I expanded subject matter by talking extensively on Inversion of Control pattern - completely unrelated to this:
It was also a good occasion for lobbying Resharper and NCrunch :).
Sources and notes for the presentation are on my GitHub account:
https://github.com/orient-man/LegacyApp
Here are some photos from the event, taken by Michał Wiktor Żmijewski:
EDIT 2013/06/07: Sandro pointed me that there is already C# version (and C++, PHP and Python too) of this kata:
@orientman Great to know you ran the session in your company. If I knew I would have saved you time. C# version: github.com/sandromancuso/…
— Sandro Mancuso (@sandromancuso) June 6, 2013
But beware - there is no solution ;)
Comments (1)
Comments are from the original WordPress blog. New comments are not supported.
[…] change ain't easy. I did a lot of code reviews and whiteboard talks but gave only one longer presentation – which is a shame. I should have done more pair programming instead of reviews. Conferences […]




