Save Lives: Debug Code
Graham Samuel
livfoss at mac.com
Fri Apr 14 14:42:56 EDT 2006
On Fri, 14 Apr 2006 11:01:24 -0500, "J. Landman Gay"
<jacque at hyperactivesw.com> wrote:
> Rob Cozens wrote:
>
>> Hi Marielle,
>>
>>
>>> what I would like to get discussed here is about the strategy
>>> persons
>>> on this list have to prevent bugs getting into their codes in the
>>> first place and how to spot and process them when they did.
>>>
>>>
>
> <snip Rob's excellent list>
>
> Your list is similar to (though more comprehensive than) something I
> wrote for testing HyperCard stacks almost 10 years ago. Therefore, I
> think your list is excellent. :)
>
> <http://hyperactivesw.com/Testing.html>
All great stuff. I would add two ideas: use explicit variables (which
I confess I don't always do - but it **must** result in cleaner
code); and code 'defensively', but which I mean that the design and
scripting of the program should be done with the idea that the app
could crash at any time, and a restart should be sufficiently robust
to cope with loose ends in the data etc which may have resulted from
the crash - for example, if your app writes a private text file, you
should still design it so that integrity checks can be made every
time you read it, and if it seems corrupt, you have some strategy for
dealing with that eventuality.
just one Easter Eurocent (on account of the holidays)
Graham
------------------------------------------------------------------------
---
Graham Samuel / The Living Fossil Co. / UK and France
More information about the use-livecode
mailing list