O'Reilly logo
  • Jonas Nielsen thinks this is interesting:

Here is a heuristic that I use when looking for effects:

1. Identify a method that will change.

2. If the method has a return value, look at its callers.

3. See if the method modifies any values. If it does, look at the methods that use those values, and the methods that use those methods.

4. Make sure you look for superclasses and subclasses that might be users of these instance variables and methods also.

5. Look at parameters to the methods. See if they or any objects that their methods return are used by the code that you want to change.

6. Look for...


Cover of Working Effectively with Legacy Code


Manual algorithm for locating effects