Planning Your Script
Now that you've seen a script's basic structure, you're ready to learn how to plan a script from the ground up:
Take your time defining the program's task. Think it through thoroughly. Write it down and trace the program logic. When you're satisfied that you understand the input, output, and the transform process you'll have to do, proceed.
Order a pizza and a good supply of your favorite beverage, lock yourself in for the night, and come out the next day with a finished program. This sounds cute, but it is oddly good advice. Sometimes, it seems as if more bugs stem from interruptions while programming—which cause loss of concentration—than from any other source. And while you're sequestered, don't forget to document your ...