There are always multiple ways to look at a given situation. When it comes to data, the more versatile the infrastructure, the more you have a chance to actually do take a look at it from multiple points of view.
In this demo we take a look at how cohesive are the names of classes. The question is how can we identify possible misplacements or wrong names:
Thus, an interesting experiment consists of relating the similarity of class names with the namespaces they reside in. To achieve this we cluster visually the classes based on the similarity of their names, and then we color each class with a unique color based on the identity of the parent namespace.
This is a short analysis exercise. The goal is one of exploration, of playing with the system to learn from it. Watch it below.
Here is the code of the visualization:
view shape rectangle size: #nameLength; identityFillColorOf: #namespaceScope. view nodes: classGroup. view edgesToAll: [ :class | classGroup select: [ :eachTarget | (eachTarget name pairsDistanceFrom: class name) > 0.5]]. view graphvizLayout neato