Winter Scripting Games: Profiles in Perfection

David Bayer


As part of the 2007 Winter Scripting Games the Script Center is profiling competitors who recorded a perfect score in the 2007 Scripting Games. Here, in his own words, is a little something about David Bayer, who received a perfect score in the VBScript Advanced Division.


Check out more Profiles in Perfection from the 2007 Scripting Games.

*

David Bayer

David Bayer

David currently lives in Nashville, TN and is one of the few remaining native Nashvillians.  He grew up around computers, and his first attempts at any sort of programming were on an Apple II+ and an original IBM PC.  After spending too-many-years-to-count away from computers, and erasing all knowledge of programming in order to make way for new data, he finally returned to it in the late 1990s with DOS batch scripting.  

Later, when he found himself employed as a systems administrator, he decided there had to be a “better way” of doing things.  He settled on VBScript as his language of choice; having the script interpreter pre-installed with Windows made life much easier.  He began writing logon scripts, and inventory scripts, and other system administration scripts, and Active Directory scripts, and scripts to send text pages, and so on and so forth.  David is still a systems administrator, now supporting over 300 desktops and a handful of servers, and continues to script anything that seems appropriate.

Tips

Use the best tool for the job.  Some things are easier with VBScript, others with DOS batch scripts, others with other languages.  Don’t spend the extra effort writing a 30 line script in one language when 10 lines in another will do the trick. (Unless you’re trying to learn something.)

Documentation is a wonderful thing.  VBScript in a Nutshell from O’Reilly publishers is a great reference for the language, syntax and usage.  The Microsoft Windows 2000 Scripting Guide from Microsoft Press is perhaps a better tool for the beginning scripter with no previous programming knowledge.  Don’t forget your own documentation – document your scripts as you go. You’ll appreciate it later.

Test, test, test.  It’s easier to troubleshoot small pieces of code than an entire script.  Use Wscript.Echo commands to note where you are in a script and to report the value of variables while troubleshooting – it will help track down where a script is failing.  Turn off On Error Resume Next while troubleshooting so that you see all errors.


Top of pageTop of page