The Scripting Games Return!

One of the Scripting Guys contacted me last week asking for my bio. Evidently as one of the 55, 100% entrants from the 2006 Scripting Games, they want to do a spotlight piece on each of us. As part of my bio, I thought I'd include some exasperated picture (pulling out my hair?) and some tips to other contestants about programming contests. This reminded me of an article I posted here last year, that didn't make the cut after the hardware crash in September. So, from the archives, I present that original article.


Over the last 3 days, I have been competeing in The Scripting Games MMVI. This is a series of 8 events each requiring the development or debugging of a script.
Currently my rating is 100!! (out of 100) points, ranking me tied for 1st Place. I have completed all 8 events, and just have to wait out the rest of the next two weeks (finishing on Monday 2/27/2006) to see how my rating stands.
I am really excited about this rating. In college, I competed several times in the local ACM Programming Contests which were much of the same flavor. A group of us, 3 to a computer in one of the labs, working on a series of 5 events developing code to solve each problem in less than 4 hours. My Junior year in college, my self, my roommate and one other guy made it to the semi-finals in San Francisco. If only I could get that chess-piece puzzle (move a knight across a 'virtual' chess board without falling through one of the holes in the board) working, we might of made it further.
Key items that I considered when participating in these events.

  1. Carefully read each question - Often key elements to the scripts design are hidden in the text of the question. We had one problem that asked to add 2 very large numbers. The writeup did not specify how large the number would be. 10 digits? 100 digits? What if you had 2 numbers, 10,000 digits long? What variable type would you use to hold that? How would you perform the calculation?
  2. Look for loopholes in the question - Will your solution solve the problem with a data set containing different values? The question may imply that negative values will be included, or alphabetic characters (like HEX values) may be included. Do you need to troubleshoot for division by 0 faults?
  3. Don't limit yourself - When testing the script it is important to put consideration on the sample sets. The data set provided with the question is typically only a small portion of what your script will actually be ran against. This means if you use data structures to store data, like an array, make sure that array has the capactity to process much more data. If they give you a sample of 10 items, the actual data used may actually contain 10,000 items. Be flexible.
  4. Take the output as gospel - From my experience in programming contests in college, the one thing that would keep you from finishing a puzzle, would be the formatting of output. For example, if they want you to put out a line of dots, make sure you have that line of dots exactly as demonstrated.

Thinking about it, this sounds like getting business requirements. A report I am working on for my manager has many of these similar requirements. Detailed formatting requirements, odd data sets, incomplete or corrupt data, 1 million data items in the source..
I better get back to work...

I look forward to the 2007 Scripting Games coming this February. I hope to do as well again this year.

Comments

Post new comment

The content of this field is kept private and will not be shown publicly.
  • Allowed HTML tags: <a> <blockquote> <center> <hr> <em> <strong> <cite> <code> <ul> <ol> <li> <dl> <dt> <dd> <img>
  • Lines and paragraphs break automatically.
  • Web page addresses and e-mail addresses turn into links automatically.

More information about formatting options