It is time once again for the annual Scripting Games. This year, we are implementing some changes. The first change, which will be immediately obvious to even the most casual observer, is that we are doing the Summer Scripting Games instead of having the Winter Scripting Games. One reason is that we like summer sporting events better than winter events…they are warmer.
Our theme for this year's games is the decathlon: 10 events designed to test your skill, strength, stamina, and scripting poise as you evaluate yourself against challenges designed by an evil scripting genius from the planet Argon. Can you go the distance? Can you run with the big dogs? Can you outwit an evil scripting genius from the planet Argon? Only time will tell. The truth will be in the script pudding. Act now and receive a free set of cheap kitchen knives…sorry wrong commercial. (No knives for you. We barely have budget to afford upkeep on the Scripting Ferrari. Yeah, joke.)
After hundreds of hours of meetings, thousands of e-mail messages, and millions of instant messages (ok, so we made the decision over a latte in the break room of building 43), we have decided that the essential element, the core piece of the Scripting Games, is education and not competition. Sure, you participate with yourself, but stack-ranking always rankles us and is not in the keeping with the spirit of community that exists among scripters around the world. Scripters like to share information. As soon as we have figured out something, we can't wait to share with our friends, to make a post to our blogs, or to send it by e-mail to firstname.lastname@example.org for inclusion in the Community-Submitted Scripts Repository.
So we will not have a leader board this year. In fact, there will be no sending of scripts to the judges by e-mail because we do not feel the need to judge your work. After all, it is your script, and if you are happy with it, we are happy with it. This is about love, joy, and peace—not crushing the competition.
So how do you know if you are on the right track? Do what you always do. Look at other people's scripts. Because this is a community event, we thought it appropriate to partner with leaders in the community. The people, a whole bunch of Windows PowerShell MVPs, have kindly offered to allow us to host the 2009 Summer Scripting Games over at their site. This is like your best friend inviting you over to try out their new table saw. Our good friends at PoshCode have been working really hard this year and are going live with their new code repository. They have invited us to stress test it for them.
All scripting entries will be submitted using the PoshCode code submission tool. What does this have to do with feedback on your script? Well, you upload your script, and the community will vote on the scripts they like. Because you are a contestant, you get to vote on other people's scripts as well. Now to make this more like the real world and in the spirit of community and harmony, you are allowed to borrow your friend's code as long as you give something back. So if you see a script you like, go ahead and borrow the code and then make it your own. Modify it, change it, fix it up. Make it better. This is the way things are done every day in the scripting community. No more secret ballots, no more sneaking around and trying to sabotage the other teams entry. Everything is open. We are friends, neighbors, all inhabiting the same community. Did someone start singing "Kumbaya"? Could you ask that person to stop? Thanks.
So much for philosophy. What about the games themselves? Well this year, there are 10 events for two divisions. The divisions? There are two of them: a VBScript division and a Windows PowerShell division. There are two levels of participation in each of the two divisions: beginner and advanced. Feel free to participate in both divisions and to participate at both levels. Of course, that would entail writing forty scripts, but if you want to turn this into an Ironman qualifier, go for it!
Because we are not having a leader board this year, there is no need to worry about ties in the scores. We Scripting Guys are a fairly laid-back lot in our old age, but if you are worried about ties, we suggest Brooks Brothers. We found a very nice hand-painted Italian silk tie there last year. The benefit of this laid-back approach is there is no sudden death, which we think sounds way too violent anyway.
Someone once said that victory is its own reward. This is especially true when you are competing against yourself to your own betterment. Though we are all for voluntary simplicity, you might feel the need to clutter your life just a bit, especially once you get a load of the prizes. We have been hounded by people wanting to participate in a substantial way so that they could get their names on the sponsor list. After four years it seems people are getting the idea the Scripting Games will be around, just like the real Olympics (only our sponsorship rates require much less of one's GDP).
Frequently Asked Questions
Why are these things called frequently asked questions? No one has asked these questions yet because we are not even finished writing this section. Perhaps the first frequently asked questions actually were frequently asked questions and that is where they came from. Years ago on ListServ, people would join a newsgroup, and right away ask the same old question that had already been asked several hundred times previously on the list. So each news group would create a frequently asked question list. Because guess what? Dude, they were in fact frequently asked. Maybe that is where the term came from. Of course, I have not been on ListServ since 1995, so I am not sure if they still do that or not or for that matter if they are even still around. Maybe we should change the name to anticipated questions. But it might lose in clarity what it gained in accuracy. We will let the title remain.
How do I submit an entry?
We will post instructions for submitting scripts as the start of the 2009 Summer Scripting Games draws closer.
When are the entries due?
Entries are due one week after the event is announced. We are not worrying about time zones this year because we feel it is unfair to our good friends in the South Pacific to require them to get up at 3:00 A.M. to submit a posting for it to arrive at 6:00 P.M. Redmond time.
Do I have to submit my script exactly on the day it is due?
No. Actually, you do not have to do anything if you do not wish. We are really laid back. If you want to participate in the Summer Scripting Games, it would be good if you were to share your script so others can both gain the benefit of your knowledge and of your approach to solving the problem. If you would like your entry to be evaluated by your peers and garner lots of stars via the voting process, it is actually good to get your entry in a little early. Studies have shown that during Summer Scripting Games script evaluation, the early scripts gather the most stars. Not only that, but you also increase the likelihood of someone picking your code to modify, and therefore you get that warm fuzzy feeling inside knowing that your peers appreciate your style.
How do I participate in the 2009 Summer Scripting Games?
First of all you will need to register for a contestant ID. After you have that, you need to stay tuned to the TechNet Script Center and watch for the event announcements. You can get a leg up on the competition by following the Scripting Guys on Twitter. That is where the events will first be announced. We know there is still a bit of cutthroat competition lurking around in the subconscious mind and we feel no compunction for stoking this trait.
May I enter more than one division?
How do I earn points?
You don’t. They never meant that much anyway. It is the feeling of accomplishment you get when you write the script—and it runs! This feeling is accentuated when you submit it to the PoshCode site, and it garners stars of appreciation from your peers in the scripting community.
How do I know if my script was right?
Well, did it run when you wrote it? If it did, does it solve the problem you were attempting? Then guess what? It was right. Just like in real life, the script is right if it solves the problem. Is it the best script for the job? How do you define best? What are the criteria? Shortest, fastest, easiest to read, most complicated, most elegant, most heavily commented, most robust, or any other superlative?
Each day during the Scripting Games, we will have guest commentaries by experts in the field. You are free to compare your script with those developed by the experts. You can also garner feedback via the evaluation process on PoshCode. In the end, however, your script is right if it works for you, and if you understand why you wrote what you did. If you are happy, we are ecstatic!
Are you giving away prizes this year?
Yes. We will announce prizes closer to the start of the Games.
How do I win prizes?
There will be 11 drawings for prizes this year; one drawing per day during the Scripting Games, and a grand prize drawing at the end. To be eligible for a daily drawing, you need to submit your script for the event. Everyone who enters the Scripting Games is eligible for the grand prize drawing. All prizes are granted based upon random drawing of names from the eligible pool of scripters for that day's event.
What if I need help while working on a script?
We have created a special Summer Scripting Games forum for use by the participants. This forum is specific to the Scripting Games. If you have a question about a problem you are working on, it is very possible that one of your fellow participants will also have a similar question. In the true spirit of community and sharing, you are encouraged to actively participate in this forum. You will be surprised at the ideas that may suddenly spring from a spirited conversation regarding one of the games. Because there is no leader board this year, you do not need to worry about helping out the competition; there is no competition this time. This also mimics real world, because often we need a little help from our friends.
May I look at the scripts submitted by the other participants?
Of course. You are encouraged to do so, as a matter of fact. You can also adapt their code and submit revisions. You will learn a lot by looking at other approaches to the problem. If you are completely stuck on a question, go ahead and peek. It is what you would do at work anyway, so why not here? Because you are really only competing with yourself, there is no point in "cheating." If you look at someone's script and it gives you a great idea for your script, go for it! More power to the community!
The 2009 Summer Scripting Games Events
Our theme for this year's Summer Scripting Games events is the decathlon. In keeping with the theme, all the events will be related in some way to decathlon events. To get you in the proper frame of mind, here are descriptions of the events in a decathlon.
I. The 100-meter event
The 100-meter event is the shortest outdoor speed-race distance in all of athletics. The reigning 100 meter Olympic champion is often called the fastest person in the world.
II. The long jump
The long jump is an event in which the athletes combine speed, strength, and agility in an attempt to leap as far as possible from a takeoff point.
III. The shot put
The shot put is an event involving putting a heavy metal ball. The object of the event is to throw the put as far as possible.
IV. The high jump
The high jump event is an event in which participants jump over a horizontal bar that is placed at different heights. This event does not use external devices such as a pole or a springboard. Stefka Kostadinova has held the woman’s record for the high jump since 1987.
V. The 400-meter race
The 400-meter race is a common track event. On a standard outdoor running track it is exactly one lap around the track. Runners start in staggered positions and race in separate lanes for the entire course. In the United States athletes previously participated in the 440-yard dash instead of the 400-meter race.
VI. The 110-meter hurdles
The 110-meter hurdles are an Olympic discipline that is run by men as part of a racing event. Ten hurdles of 1.067 meters in height are evenly spaced along a straight course of 110 meters. A fall while competing in the hurdles does not carry a fixed time penalty for the runners, but it usually signals the end of the race for a hurdler.
VII. The discus throw
The discus throw is an event in which an athlete throws a heavy disk. The disk is called a discus. The goal of this sport is to throw a distance further than the participants.
VIII. The pole vault
Pole vaulting is an athletic event in which participants use a longer flexible poll as an aid in leaping over a bar.
IX. The javelin throw
The javelin throw is an event in which the object is to throw a javelin, which is a spear-like object made of metal fiberglass or in some cases carbon fiber.
X. The 1,500-meter race
The 1,500-meter race is the premier middle-distance track event. The 1,500-meter race is 3-¾ laps around the 400 meter track. The current record holder among men is Hicham El Guerrouj from Morocco, who set the record on July 14, 1998, in Rome. His time was 3 minutes and 26 seconds. That’s crazy fast.
Beginner Scripting Events
The beginner's field features events that are aimed at beginning scripters. Are you a beginning scripter? Check out the events, and see if they make sense to you. If you feel they do not offer sufficient challenge, check out the Advanced Scripting Events. The topics are the same for both beginner and advanced scripters—they will follow the decathlon outlined in the previous section. You are, of course, free to attempt all the events from both the beginning and advanced fields. You are also free to write the scripts in VBScript and in Windows PowerShell. You can even combine both languages into a single script if you wish. For a real challenge, write a script that solves all 20 events in both VBScript and Windows PowerShell at the same time. That would be impressive. If you want to get into shape for the beginner script decathlon, it would be wise to review working with strings, dates, time, text files, math functions, and sorting lists.
I. The 100-meter event
In the 100-meter event, you will be given the finish times of our runners. You will be asked to sort them and to provide the gold, silver, and bronze winners.
II. The long jump
In the long jump event, you will be asked to determine the speed, strength, and agility of your computer.
III. The shot put
In the shot put event, you will need to be able to handle a heavy load of text. To make it easier for you to carry the load, you will be asked to balance text between two files.
IV. The high jump
In the high jump event, you will need to soar to new heights as you read a database container jumper’s training data in order to predict