January 2013 – Refactoring legacy code

A little evening refactoring by joe.oconnell

A little evening refactoring by joe.oconnell

Date: Thursday 31st January 2013

Time: 7:30pm start

Venue: The Stafford Ale House

Location: Google Maps

Why Refactoring?

Well, a Happy New Year to one and all! Over the last few sessions, we’ve discussed The Alien Invasion project muted for 2013 – this project aims to change the implementation of the original Alien Invasion Challenge to support language agnostic clients. This will require reworking of ‘legacy code’ defined by Michael Feathers as ‘code without tests’.

To support this project, Paul Williams, suggested that we start 2013 with a smaller challenge to equip the group with the skills and some experience in wrapping legacy code in tests. This will then allow refactoring to be applied safely, without worry that functionality will be regressed…

The challenge

This challenge focuses on a legacy C# component with an automated build script but no unit or integration tests. During the evening, we will progressively get the code under test, at which point we will be able to change the functionality through normal TDD refactoring.

To ensure we all get equal input into the session and encourage communication and shared learning, the session shall be in the Randori Session Format – a first for Agile Staffs? This format also has the advantage of only one development machine being used, and thus there are no software or setup prerequisites for the session. The session will however use Visual Studio 2010 and Resharper to drive unit Tests using NUnit so any exposure of these would be advantageous but not required.

Edited…

The code is available on GitHub and the presentation on Paul’s website. The code will be pushed back at the end of the session for reference. This will also provide the group with exposure to Github to be used for the Alien Invasion.

 

Leave a Reply

Your email address will not be published. Required fields are marked *