Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

(Original creator: eknochs)

This blog is an extension to my earlier blog on Removing Dead Code.  One of the benefits of removing dead code is to make future code maintenance easier, and therefore cheaper.  Recently I read a blog which reminded me of the proper definition of refactoring, and I realized that refactoring is a logical next step after removing dead code.  One problem is knowing what it costs to do it. Let’s start with the original definition of refactoring, as defined by Martin Fowler and Kent Beck: A change made to the internal structure of software to make it easier to understand and cheaper to modify without changing its observable behavior… It is a disciplined way to clean up code that minimizes the chances of introducing bugs. So the users will visually see no benefit from this kind of work.  Without a specific project mandate to improve the code, what developer will risk breaking a working module just to make it easier to understand? I think that refactoring will mostly get used when it’s piggybacked on to other tasks, which could be from one of these categories:

...