Squeak
  links to this page:    
View this PageEdit this Page (locked)Uploads to this PageHistory of this PageTop of the SwikiRecent ChangesSearch the SwikiHelp Guide
RealtimeCodeMetrics
Last updated at 3:30 pm UTC on 14 January 2006
I don't remember exactly where it was I read an article about it, probably JOOP, where they implemented real time code complexity metrics at the method, class and class heirarchy.

This means that every method would have one or several colored bars, each giving an indication of how complex this asspect of the method is: how many conditional, loops, pairs of parenthesis, message sends, whatevery makes code hard to understand.

Something similar is implemented for the class and class heirarchy level, such that one can browse the system looking for things that are too complex and fixing them, for example.

This also means that you go out and find good and bad examples of code more easily.

In general, assuming that given immediate feedback any programmer will attempt to simplfy his code, this should mean very fast learning.

BTW, if we also have a Refactoring Browser, then knowledge could be shared: anything the program thinks should be transformed should be reflected in the metrics.

Generalizing the idea, code complexity is not the only thing measurable. I'm sure code can be analyzed in many helpful ways, for example, an approximation of how time costly code is should be doable, given type hints.

Source Style As User Interface



Abstract(1) of "Real-time complexity metrics for Smalltalk methods", by S.L. Burbeck
Abstract(2) of "Real-time complexity metric tools for visualAge smalltalk and C++", by Subroto Battacharya and Stephen G. Graham



See RealtimeCodeMetrics