Wednesday, October 26, 2005

Amaze your friends! Confound your enemies!

The homework for my stats class last night involved taking an ESP test and recording our results so we could analyze the distribution of binomial systems. So I looked through the page source and wrote the following bits of javascript:

ESP: The basic solver. Reads through the randomly filled array and sets each guess to the correct card.
Circles : Sets all the correct answers to the circle symbol, then sets all your guesses to the circle.
Six : Sets all the answers and guesses to the nonexistant symbol 6. The result is a page full of check marks next to empty places where teh correct answers should be.

Drag those links to your bookmarklets bar (only tested in Firefox, but a) they should work in IE, and b) why aren't you using Firefox in the first place?), go to the test page and click on the script of your choice. The proper cards should become highlighted. Enter your name etc. if you want to and then hit OKAY. (With Six, you get the added bonus of seeing the 'All guesses have been made' alert over obviously unguessed trials). Now show the results to the heathen unbelievers. Enjoy!

These are quite trivial little bits of javascript, but nevertheless I am very proud of them, just because I figured them out and made them work all on my own. I got to class early and showed them to my teacher ([Nobilg], for those of you who have read my previous posts) and he liked them too. We hatched a crafty little plot to, as my classmate Drew would say, "pull one over on" the rest of the class. When we made a histogram of everyone's results, I called out "23!" (I got two wrong on purpose), and showed everyone the results. One or two people started to almost believe that I had some sort of crazy computer-affinity-based ESP, and the rest were mostly quite confused. It was awesome.

0 Comments:

Post a Comment

<< Home