Yes, sadly you're right ... The global idea is to have metrics ran on the fly, with a visible impact.
Because I'm not a metric expert at all, calculating the number of characters is a bit (too) simplistic, but if programers play the game, it could be useful I think :) Thank you for your feedback Ben On May 4, 2011, at 2:07 PM, Nicolas Cellier wrote: > I think the idea is interesting. > However, this is to be confirmed by further experiments. > > Humans are very good at adapting their strategy, and one adaptation > could be to shrink names like this: > | aa | > aa := ... > instead of > | allAnscestors | > allAncestors := ... > Definitely not the original goal... > > Nicolas > > > 2011/5/4 Benjamin <[email protected]>: >> In fact, I ant to know if the limit is negative or not because if it's, so >> it just act like a classic PluggableTextMorph ( if the same text morph is >> used to display source code and comments, you do not want to restrict >> comment size ). >> >> But I could use a boolean instead, it was just a first release to know if >> the concept is cool enough to be used :) >> >> >> Thanks for your feedback :) >> >> >> Ben >> >> On May 4, 2011, at 1:05 PM, Fernando Olivero wrote: >> >>> Hi Ben, its a cool idea. To use this physiological "stress factor" to >>> force developers to stop coding really long method. >>> >>> I looked at the class, i only disliked the statement >>> >>> self warningLimit negative ifTrue:[ ^ self basicColor]. >>> >>> you could do : >>> warningLimit: aNumber >>> warningLimit := aNumber max: 0. >>> >>> Fernando >>> >>> On Wed, May 4, 2011 at 11:18 AM, Benjamin >>> <[email protected]> wrote: >>>> Hello Smalltalkers, >>>> >>>> I'm currently working on new code editing tools, and I've implemented a >>>> new subclass of PluggableTextMorph named PluggableTextMorphWithLimits , >>>> with a code oriented feature: >>>> >>>> You have a warningLimit ( 350 by default ) and an alertLimit ( 2* >>>> warningLimit by default ), and the number of characters of the text >>>> displayed is counted ( without space, tabs, cr etc). >>>> >>>> If you are below the warning limit, the background is white ( or the >>>> default color ), if you are between warningLimit and alertLimit, the >>>> background turn more and more yellow, and if you are above the alertLimit, >>>> the background turn orange :) >>>> >>>> After using it for ten minutes, you start shivering when the background >>>> turn yellow ;) >>>> >>>> Gofer new >>>> squeaksource: 'Nautilus'; >>>> package: 'PluggableTextMorphWithLimits'; >>>> load. >>>> >>>> You can test it by evaluating: >>>> >>>> PluggableTextMorphWithLimits example. >>>> >>>> I think it will be used by Nautilus, but maybe more code editing tools >>>> should used it. >>>> >>>> >>>> Thanks in advance for your feedback :) >>>> >>>> >>>> >>>> Ben >>>> >>> >> >> >> >
