Hi!
During my Sunday evening coding session, I worked on a spectrograph in Roassal.
Here a small example:
Each vertical line is a class. Height is the total amount of methods (class + metaclass).
Red = class methods, Gray = instance methods.
The script is the following:
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
| b |
b := RTSpectrograph new.
b objects: (RTLayout withAllSubclasses reverseSortedAs: #numberOfMethods).
b popupText: [ :aClass :cm | cm methodClass name, '>>', cm selector ].
b lineBlock: [ :cls | cls methods, cls class methods ].
b highlight: [ :aClass :cm | cm methodClass isMeta ].
b title: 'Proportion of class methods'.
b open.
-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
A more sophisticated example:
Each vertical line is a class.
Green classes are Trachel classes
Gray classes are Roassal classes
Height of a class is its age, in number of days (i.e., age of the oldest methods of the
class).
Each red dot is the creation of one of its method (i.e., when the method was created).
We can see that Trachel classes have not evolved that much, i.e., most of the methods have
been defined on the same day.
The to obtain this visualization is the following:
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
| b now |
now := DateAndTime now.
b := RTSpectrograph new.
b objects: ((RTObject withAllSubclasses , TRObject withAllSubclasses) reverseSortedAs:
#livingInDays).
b highlight: [ :cls :livingDay | cls inheritsFrom: TRObject ] color: Color lightGreen.
b highlight: [ :cls :livingDay | cls gotMethodOnDay: livingDay ].
b popupText: [ :cls :age | cls name, ' ', age printString , ' days old'
].
b lineBlock: [ :cls | 0 to: cls livingInDays ].
b open.
-=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-= -=-=-=-=
If you try this code one day after I posted it, all the classes will be one pixel higher
:-)
Cheers,
Alexandre
--
_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
Alexandre Bergel
http://www.bergel.eu
^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.