Tags

, , ,

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:

hollywood

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:

TestingAndRefactoringLegacyApp1

TestingAndRefactoringLegacyApp4

TestingAndRefactoringLegacyApp3

TestingAndRefactoringLegacyApp2

EDIT 2013/06/07: Sandro pointed me that there is already C# version (and C++, PHP and Python too) of this kata:

But beware – there is no solution 😉

Advertisements