Variable assignments that are never used on ANY code path are a bad idea. Usually this comes from refactoring code and not catching that the assignment is not used. The code can be very confusing because leads the reader to think that the assignment is important. Using this rule will help clean up legacy code. Remember, legacy code is code that was written more than five minutes ago.

Last edited Feb 22, 2009 at 5:36 PM by JeffLeBert, version 1


No comments yet.