Newbie... Strict Compilation mode

Jim Bufalini jim at visitrieve.com
Sun May 10 01:02:33 EDT 2009


Mark Wieder wrote:

> I recognize hyperbole when I see it, but nonetheless I don't think you
> can have 8 lines of declarations and three lines of actual script (and
> of course someone will post some code that proves me wrong). If you
> come across a handler like this then you have at least five lines of
> declarations that are not being used. And then you're absolutely right
> to strip them out <g>.

LOL. Actually, maybe not quite that much, but when I first write a handler
or move it over from one project to another, I do things like assign
everything like *the result* to variables, declare the variables one per
line, make everything verbose like if then else statements a minimum of five
lines, etc. 

This way, if I need to debug I can put in a breakpoint and hit trace, sip
coffee and watch which part of an if then else gets hit and variables
change, including ones that don't show up normally in the debugger, because
lots of times just putting such things to the message box can affect the
program itself or flash by too fast and I always miss deleting at least one
of those puts. ;-)

Then when I'm happy, I can clearly see the vars that need to be removed and
then put the remaining all in one declaration line per type and shorten up
structure like if then else, etc. But, if you looked at something of mine,
in progress, you could see close to what she described. But there is a
"lazy" method to my madness, even if looks like more work up front. ;-) It
also allows me to leave working on something in mid-thought and return to it
a week later and quickly remember where I left off.

Aloha from Hawaii

Jim Bufalini




More information about the use-livecode mailing list