9: When the opponent makes a contact move, your first thought should be to hane (F16 or D16 here). Your second thought should be to extend (F17 or D17 here).
The heuristic to decide between the two is to ask who is locally stronger. If you are, then hane. If he is stronger, then extend.
There are tactical exceptions to this, but generally it is a good rule.
In this case, you are way stronger because of your extra stone at C16. So hane.
Once you have decided to hane, then the question arises: which side? The answer to that is a bit more vague. Then you are looking at not only tactical issues, but concepts like over-concentration.
Fortunately for you, the tactics here are simple: if you hane on the outside, it is a threat to kill with a ladder. That makes it good for you.
The options of extend/hane and left/right leaves four possibilities. ( Tenuki is a fifth, of course )
$$c Paranoid ( one stone attacking two? )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . B X . . . .
$$|. . X . O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
- Click Here To Show Diagram Code
[go]$$c Paranoid ( one stone attacking two? )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . B X . . . .
$$|. . X . O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .[/go]
$$c Conservative ( emphasizes top )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X B . . .
$$|. . X . O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
- Click Here To Show Diagram Code
[go]$$c Conservative ( emphasizes top )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X B . . .
$$|. . X . O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .[/go]
$$c Mild attack ( focus on side )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X . . . .
$$|. . X B O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
- Click Here To Show Diagram Code
[go]$$c Mild attack ( focus on side )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X . . . .
$$|. . X B O . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .[/go]
$$c Best, IMHO ( focus on tactics )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X . . . .
$$|. . X . O B . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
- Click Here To Show Diagram Code
[go]$$c Best, IMHO ( focus on tactics )
$$--------------------
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . X . . . .
$$|. . X . O B . . .
$$|. . . . . . . . .
$$|. . . . . . . . .
$$|. . . . . . . . .[/go]
Since there is not yet anything on either the left side or the top side, the focus on a particular direction in the second and third diagrams is probably premature.
-------------------------------
As I mentioned earlier in the post, there are tactical exceptions to the rule on handling contact moves. Most of those exceptions fall into the category of sacrifices, when the contact stone is a nuisance, and you have to kill it, and while you are killing it your opponent is getting some other benefit locally.
I such instances, the question of who is locally stronger is overridden by other concerns.
An example is the well known probe against a low shimari:
$$B The contact stone is sacrificed
$$ ----------------------
$$ | . . . . . . . . . . .
$$ | . . . W 1 5 7 . . . .
$$ | . . 9 X 2 4 6 8 . 0 .
$$ | . . . . 3 . . . . , .
$$ | . . X . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .
- Click Here To Show Diagram Code
[go]$$B The contact stone is sacrificed
$$ ----------------------
$$ | . . . . . . . . . . .
$$ | . . . W 1 5 7 . . . .
$$ | . . 9 X 2 4 6 8 . 0 .
$$ | . . . . 3 . . . . , .
$$ | . . X . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .
$$ | . . . . . . . . . . .[/go]