OT about size... Re: [OT] Is there a relationship between Xtalk languages andsmalltalk?

Dar Scott dsc at swcp.com
Fri May 20 14:56:10 EDT 2005


On May 20, 2005, at 10:57 AM, Mark Wieder wrote:

> AG> When I finish an app, I like to spend some time re-coding the 
> routines
> AG> singing the followoing mantra: "can I do it in fewer lines?". I am 
> very
>
> I'm constantly reengineering my old code, too, but I find that it
> generally *grows* in size as I go back and add more comments. Trying
> to do things in fewer lines can also sometimes lead to emphasizing
> cuteness over readability.

Often generalization and simplification result in less code AND less 
comments.  Sometimes scripting to standards (or the literature) 
requires less in comments because the vocabulary is established.

Sometimes the line between cuteness and readability depends on the 
individual.  One person might use vector functions to operate on color 
spaces while another might find that obfuscating.  (Just by my use of 
the word "spaces" we can see how I might look at color.)  Since most of 
the literature in CS, printing, physics, biology and psychology uses 
vector notation, I think it is reasonable to use.

If script lines can be factored out into functions or custom commands, 
then there are common concepts.  Often with a little juggling, those 
can match trade concepts exactly, but other times you do have to add 
comments on what the common concepts are.

Dar
-- 
**********************************************
     DSC (Dar Scott Consulting & Dar's Lab)
     http://www.swcp.com/dsc/
     Programming and software
**********************************************



More information about the use-livecode mailing list