[Newbies] String construction and replacement

Randal L. Schwartz merlyn at stonehenge.com
Mon Feb 2 22:28:55 UTC 2009


>>>>> "Claus" == Claus Kick <claus_kick at web.de> writes:

Claus> How would you refactor something like that?

If you can, get a copy of Kent Beck's "Smalltalk Best Practice Patterns".

But the key thing to keep in mind is that anything that isn't just a simple
message send (unary, binary or keyword) has some subsequence of one or more
message sends that can be pulled out and named separately with an
intention-revealing selector, providing both code reuse, and clarity.

-- 
Randal L. Schwartz - Stonehenge Consulting Services, Inc. - +1 503 777 0095
<merlyn at stonehenge.com> <URL:http://www.stonehenge.com/merlyn/>
Smalltalk/Perl/Unix consulting, Technical writing, Comedy, etc. etc.
See http://methodsandmessages.vox.com/ for Smalltalk and Seaside discussion


More information about the Beginners mailing list