Son of a gun

Son of a gun is an exclamation or a noun in American and British English. It can be used encouragingly or to compliment, as in "You son of a gun, you did it!"

British English
It is claimed that in British naval slang this term refers to a child of questionable parentage conceived on the gun deck, hence 'son of a gun'. The term possibly predates this claimed origin, and Snopes.com lists it as being part of the English lexicon since at least 1708, although British warships, such as the Mary Rose, had carried gun decks since at least the times of Henry VIII in the 16th century. It was also necessary to record in the ship's papers the father of the child. As the parentage was uncertain, the senior non-commissioned officer, "The Gunner's Mate", was ascribed as the parent. It is also claimed that the saying has its origin in the supposed practice of women travelling on board ship giving birth on a sectioned-off portion of the gun deck. For instance, Admiral William Henry Smyth wrote in his 1867 book, The Sailor's Word-Book: ""Son of a gun, an epithet conveying contempt in a slight degree, and originally applied to boys born afloat, when women were permitted to accompany their husbands to sea; one admiral declared he literally was thus cradled, under the breast of a gun-carriage.""

American English
Apollo 12 Astronaut Pete Conrad said, upon seeing the Surveyor 3 just prior to touching down on the Moon: "Hey, there it is! There it is! Son of a gun, right down the middle of the road!"

An urban legend sometimes states that a story reported in the October 7, 1864 The American Medical Weekly about a woman impregnated by a bullet that went through a soldier's scrotum and into her abdomen was the origin of the term "son of a gun." The story about the woman was a joke written by Dr. Legrand G. Capers; some people who read the weekly failed to realize that the story was a joke and reported it as true. This myth was the subject of an episode of the science entertainment TV show Mythbusters, in which experiments showed the story implausible.

Others
The Cambridge Advanced Learner's Dictionary and Webster's Dictionary both define 'son of a gun' in American English as an euphemism for son of a bitch.

Historian Brian Dowding states that the phrase 'son of a gun' originates from feudal knights' disdain for newly developed firearms.

Encarta Dictionary defines the term in a different way as someone "affectionately or kindly regarded."

The term can also be used as an interjection expressing surprise, mild annoyance or disappointment.