2008 Winter Scripting Games

News and Updates

Throughout the Scripting Games we posted additional information as we received entries and common questions. Take a look to find updates and information about the events.

*
On This Page
Sudden Death Challenge Event 1Sudden Death Challenge Event 1
Beginner Event 5Beginner Event 5
Beginner VBScript Event 7 – Adding a LineBeginner VBScript Event 7 – Adding a Line
Beginner Event 9 - OopsBeginner Event 9 - Oops
Beginner Event 5 – What About Leap Year?Beginner Event 5 – What About Leap Year?
Beginner VBScript Event 2 – Why Did I Get 0 Points?Beginner VBScript Event 2 – Why Did I Get 0 Points?
Your Mail Server Thinks I’m Sending You Spam!Your Mail Server Thinks I’m Sending You Spam!
New Prizes: Pro SQL Server 2005 Integration ServicesNew Prizes: Pro SQL Server 2005 Integration Services
Scoring UpdateScoring Update
Advanced Division: Event 1Advanced Division: Event 1
Advanced Division: Event 3Advanced Division: Event 3
Beginner VBScript Event 2Beginner VBScript Event 2
I got a zero?!I got a zero?!
Beginner Event 9 – OopsBeginner Event 9 – Oops
Division pages are back, but…Division pages are back, but…
Where are the Beginners and Advanced Division home pages?Where are the Beginners and Advanced Division home pages?
Questions?Questions?
For Perl ScriptersFor Perl Scripters
For BeginnersFor Beginners
Entry Submission FormEntry Submission Form
Testing EnvironmentsTesting Environments

Sudden Death Challenge Event 1

Update March 5, 2008

Because there was a little bit of controversy attached to Event 1 we announced that we would give people an opportunity to win back the point they lost. For better or worse, however, we were so swamped during the course of the Games that we never got around to coming up with a new problem for people to solve. Therefore, we decided to just give everyone a point for Event 1 and let it go at that. Consider it a little gift from all of us to all of you.

Oh, and next year, right before you fire off an angry letter about the 2008 Winter Scripting Games, remember how nice we were this year!

Top of pageTop of page

Beginner Event 5

Update February 27, 2008

Well, this turned out to be a tough one for a lot of people. The problem, of course, was usually on the Month/Day calculation. We gave a certain amount of leeway in this, but there seemed to be a problem a number of people ran into. If you test the script today, February 27, 2008, and enter a date of March 29, 2010, your output should be close to this:

Days: 761
Months: 25
Month/Day: 25 / 2

If you received a 0 on this event, try running your script with that date. In many cases the Month/Day result came back as 24/30, in which case you didn’t get the points because you missed a month.

Another common problem was with a date such as January 4, 2010. In that case people were sometimes doing the opposite, coming back with negative numbers for days rather than going back a month.

If either of these was the problem and you can figure out how to fix it (without breaking other cases) feel free to resubmit your entry. If that wasn’t the problem and you still don’t know what you did wrong, let us know and we’ll try to take a look at it for you.

Top of pageTop of page

Beginner VBScript Event 7 – Adding a Line

Update February 23, 2008

The instructions for this event say you must fix the script but that you shouldn’t “add completely new lines.” Well, to fix the VBScript script, chances are pretty good you’ll have to add one line. We did anyway. The main idea of this event is that we don’t want anyone to rewrite the script – use what you can that’s already there and make it work.

Top of pageTop of page

Beginner Event 9 - Oops

Update February 22, 2008

Looks like we got so distracted by the idea of a Pool Party that we messed up Event 9 a bit. First of all, if you’ve already submitted your answer based on the event we posted, don’t worry about it, we’ll score your answer based on that description, you don’t need to redo your script. That said, we’ve changed the description a little for those of you who haven’t got to it yet. The reason for this is that we sent a different version of the script to the localizers than the English version we posted, so anyone working from one of the descriptions in any of the eight other languages has a slightly different event.

The difference is that the English language version says all the measurements are in feet, and the equations are like this: Length x Width x Depth and Length x Width x ((Deep End Depth + Shallow End Depth) / 2). Based on the fact that the measurements were supposed to be in meters and the volume in liters, the calculations should have been like this:
Length x Width x Depth x 1000
Length x Width x ((Deep End Depth + Shallow End Depth) / 2) x 1000

Like we said, if you already submitted your entry don’t worry about it, the only difference is the “x 1000” and we can certainly figure that out when we test. Sorry about the confusion.

Top of pageTop of page

Beginner Event 5 – What About Leap Year?

Update February 22, 2008

There’s been a little confusion about the example given in Beginner Event 5. In the example we give for reporting months + days we say the difference between February 15, 2008 and March 3, 2009, the answer is 12 months and 16 days. Some people have noted that 2008 is a leap year, shouldn’t that be 17 days?

The answer is no. 2008 is a leap year, but 2009 isn’t. If you add 12 months to February 15, 2008 you’re at February 15, 2009. Add 16 days to February 16, 2009 and you’re at March 3, 2009. So, 12 months and 16 days.

Top of pageTop of page

Beginner VBScript Event 2 – Why Did I Get 0 Points?

Update: February 21, 2008

We’ve had a number of people write in and ask us why they received a score of 0 for Beginner VBScript Event 2. We gave everyone a hint on this page earlier in the week, but unfortunately quite a few people missed it. But do you want to know what one of the best things is about the Scripting Games? Is it the prizes? Is it the competition? Is it the chance to have some fun scripting? Well, actually, it’s all those things. But there’s at least one more: the chance to learn a little something about scripting. This is especially true in the Beginners Division. And today we’re about to learn something that could come in handy in our future scripting lives.

It’s all about the UBound function. If you pass UBound an array, UBound returns the index of the upper bound, the last item, in that array. Notice we didn’t say it returns the number of items in the array; that’s because it doesn’t. It returns the index number of the last item. Because arrays start indexing at 0, the index number of the last item will always be the number of items in the array minus 1. For example, if your array contains 5 items, UBound will return 4, the index number of the fifth item. That means that in Beginner Event 2, if you returned the UBound of an array of fonts as the total number of fonts, your answer was off by 1 and you didn’t receive the points for correctly solving the event.

On the bright side, you’ll probably never forget what UBound does. Oh, and you’re still eligible for all the prizes; and there are still eight events left….

Top of pageTop of page

Your Mail Server Thinks I’m Sending You Spam!

Update: February 20, 2008 – around 9:15 AM PST

Several of you have written in to say that you have tried to email us a script but Microsoft’s mail server has rejected the message as being Spam. We apologize for that; believe us, we’re as frustrated by all this as you are. If this happens to you, try sending your script as an attachment. Just make sure you use a .txt file extension; otherwise the mail server will reject the message as being a possible virus. Sigh ….

Wouldn’t it be better to have some sort of online submission form rather than sending all these scripts through email? Yes. So then why don’t we have an online submission form? Let’s put it this way: don’t ask. After all, the Scripting Guys need to keep their jobs for awhile longer!

Top of pageTop of page

New Prizes: Pro SQL Server 2005 Integration Services

Update: February 20, 2008 – around 8:30 AM PST

Now here’s something you don’t see every day: Jim Wightman, currently taking part in the 2008 Winter Scripting Games, is giving away prizes to his fellow competitors! (Now, if we could just get him to give away prizes to the people running the Scripting Games, well, then we’d be in business.)

Jim has graciously donated five copies of his book Pro SQL Server 2005 Integration Services (the top-selling book on SQL Server Integration Services, bar none) to the Scripting Games prize pool. As Jim noted, the book is “ … for programmers of all types and abilities, from scripters to hardcore coders...and would, I think, appeal to many of your avid readers who love programming and take part in the Scripting Games.” But don’t just take Jim’s word for it; instead, go to the Apress Web site and download a sample chapter for yourself. Better yet, keep participating in the Games, and you might win a free copy to call your own.

Top of pageTop of page

Scoring Update

Update: February 19, 2008 – around 10:00 AM PST

It’s official – we are way behind on scoring your entries. This morning when Scripting Guy Jean Ross came into work Scripting Guy Greg Stemp walked into her office and wrote 282 on her whiteboard. “That’s how many new entries are in the Advanced VBScript division this morning.” He turned around and left, but was back 30 seconds later to cross out 282 and write 301. He left and was back 10 seconds later to write 304. He seems to have grown tired of this and has stayed in his office for a while, but the entries are still coming in much faster than we can test them.

All that is just to let you know that we’re working on it (when we’re not walking back and forth between offices), and we’ll continue to test and update scores as quickly as we can. Thanks for your patience! Oh, and keep those entries coming, we actually like to watch the numbers climb! 312…315…

Top of pageTop of page

Advanced Division: Event 1

Update: February 17, 2008

Several people have written in asking us, “Where’s the letter Z?” Traditionally, the letter Z does not appear on a standard North American phone dial. (If you look closely, you’ll notice there’s no letter Q, either.) The solution: just leave out the letters Q and Z altogether. Use the letter combinations shown in the event instructions and everything should work perfectly.

Top of pageTop of page

Advanced Division: Event 3

Update: February 17, 2008

Apparently there’s a slight problem with the data file: in exporting the file from Excel, something went wrong and – on some of the lines – the name Pilar Ackerman appears twice and the name Syed Abbas doesn’t appear at all. Don’t worry about that; just treat those lines of code as valid ballots and everything will turn out just fine. (Trust us.)

Top of pageTop of page

Beginner VBScript Event 2

Update: February 16, 2008

We’re seeing one fairly common mistake people are making in this event. If you use the UBound function in your script, make sure you know exactly what value UBound returns. That’s all we’re going to say about that. You have until Wednesday February 20 at 8:00 AM PST to resubmit your entry if you think you need to.

Top of pageTop of page

I got a zero?!

Update: February 16, 2008

Yes, there are a few zeros in the score sheets. If you received a zero, first look to make sure you followed the instructions carefully. If you really believe we made a mistake, you can email us and we’ll try to take a look, but we can’t promise anything. If you find that you did make a mistake, you can resubmit your entry as long as the deadline for that event hasn’t passed yet.

Top of pageTop of page

Beginner Event 9 – Oops

Update: February 16, 2008

Looks like we made a small mistake on the event description for Event 9 in the Beginners Division. The Name field is actually the Customer field. We’ll fix this when we get the chance, but for now, just know that you need to use Customer, not Name.

Top of pageTop of page

Division pages are back, but…

Update: February 16, 2008

The Beginner and Advanced Division home pages are back, but the technical problems haven’t actually been resolved. What are those problems? Well, we’re not able to put up new graphics. That means, in addition to other things, we aren’t able to add your pictures just yet. But send them in anyway and we’ll get them up as soon as someone figures out why we can’t add graphics to Web pages anymore.

Top of pageTop of page

Where are the Beginners and Advanced Division home pages?

Your guess is as good as ours: we seem to be experiencing some weird technical problems that aren’t preventing those pages from showing up. Fortunately, though, you can still access the individual event pages:

Beginners Events

Event 1

Event 2

Event 3

Event 4

Event 5

Event 6

Event 7

Event 8

Event 9

Event 10

Advanced Events

Event 1

Event 2

Event 3

Event 4

Event 5

Event 6

Event 7

Event 8

Event 9

Event 10

We are working to get this fixed. Sorry for any inconvenience this might have caused.

Top of pageTop of page

Questions?

Update: February 15, 2008

At some point during the Games you might have a question about a certain event, or about your score, or about one of your entries, or about…well, something else. First, we’d like to ask you to be patient. As far as scoring goes, we’re going to be testing scripts as quickly as we can, but we won’t always be caught up. As a matter of fact, we’ll be happy if we’re caught up by the last day of the Games.

That said, if you have a question feel free to ask. You have a couple of options when it comes to asking questions:

Send email to scripter@microsoft.com (in English, if possible). We can’t guarantee we’ll answer you (at least not right away), but we’ll know about your concerns, and if a lot of people have similar questions we can update this News page with a response.

Post your question to the Scripting Guys Facebook group. (If you’re not a member, find out how to join here.) We’ll check the group off and on, plus there are hundreds of other members who might be able to help you out.

Top of pageTop of page

For Perl Scripters

Update: February 15, 2008

As you probably know, Perl is a new addition to the Scripting Games for 2008. Unlike VBScript and Windows PowerShell, Perl doesn’t necessarily come pre-installed with everything you might need to complete a specific task: you might need to install additional modules.

Our initial thought was to create solutions to all the events that didn’t require the installation or use of any modules that don’t come preinstalled with ActivePerl 5.10.0. Well, it turned out that wasn’t exactly practical for all events.

Partly because we don’t want to have to install a bunch of modules while we’re testing and partly because we want to keep things as straightforward as possible, we’d prefer that for most events you don’t use any modules that need to be installed. However, there is at least one exception: Beginners Division Event 5 (What’s the Difference?). This event probably can be done without installing a module, but we didn’t want to try it so we certainly don’t expect you to. Please use the Date::Calc module in your Perl solution to Beginner Event 5.

If you’d like to try this event but you’re unsure how to install and use modules, take a look at our Beginners Tip on Perl Modules. Even as a beginner to Perl, if you don’t already know about modules you’ll most likely need to learn about them soon, so you might as well take the plunge now.

Top of pageTop of page

For Beginners

Update: February 15, 2008

Yes, we admit it; the events in the Beginners Division are a little tougher than they were last year. Not impossible for beginners by any means, but some of the events are tough enough to really make you think. This is a good division for beginner and intermediate scripters.

That said, we don’t want to scare anyone away – this is supposed to be fun, remember? With that in mind, we’ve provided you with a little bit of help. In addition to the 2008 Scripting Games Tips, we’ve created a few Tips for Beginners. We’ve put all this information, along with some additional resources, on one handy Web page. Check the Beginners Resources page for links to resources that just might be of use in completing each of the events. Good luck! And we’ll remind you again – have fun!

One final note about Beginners Division Event 5 (all scripting languages): we know working with dates can be a little tricky, so we’ve provided some extra help specifically for that event. Check out the Beginners Tip on Dates.

Top of pageTop of page

Entry Submission Form

Update: February 13, 2008

When you send in your entries for the Scripting Games, you need to be very careful in following all instructions. Not just the instructions that have to do with completing the event, but also the instructions that have to do with submitting your entry. With all the entries we receive it’s important that you submit them correctly so nothing gets lost.

To make the submission process easier, the 2008 Scripting Games Competitor’s Pack includes an HTML Application (GamesEntry.hta, located in the EntryForm folder) that will generate a Microsoft Outlook email message that’s correctly formatted. Simply fill in the text boxes, make the appropriate selection from all applicable drop-down lists, past your script into the designated area, and then click Send. This will generate an Outlook message that you can review and send.

A couple things to keep in mind: 1) If Outlook isn’t your email application, this HTA won’t work for you, you’ll have to create your entries manually; 2) Clicking Send in the HTA doesn’t send the message, it just creates the Outlook message for you – you still need to send the Outlook message.

This is just our way of trying to make things a little easier on everyone. We hope it helps!

Top of pageTop of page

Testing Environments

Update: February 13, 2008

In the 2008 Scripting Games Program we noted that we would be testing entries with the following sofltware:

Windows Script 5.6

Windows PowerShell 1.0

ActivePerl 5.8.8

Any scripts you write that work with the above will work in our testing environments. However, we’ve upgraded our software a bit.

We’ll be testing all Perl scripts on ActivePerl 5.10.0.

We’ve instituted the Windows PowerShell 2.0 Challenge. If you use functionality specific to Windows PowerShell 2.0 in your script, mark your entry according to the Challenge instructions and we’ll test it on the appropriate platform. If you don’t mark your PowerShell entry as being part of the PowerShell 2.0 Challenge we’ll test it on PowerShell 1.0.


Top of pageTop of page