Master and Commander by Patrick O'Brian
This, the first in the splendid series of Jack Aubrey novels, establishes the friendship between Captain Aubrey, R.N., and Stephen Maturin, ship's surgeon and intelligence agent, against a thrilling backdrop of the Napoleonic wars. Details of a life aboard a man-of-war in Nelson's navy are faultlessly rendered: the conversational idiom of the officers in the ward room and the men on the lower deck, the food, the floggings, the mysteries of the wind and the rigging, and the roar of broadsides as the great ships close in battle.