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.