{"id":7,"date":"2011-05-07T04:23:55","date_gmt":"2011-05-07T04:23:55","guid":{"rendered":"http:\/\/alexboisvert.com\/musings\/?p=7"},"modified":"2011-05-07T04:25:35","modified_gmt":"2011-05-07T04:25:35","slug":"google-nexus-puzzle-6","status":"publish","type":"post","link":"https:\/\/alexboisvert.com\/musings\/2011\/05\/07\/google-nexus-puzzle-6\/","title":{"rendered":"Google Nexus Puzzle 6"},"content":{"rendered":"<p>All right, looks like I&#8217;m kicking off this blog with a complaint. \u00a0This does not bode well for the future. \u00a0Hey, I just kicked off the blog with a complaint and a self-deprecating remark! \u00a0We&#8217;re two for two.<\/p>\n<p>Anyway: the puzzle-minded among you know that <a href=\"http:\/\/twitter.com\/googlenexus\"<\/a>Google Nexus has a Twitter feed<\/a> on which they post an occasional contest. \u00a0If you are the first to answer the contest correctly, you win a new Google Nexus S phone. \u00a0Not bad, right? \u00a0Well, recently, they ran a very frustrating puzzle. \u00a0The idea was, Twitter users would suggest ten-character strings, and they would tweet back whether your string fit a particular pattern they had in mind. If you picked up on the pattern early, you could tell them what it was and win the prize.<\/p>\n<p>The problem? \u00a0For some reason they were verifying user-submitted strings <i>by hand<\/i>, and trying to do so every minute or so. \u00a0This probably led to some very tired and frustrated Google employees, and &#8230; it led to some mistakes. \u00a0Their <a href=\"http:\/\/twitter.com\/#!\/googlenexus\/status\/66015327401689088\">intended pattern was<\/a>:\u00a0letters in ascending order, 3-5 numerals, exactly 1 vowel. \u00a0Except they allowed <a href=\"http:\/\/twitter.com\/#!\/googlenexus\/status\/65815791358050304\">two<\/a> <a href=\"http:\/\/twitter.com\/#!\/googlenexus\/status\/65813414634725376\">strings<\/a> that didn&#8217;t fit the pattern. \u00a0And, if you were wracking your brains trying to figure out the pattern like I was, it just led to a few hair-tearing-out* hours.<\/p>\n<p><i>* For lack of a better word.<\/i><\/p>\n<p>So I got to thinking: why didn&#8217;t they just write a script to auto-reply for them? \u00a0It should be easy to write a Python script that would search for @-mentions, check for ten-character strings, and reply to a user whether or not his string fit the pattern. \u00a0I gave myself an hour one morning and <a href=\"http:\/\/pastebin.com\/RLVqpsXX\">came up with this<\/a>. \u00a0It certainly does the job and can easily be set to run every minute or so to look for new replies. \u00a0It might need to be tweaked a little &#8212; you&#8217;d want to make sure there are about as many &#8220;yes&#8221; replies as &#8220;no&#8221;, and you&#8217;d probably want to limit the total number of replies to somewhat less than 20 per minute. \u00a0But the point is: Google has much better Python coders than me. \u00a0For about an hour of coding (and some beta testing to be careful) they could have avoided a lot of trouble for themselves and a lot of gut-wrenchiness* for the rest of us.<\/p>\n<p><i>* See above footnote<\/i><\/p>\n<p>Okay! \u00a0No more complaining! \u00a0Next time, we&#8217;ll talk a little bit about the technical aspects of making my <a href=\"http:\/\/bit.ly\/j6mJhX\">puzzle for BEQ&#8217;s site<\/a> without Crossword Compiler. \u00a0If you&#8217;re interested in making JPZ puzzles, you might want to stay tuned.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>All right, looks like I&#8217;m kicking off this blog with a complaint. \u00a0This does not bode well for the future. \u00a0Hey, I just kicked off the blog with a complaint and a self-deprecating remark! \u00a0We&#8217;re two for two. Anyway: the &hellip; <a href=\"https:\/\/alexboisvert.com\/musings\/2011\/05\/07\/google-nexus-puzzle-6\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3],"tags":[],"class_list":["post-7","post","type-post","status-publish","format-standard","hentry","category-coding"],"_links":{"self":[{"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/posts\/7","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/comments?post=7"}],"version-history":[{"count":8,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/posts\/7\/revisions"}],"predecessor-version":[{"id":15,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/posts\/7\/revisions\/15"}],"wp:attachment":[{"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/media?parent=7"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/categories?post=7"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/alexboisvert.com\/musings\/wp-json\/wp\/v2\/tags?post=7"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}