ResearchBuzz!
ResearchBuzz Logo
Search Engine News and More Since 1998

Sign up for ResearchBuzz FREE every week by e-mail.

Email address: Privacy Policy

ResearchBuzz:

Get a Feed:



    Add to Google
    Subscribe in Bloglines

Search:

 
Web www.researchbuzz.org

January 22, 2004

Happy Google Hacks Week 2004 #4: GoogleJack

When I'm in "brainstorming ideas for hacks" mode, I come up with some weird ideas. I thought about a random password generator using Google, and then a "Google Hangman" game, and a few other things. I was falling asleep one night (okay, one early morning) when I thought, "Well, you could do a blackjack game."

Google's API includes the ability to see the size of any given result's cache (if there is a cache.) Google doesn't index more than 101K of a site, so a given result will return a cache value of between 1K and 101K.

Thus GoogleJack, with a score total of 101 instead of 21. You pick a word and give Google a word. Google searches and counts the cache size. You can "Hit," do the next search and add that result count to your cache size, or you can say you're done. Once you're done, Google counts the cache size of its keyword search result. Whoever gets the closest to 101 without going over wins. If you go over 101 you bust and you lose. You can change the 101 to something else if you want, but 101 works very well.

You will need a Google API key to play this game. As always they are free and available at http://api.google.com.

Big props to Ron Pacheco. He's been vetting my Perl scripts all week and answering my stoopid questions, but this one was a bit complicated for me and he smoothed it out and got it going.

So play already! Try paired words like love/hate, ethel/lucy, wind/water, etc.

GoogleJack!

Your Word: Google's Word: Target Value: Google API Key:

GoogleJack was written to celebrate Happy Google Hacks Week 2004. Check out the books in the O'Reilly Hacks Series:

Google Hacks
Spidering Hacks
Mac OS X Hacks
Amazon Hacks
eBay Hacks
Windows XP Hacks
Hardware Hacking Projects for Geeks
TiVO Hacks
Wireless Hacks
Linux Server Hacks

Posted to Google Hacks | TrackBack


Things You Can Do With This Article: