A couple of weeks ago I bought the book “Working Effectively with Legacy Code” (WELC) by Michael Feathers (MF). I’m now more than halfway through this excellent book and can’t help to regret I didn’t buy this one long time ago. It is an absolutely “must have” for all programmers working with legacy code and who are struggling to get these nasty systems under test.
In a recent post I discussed how I was able to build a service layer on top of a legacy code base and successfully unit test these services using the adapter pattern. In order to create the required services we needed to try and understand the legacy code we were interfacing with. With over 1000 classes, some of them over 5000 lines long and with 0 % unit test coverage, this was very challenging indeed. This code base is practically crying for some refactoring and with this great book in my possession, I wanted to try out some of the theories. Here’s how it went…..
Posted by ketiljensen