Winter Scripting Games: Profiles in Perfection

James Ward


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 James Ward, who received a perfect score in the VBScript Advanced Division.


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

*

James Ward

James Ward

I’m a 40-year-old Senior Technologist for A-dec in Newberg, Oregon. I got into IT as a matter of necessity during college and never left. Entering IT in the mid-80’s, I started as a PC bench tech and eventually worked my way into technical consulting for Compaq/HP (after spending years as an in-house Systems and Network Admin). After 6 years (and thousands of miles on planes) designing and delivering Microsoft infrastructure technologies, I settled down back home in Oregon. Scripting in some form or another has always been a necessity, from DOS 2.0 batch files in the desperate days of Edlin through the years using Edit, PE (IBM) and, finally, the ever-ubiquitous and dependable, Notepad. I suppose I should move on to something more sophisticated like PrimalScript but I’m afraid I’ll like it too much and neglect my other non-scripting responsibilities.

Today I enjoy constantly discovering new uses for and solving new problems with VBScript and batch files. I believe fervently that any common administrative operation that takes more than a minute to accomplish manually should be a candidate for scripting. My interests include identity management, server virtualization, amateur rocketry and robotics, home automation and dome homes. My clan includes my wife of 16 years, three children, three cats and one dog.

James Ward’s Scripting Tips

Functions and Subroutines are your friend. As you write your scripts always look for opportunities to use a function or a subroutine. Create a library of sample scripts with any routines that you think you will be able to use over and over. (Having the discipline to do this is harder than you might think.) Then use these routines, over and over. Some examples might be a subroutine that sends email or creates/appends lines to a text file, or maybe a function that returns the result of a query of Active Directory.

Some old DOS commands never go out of style. When you’re in the command window testing your scripts something as simple as the FIND command makes it easier to find a lost script that contains a particular comment or function name, e.g. (find *.vbs "writeline" /I). Also, the console is still faster than the GUI. Be sure you customize your command window, too. My favorites are: Screen Buffer Size: Height = 2000, Window Size Height = 40, Black background, bright green text. You’ll have dumb terminal flashbacks if you’re my age.

Create a “play” folder. A sandbox. Give yourself a place to write scripts that can be sloppy, hacked copies of other people’s code, experimental. A place to prove concepts quickly without having to invest the time it takes to dot all the I’s and cross all the T’s. Then, when something works well, copy the important parts out to your regular scripts folder and do it right.


Top of pageTop of page