Counting to Improve Declarer Play

I’m playing in a club game with a regular partner. In fourth seat, I pick up:
♠ Q873
42
A54
♣ A1097

Dealer passes, partner opens 1C, and RHO overcalls 1S. I bid 1N, showing a weak, balanced hand with a spade stopper and no interest in hearts. Partner raises to 2N, and I’m at the top of my range and happy to accept the invitation to 3N, which everyone passes. LHO leads the queen of diamonds, and I get to see dummy:
♠ KJ102
K97
963
♣ KQ2

About 6 HCP lighter than I expected! I later asked my partner why he bid 2N instead of just passing 1N with a balanced minimum opener like this, and he said he wasn’t thinking, and this was a mistake. Okay, we’re in the wrong contract, but let’s see what I can figure out. →

Counting the hand

I’m playing in a Just Declare tournament on Bridge Base Online, which means the hand has been bid by 4 robots, and I’m taking over the South seat after the auction has finished. The bidding is complicated:

W N E S
Pass Pass 1 1♠
Dbl 1N 2♣ Pass
Pass 2 Pass 2♠
3♣ 3 Dbl Pass
Pass 3♠ Pass Pass
Dbl Pass Pass Pass


The 4 of diamonds is lead (robots play fourth best from length), and I see just what you can infer about the opponents’ hands. →

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.