Shaggy dog story

In its original sense, a shaggy dog story or yarn is an extremely long-winded anecdote characterized by extensive narration of typically irrelevant incidents and terminated by an anticlimax.
Shaggy dog stories play upon the audience's preconceptions of joke-telling. The audience listens to the story with certain expectations, which are either simply not met or met in some entirely unexpected manner. A lengthy shaggy dog story derives its humour from the fact that the joke-teller held the attention of the listeners for a long time (such jokes can take five minutes or more to tell) for no reason at all, as the end resolution is essentially meaningless. The nature of their delivery is reflected in the English idiom "spin a yarn", by way of analogy with the production of yarn.
Archetypal story.
The eponymous shaggy dog story serves as the archetype of the genre. The story builds up a repeated emphasizing of the dog's exceptional shagginess. The climax of the story culminates in a character reacting to the animal, stating "That dog's not so shaggy." The expectations of the audience that have been built up by the presentation of the story, both in the details (that the dog is shaggy) and in the delivery of a punchline, are thus subverted. Ted Cohen gives the following example of this story:
However, authorities disagree as to whether this particular story is the archetype after which the category is named. Eric Partridge, for example, provides a very different story, as do William and Mary Morris in "The Morris Dictionary of Word and Phrase Origins".
According to Partridge and the Morrises, the archetypical shaggy dog story involves an advertisement placed in the "Times" announcing a search for a shaggy dog. In the Partridge story, an aristocratic family living in Park Lane is searching for a lost dog, and an American answers the advertisement with a shaggy dog that he has found and personally brought across the Atlantic, only to be received by the butler at the end of the story who takes one look at the dog and shuts the door in his face, saying, "But not so shaggy as "that", sir!" In the Morris story, the advertiser is organizing a competition to find the shaggiest dog in the world, and after a lengthy exposition of the search for such a dog, a winner is presented to the aristocratic instigator of the competition, who says, "I don't think he's so shaggy."
Examples in literature.
Mark Twain and the story of grandfather's old ram.
A typical shaggy dog story occurs in Mark Twain's book about his travels west, "Roughing It". Twain's friends encourage him to go find a man called Jim Blaine when he is properly drunk, and ask him to tell "the stirring story about his grandfather's old ram." Twain, encouraged by his friends who have already heard the story, finally finds Blaine, an old silver miner, who sets out to tell Twain and his friends the tale. Blaine starts out with the ram ("There never was a bullier old ram than what he was"), and goes on for four more unparagraphed pages.
Along the way, Blaine tells many stories, each of which connects back to the one before by some tenuous thread, and none of which has to do with the old ram. Among these stories are: a tale of boiled missionaries; of a lady who borrows a false eye, a peg leg, and the wig of a coffin-salesman's wife; and a final tale of a man who gets caught in machinery at a carpet factory and whose "widder bought the piece of carpet that had his remains wove in ..." As Blaine tells the story of the carpet man's funeral, he begins to fall asleep, and Twain, looking around, sees his friends "suffocating with suppressed laughter." They now inform him that "at a certain stage of intoxication, no human power could keep [Blaine] from setting out, with impressive unction, to tell about a wonderful adventure which he had once had with his grandfather's old ram—and the mention of the ram in the first sentence was as far as any man had heard him get, concerning it."
Nikolai Gogol and the story of Captain Kopeikin.
A lengthy shaggy dog story (roughly 2,500 words in English translation) takes place in chapter 10 of Nikolai Gogol's novel "Dead Souls", first published in 1842. The novel's central character, Chichikov, arrives in a Russian town and begins purchasing deceased serfs ("souls") from the local landowners, thus relieving the landowners of a tax burden based on an infrequent census. As confusion and suspicion about Chichikov's motives spreads, local officials meet to try to discern Chichikov's background and purpose. At one point, the local postmaster interrupts: "He, gentlemen, my dear sir, is none other than Captain Kopeikin!" None of the others in the room are familiar with a Captain Kopeikin, and the postmaster begins to tell his story.
Captain Kopeikin was seriously wounded in battle abroad during military conflict with Napoleonic France in 1812. He was sent back to St. Petersburg due to the severity of his injuries, which include the loss of an arm and a leg. At the time, financial or other support was not readily provided to soldiers in such condition as a result of combat wounds, and Captain Kopeikin struggles to pay for room and board with his quickly-depleted funds. As his situation becomes more and more dire, Kopeikin takes it upon himself to confront the leader of "a kind of high commission, a board or whatever, you understand, and the head of it is general-in-chief so-and-so." It is understood that this senior military figure might have the means to assist Kopeikin or put in a word for a pension of some kind. This is followed by a lengthy summary of Kopeikin's meetings and repeated attempts to solicit help from this leader over a period of time. Eventually the postmaster states, "But forgive me, gentlemen, here begins the thread, one might say, the intrigue of the novel" and begins to introduce a band of robbers into the story.
At this point, a listener interrupts apologetically, "You yourself said that Captain Kopeikin was missing an arm and a leg, while Chichikov..." The postmaster suddenly slaps himself on the head and admits this inconsistency had not occurred to him at the start and "admitted that the saying 'Hindsight is the Russian man's forte', was perfectly correct."
Isaac Asimov and the story of the Shah Guido G..
In the collection of stories by Isaac Asimov titled "Buy Jupiter and Other Stories", is a story titled "Shah Guido G." In his background notes, Asimov identifies the tale as a shaggy dog story, and explains that the title is a play on "shaggy dog".