The Thinnest of Grand Slams

Literally the next board after my previous post from a regional teams game, I’m in fourth seat, no one vulnerable, with:
♠ AKJ954

AK873
♣ K10

After two passes, my RHO opens 2H. With 18 HCP and a good spade suit, I double, intending to bid spades on my next call. If 23 HCP was enough for small slam last hand, 27 HCP is enough for a grand slam this time. →

The Thinnest of Small Slams

Playing in a regional teams game, unfavorable vulnerability, I’m the dealer and pick up:
♠ 9
AQ954
43
♣ AQ976

I open 1H, and LHO overcalls 1S. Partner bids 2S, showing a limit raise or better in hearts, and RHO passes. Apparently, 23 HCP is enough for slam behind the cut. →

A bridge hand I’m proud of

Playing in a club game with a regular partner, I pick up:

♠ KJ6
J
AKJ1032
♣ A94

Favorable vulnerability, my LHO is the dealer. Against silent opponents, partner opens 1D. Slam bidding and squeeze plays behind the cut! →

A cell phone puzzle

I originally wrote this in 2011, but am copying it here for posterity:

Yesterday [in 2011], I rebooted my Android smartphone (i.e., removed and reinserted the battery) in a location with absolutely no cell phone coverage but with great WiFi. I then could access the Internet at large, but Google services (including GMail, Reader, and Plus), did not work (this is to say, locally stored data was still available, but I could not interact with the cloud). When I then moved to an area with cell phone service, Google services started working again. Who can explain why?

I doubt it makes a difference, but I have [had] a Nexus One on T-Mobile. Find the answer below the break! →

The case of the disabled logins

(Details have been changed to protect the guilty and to make the story more entertaining.)

I work for a company that builds robotic kiosks (think vending machines that cut keys), which are stationed in various stores across the country. One morning, I arrive at work to find a coworker looking troubled. “We’ve got a kiosk in Florida that’s stuck in the middle of shutting down. Can you take a look?” This isn’t my area of expertise, but somebody’s got to deal with this, and it looks like I’m somebody.

I try to SSH into the kiosk, but the connection is refused with the message, The system is going down for power off in 1 minute!. “It’s been saying that since I arrived half an hour ago,” my coworker explains. “It’s not actually going to shut down in a minute.” Read on to learn how we managed to log in again. →

Programming challenge: anagrams in PCRE

(inspired by a question a student asked me in the course I TA)

In the language of your choice, write a function that takes a string argument and returns a string representing the PCRE pattern that matches all anagrams of the input word. For example, if the argument to the function is “retrains”, it should return a regex pattern that matches “restrain”, “retrains”, “strainer”, “terrains”, and “trainers” as well as a bunch of strings that aren’t real words. You can assume that all characters in the input string are English letters. The length of the output string should be polynomial in the length of the input (i.e., just enumerating all possible anagrams doesn’t count, since that takes exponential space).

Also, if you haven’t seen this chestnut: write a POSIX-compliant regex pattern that matches strings of the form a* (i.e., “”, “a”, “aa”, “aaa”, etc) which have composite (non-prime) length.

…and people claim that regular expressions are only as powerful as DFAs are. :-P

A Great Way to Spend Halloween

Having spent yesterday with over 200,000 likeminded individuals (these last two photos were even taken with my own camera), I don’t want to be social today. So, I want to spend Halloween at home but still do something unusual and festive. My solution:

  1. Put on Rainy Mood
  2. Pull up a fireplace on Infinite YouTube
  3. Turn out the lights
  4. Read my 130 year old edition of the works of Washington Irving by candlelight.

All I need now is a bust of Pallas above my chamber door.

Word Games, part 3

What do you mean I haven’t posted in 3 months!? …oh, I guess I’ve made a bunch of half-written drafts, but never finished any of them. I should get on that.

In the meantime, here’s a word game for you. How many words can you name in 10 minutes that contain all 5 vowels? Y’s are optional but stylish. It’s okay if the words contain some vowels multiple times, or if the vowels are out of order. My word list is in the first comment.

Question for a Physicist or Chemist

I have an ice cube tray that lives in my freezer. Earlier today, I used the last of my ice cubes, so I filled it with water and stuck it in the freezer again. Just now (maybe an hour later? It’s been a few hours at most), I open up the freezer again, and see this:

(taken out of the freezer and photographed with a Kleenex box as a backdrop) The tops of the ice cubes are frozen, but there is still liquid water underneath. The interesting thing, though, is that one spot has risen up about half a centimeter higher than the rest. What caused this to happen? Why isn’t the surface totally flat, like it was when I put it in?

Details that may or may not be important:

  • I know there is liquid water underneath because I thought there wasn’t and flexed the tray to crack the cubes loose, and some water came out and then there were air bubbles floating around under the cubes.
  • I kinda over-filled the tray, so that all the cubes are connected by a thin sheet of ice that goes over the plastic dividers in the tray.
  • When I filled the tray with water, there were some small bits of ice stuck in the bottom of the tray, maybe a third the size of a normal ice cube. These were left over from cubes that had cracked in two, where I used the top part but couldn’t get the bottom part out. I expect they’ll become part of the new batch of ice cubes, but I haven’t checked on that yet.

Scientists are Awesome: Robert Sapolsky

(via the guy behind Laughing Squid)

Yes, it’s about cat parasites. No, it’s actually awesome and surprisingly easy to understand.


edit: The video can no longer be embedded. The video and full transcript are here.

This dude, Robert Sapolsky, is a neuroscientist at Stanford, winner of a McArthur “Genius” Award, and an amazing speaker.

I could listen to him all day long. Even his daily class lectures sound fascinating (part 1, part 2; admittedly these require more of a background in the field to fully understand).