Years ago, Eric Jannersten published a book “the only chance", with a series of hands where you appear to go down except for one very specific distribution of the cards. Your job is to figure out this distribution and play accordingly. Here is a hand that would nicely fit into this book. You are in 4♠ (after an uncontested 1♦-1♠, 2♠-3NT, 4♠). West leads the ♣K, followed by the ♣A, with EW playing that cashing ♣KA in that order shows a doubleton. Next is a small diamond, plan the play from here.
Wait, get a coffee, think about the hand and only then read on.
It is clear that west is looking for an entry in his partner’s hand to score a club ruff for down one. With ♦KQ, he’d most likely have tried a heart, so it is reasonable to assume that at least one of the diamond honnors will be offside. Playing small in dummy will thus lead to a quick down 1, so you are forced to go up with the ♦A. You now still have 2 losers, is there a way to get around that?
With no better options, you start by testing trumps. Fortunately, they split 3-2, west having 3, east discarding a heart. Time evaluate your options.
If east has the ♦KQ(x), then there is nothing you can do. So, assume that the diamond honnors are split. As you will have to give up a diamond, it cannot hurt to eliminate the side suits first. Cash the ♣J, ♥AK and ♣Q ending in your hand. West indeed had a doubleton club, with the diamond honnors split and the trumps 3-2, the remaining cards must be approximately this:
You have won 8 tricks and need 2 more.
Next play a diamond. It might look as if you are giving up, but wait what happens. West is forced to play a small diamond to avoid crashing his partner's ♦Q. East wins, but is endplayed. All he has left are hearts, so declarer can score his 10th trick with a ruff and sluff. Note that this will also work if the ♦K and ♦Q are reversed.
Finally, if the diamonds were originally 3-2 the other way around, west will have end up with a singleton ♦Q (or ♦K). He must win trick 11 and is then forced to give a ruff and sluff. Overtaking by east will not work either. Other variations are possible too, but as long as trumps split 3-2 and the diamond honnors are split, you will always end up with 10 tricks. The full hand on the left.
Did I find this at the table? I’m obviously claiming that I would have but R spoiled it for me when he returned a heart instead of a diamond at trick 3. Now 10 tricks were simple.
Finally, I received an error report on the dealer program under Ubuntu 17.x. Unfortunately, the correspondent didn’t leave a valid email address making it hard to respond. So, if you are reading this, please contact me again.