The Number 1 independent website for ACL information!

TexasACL User Group
About Us
Training
Why ACL
Essays & Scripts
ACL News
Events
Links
FAQ
Site Map
Support Us
Modular Script Writing
 
When I first started auditing, one of the seniors I worked with liked to say, "If you have eyes plagerize."  It was his way of saying, "Don't recreate the wheel."
 
If you, or somebody else, has figured out an effective way to do something, it is a waste of time to try to figure it out every time the same scenario presents itself.  This is particularly true with script writing, wherein the code utilized on a project today might be similar, if not identical to the code utilized tomorrow.  Anybody who has written a number of scripts knows that they will often refer back to older projects to remember how they did something.
 
Modular Script Wriitng takes this concept to the next level.
 
Modular Script Writing is the notion that many scripts will use the same features/processes over and over again.  Rather than copying the concept from one project to another, entire segments are duplicated.
 
For example, suppose that every projects you worked on uses the same introductory commands?  Currently, every project I work on asks the following things:
 
1) For the users initials?
2) What fiscal year are we working on?
3) What drive is the share/common drive?
4) What is the path to the folder containing the original data?
5) What is the path to the folder where we want to save final results?
6) Do we need to load data from scratch?
7) Do we want to perform testing on data alreay loaded?
8) Do we want to load results that have already been computed?
9) Do we want to "clean up" the project?
 
There are also a number of standard commands that I include in my start up script.  As the start up section is fairly standardized, I have written a code that can be used on all of my projects, I just have them stem from this point going forward.
 
Another modular script that I've written does comparisons between two tables.  Again, I've written the code, using the same variables/conventions from the previous modules, in a manner that will allow me to drop the table comparison module into a project.
 
By using a modular approach, you can enhance efficeincy.  The challenge is that you have to develope the modules and utilize consistent variable/naming conventions.