Cap'y Ron is a good example of docking theory....though most sailboats haven't power or sufficient propeller to create last second backing maneuver from all ahead; not to mention a deep keel.
The following pertains to a vessel that cannot maintain buoyancy, but skipper remains cool-headed, none the less...

Fact is respectable, fiction is fun.