This post originated from an RSS feed registered with Java Buzz
by Franco Martinig.
Original Post: Testing and Refactoring Legacy Code
Feed Title: Java Software Development Videos and Tutorials Directory
Feed URL: http://www.java-tv.com/feed/
Feed Description: Java-TV.com is a directory of videos, interviews and tutorials focused on software development activities with the Java programming language.
In this video, we take a piece of crappy Java code with no tests. Our objective is to write tests for it and then refactor to make it better. The code has the most common problems that much larger legacy applications have, like Singletons, static calls and feature envy.
It also has some design problems. Fixing that is quite hard, mainly when we need to write all the tests before we start the refactoring. Another rule: We cannot change production code if it is not covered by tests but quite often ...