Scripting what should be a simple loop...
Richmond
richmondmathewson at gmail.com
Sat Jul 10 06:06:06 EDT 2010
On 07/10/2010 12:52 PM, zryip theSlug wrote:
> Richmond, I'm not sure to appreciated your humor.
>
> However, with less talent and other circumstances, I had probably write
> something similar somewhere in the net, so I forgive you for this time.
>
> 2010/7/10 Richmond<richmondmathewson at gmail.com>
>
>
>> On 07/10/2010 11:49 AM, Mark Schonewille wrote:
>>
>>
>>> David and Mark,
>>>
>>> Yet, repeat for each rules. Whether using arrays is faster than using
>>> regular variables depends on whether your repeat loop is written smartly.
>>>
>>>
>>>
>> Quite; but that looks a bit like circular logic.
>>
>> Everytime I have to write some sort of loop I get out the plastic cups and
>> the beads
>> and play with them on the floor (preferably with a cup of coffee and some
>> music)
>> until I find what I would term the most "economical" way of doing things.
>>
>> So; prior to writing anything "smartly" one has to work out the 'smartist'
>> logic;
>> if you are incredibly good at abstractions you can do that mentally; if not
>> you
>> can do it with a pencil and paper, or with cups and beads - whatever works
>> for you. LEGO is also quite effective.
>>
>> Then; having worked out one's model; one has to represent it in code.
>>
>> If one's model has already been worked out (squares and arrows on paper,
>> cups and beads on the floor, circles and lines on a blackboard) visually it
>> is, generally, easier to track where things go wrong with one's code by
>> comparing it with one's physical model.
>>
>> _______________________________________________
>>
That may appear a joke to you!
HOWEVER: I do often play around with beads and cups on the floor; it really
does help me with conceptualising what I am trying to do on a computer.
About 35 years ago, a brilliant Maths master at my school taught us
MINIFORTRAN
without benefit of a computer (our punch cards were sent to Imperial
College in London
where my cousin Stephen Mathewson:
http://sim.sagepub.com/cgi/content/abstract/23/6/181 )
organised things. As 13 year old who had never seen a computer, nor had
a clue about logic
his attempt at getting us to understand flow charts ('How to boil an
egg' as far as I remember)
was doomed to failure (perhaps because most of us couldn't boil an egg
to save our lives).
So, this brilliant man, helped us understand with plastic yoghurt pots
and off-cuts of wood from
the woodwork classroom.
My only regret is that I have no way of knowing where the man we called
"Bonehead Barker"
is now, or, even, if he is still alive, so that I can send him a little
something by way of a thank you
for all the help he has given me.
More information about the use-livecode
mailing list