Tuesday, June 06, 2006

Is This a Code Smell / Name the Code Smell


I did a lecture on "Code Smells" based on those found in Martin Fowler's "Refactoring" book. One of the things that wasn't covered in those smells is the practice that I show on the right, what I have so far called "Subclassing for Functionality". My questions are these:
  • Is the practice of "Subclassing for Functionality" a Code Smell or is this bad practice better categorized under some other grouping?
  • Is there a better name for this bad practice? After all, Fowler's Code Smells have catchy names ("Shotgun Surgery", "Refused Bequest", "Divergent Change"...). How about the name "Illogical Hierarchy"? Can anyone think of a catchier term? Or at least a more precise or sticky term?

2 comments:

  1. how about "chicken-duck heritage"

    ReplyDelete
  2. Studes

    Stands for stupid design. hehe.

    ReplyDelete