Script Pseudo-Coding
If you’re unfamiliar with Perl and could use some tips, see this Web-exclusive sidebar for a closer look at the column's DeleteMP3.pl’s Recurse routine.
August 28, 2001
Sometimes, scriptwriters skip important steps in their haste to get code into production. Scripting is essentially the process of translating our thoughts into another language. If you want to write a good script, you need to make sure your translation is as clear and complete as possible.
Writing your script in pseudo-code first can help clarify the eventual flow of the script and identify the elements necessary for the script to work properly. Pseudo-coding can save you time because it lessens the chance that you'll later discover faulty coding logic. Pseudo-coding also helps you segment the code into sections in a given script or modules that can become subroutines in the script.
The DeleteMP3.pl script in this article's Listing 1 contains a basic Recurse module that you can modify slightly to perform many functions. Table A shows how pseudo-code translates between English and Perl code.
About the Author
You May Also Like