On 13/12/2010 09:25, Norberto Manzanos wrote:
Yes, I am.
I can teach people how to write.
Look, this is the unique class with only one method of my AI system:

LinTirany  >> analize: aString

| errors |
errors:= OrderedCollection new.
#('would' 'very' ) do:[:each | (aString substrings includes: each) ifTrue:[ errors add: 'Avoid ',each]].
aString substrings size >  40 ifTrue:[errors add: 'Avoid long sentences'].
^errors

Un modesto aporte a su genialidad:
aString substrings se calcula tres veces (dos dentro del do: y una para el size), pero es constante... asignarla a una variable local ayuda a la performance y la lectura.

Y como diría un conocido:
"The world is yours!"
:-)

--
signature

carlos e. ferro | senior developer caesar systems | see clearly. decide smarter.

[email protected] | t: +1.281.598.8790 | t: +54.11.4389.0126 | www.caesarsystems.com 

This message and any attached documents contain information from Caesar Systems LLC that may be confidential/trade secret and/or privileged. If you are not the intended recipient, you may not read, copy, distribute or use this information. If you have received this transmission in error, please notify the sender immediately by telephone or by reply e-mail and then delete this message.

--
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [email protected]
 
http://www.clubSmalltalk.org

Responder a