On Friday, December 6, 2002, at 04:14 PM, John Lodge wrote:
Thanks everyone for your help. The handler finally works!
Great! Glad you got it working (sorry for the bloopers).
Just for your edification: Good on you. Creating code and adding comments as a way of describing what's happening is a very powerful way to do software. Too often you can get so wrapped up in trying to get something done you forget to add internal comments, but those are breadcrumbs that act as logical trail markers and allow almost anyone to see what you're doing and how it happens. (It's also helpful for you if you have to return to that code three years later; you don't have to wonder what the hell you were thinking when you wrote *that*. ;)Final version below ... with my commentary.
Also, stepping through and documenting your logic can show you places where you might be able to optimize things, consolidate, make a tighter, faster, more elegant piece of work. Documentation helps you think about and remember what you've done, and can act as a pointer to further exploration (for instance I've included comments such as "perhaps this can be optimized" which I return to later and, yes, sometimes I can one-up myself).
You need to know that the best programmers will document code. If not line for line, at least in header descriptions somewhere (block comments added at the beginning of handler/function/subroutine calls). That you put in the extra time to write the comments shows you already have the instincts to be a damned good programmer. Well done.
According to tradition, you are a programmer in a new language when you do a "Hello world" program. I think that's just the start. I think you become a programmer in that language when you add comments and documentation as part of your work in the code, because it means you understand the process and can explain it to others. You've done that. You say you're new but you already have the instincts to master the game.
Welcome aboard!
Warren Ockrassa | http://www.nightwares.com/
Director help | Free files | Sample chapters | Freelance | Consulting
Author | Director 8.5 Shockwave Studio: A Beginner's Guide
Published by Osborne/McGraw-Hill
http://shop.osborne.com/cgi-bin/osborne/0072195622.html
PS: I'm not really trying to sound like Yoda. For starters I can't jump and spin like he does. Plus my lightsaber is yellow. ;)
PPS: If you want to look at other books on Lingo, I can recommend _Lingo!_ by Tab Julius, the owner of this list -- it was written for Dir5 but it's so well done the concepts carry; _Director in a Nutshell_ and _Lingo in a Nutshell_ by Bruce Epstein; and _Lingo Sorcery_ by Peter Small, a very good introduction to the ideas behind object-oriented programming (OOP), specifically in a Director-based milieu.
[To remove yourself from this list, or to change to digest mode, go to http://www.penworks.com/lingo-l.cgi To post messages to the list, email [EMAIL PROTECTED] (Problems, email [EMAIL PROTECTED]). Lingo-L is for learning and helping with programming Lingo. Thanks!]
