New JMP Scripting Challenge BlogI'm in the process of working with @arati_mejdal, ryan gilmore, and @julian parris to put together a monthly Scripting Challenge post that will start the beginning of next month. I'm opening this up to everyone although scoring will only be kept for non-staff folks (I might be convinced to keep a separate staff leader board). I'm giving you folks an advanced look hoping that some of you will submit prior to it's official launch. This will help me work out any unforeseen problems with the challenge. In addition, one of the bonus scoring criteria will be submitting a script that's faster than anything by the staff. Below is the first challenge. I've attached the dictionary to this post. Comments and questions appreciated.
I love a good word puzzle. This challenge is inspired by Spelling Bee in the New York Times. In it, you must create words from a list of seven letters with the condition that one of the letters is always used. The other letters can be used once, more than once, or not at all. I am modifying the conditions to make things a bit trickier.
Given seven letters, find:
- The longest word using all seven letters and only those seven letters. Letters may be used more than once.
- The longest word using all seven letters and any other letters.
- The longest word using all seven letters and any other letters where no letter from the set of seven is used more than once.
- The longest word in which 5 of the 7 letters appears. Any letter including those outside the 7 may appear once or more except the two unused letters which may not appear at all.
Scripts must accept a list of seven lower case alphabetical characters (a-z) strings that will be stored in a global variable named letterSetList. All scripts will be tested on the same three seven-letter sets. All words will be taken from the dictionary posted below. You may assume it will be opened as a JMP Data Table when your script executes.
Re: New JMP Scripting Challenge BlogWill your scoring take into account the quality of annotations? Specifically, can you build it into the scoring to encourage annotations that a JSL novice could use to improve their JSL skills?
Re: New JMP Scripting Challenge BlogNot currently. The issue with any qualitative characteristic is subjectivity. I suppose I could award bonus points at my discretion. I planned to point out and make available scripts that weren't necessarily the fastest but possessed other interesting characteristics. I am also going to emphasize good programming practices in the posts.
Re: New JMP Scripting Challenge BlogDon, what about ties? Functions like Contains( ) and Loc Max( ) only find the first occurrence. Also, any guidelines on displaying results? Global variable or New Window( )?
Re: New JMP Scripting Challenge BlogThanks @di_michelson, that info will be in the body of the post. What I currently have is:
For all four items, there may be no words that meet the criteria or multiple words. Scripts must accept a list of seven lower case alphabetical characters (a-z) strings that will be stored in a global variable named letterSetList. All scripts will be tested on the same three seven-letter sets. All words will be taken from the dictionary posted below. Please access it as a JMP Data Table when your script executes. Write all words to the log. Make sure to include the item number with the output. You will have a time limit of three minutes total.
Hopefully, that's clear enough to indicate that I want all longest words. I'm also hoping that requiring output sent to the log will make it easier for me to score the scripts in case I get a bunch.