Showing posts from January, 2009

Working Effectively with Legacy Code

This article are just my notes from the book. Finally the one that covers my daily job. Books like Refactoring (by Martin Fowler) or Clean Code (by Robert Martin) are all fine, but also a bit academical. I have never professionally encounter a clean code. The code is never enough test-covered these days (here in Prague at least). And this book is the one that deals with non-tested huge code-base or a legacy code for short. The Mechanics of Change Of course we all read the Refactoring book, which is almost a bible among the developers. So we know that the change is ubiquitous and we can preserve quality of code over time only by refactoring. However there is a catch - code must be tested. That is why we need to put it under the test first. Here is algorithm of change for legacy code: Identify change points . Obviously you have to find the place for your changes on your own. Every programmer must have done this a million times, so there is nothing new to you here. Find test points