The Bolitho Novels are 30 or so books written by author Douglas Reeman(using the name Alexander Kent) written over the span of half a century from 1960's to present day. "The Complete Midshipman Bolitho" collects the first three of those stories(by story-chronology rather than publication date--in that sense, they are similar to the excellent Fafhrd and the Gray Mouser "Swords" collection.)
Stories of Loyalty
In addition to the great descriptions of the various naval actions Bolitho participates in, the stories have a strong moral component. In fact, all of the conflicts are described by Bolitho in moral terms. As such, pirates are reviled for their cruelty, wreckers for their betrayal of their fellow seamen, and Bolitho's rival officers for their indifference towards the men under their command.
Invariably, Bolitho himself is the moral compass for the stories. This omniscience in moral quandaries together with his limitless bravery does make him a bit Mary Sue character, to my mind.