Food historians tell us both spotted dick and spotted dog are suet-based puddings which descended from roly-poly recipes. While suet puddings and pies date to the Medieval Ages, this particular iteration debuts in the 19th century. Traditional English plum puddings are similar in method, mode, and serving suggestions.
The first printed evidence of the phrase "spotted dick," as it relates to food, is attributed to Alexis Soyer, the chef of London's illustrious Reform Club, 1849.
Why this term? The Oxford English Dictionary confirms an 19th century colloquial use of the word dick' meaning pudding. Spotted is assumed to be alluding to the visual effect created by the raisins or sultanas. Neither the OED nor the food historians offer separate explanations regarding the origin of the related term "spotted dog" as it relates to food.
"Spotted dick is a fine old traditional English dish: a sweet suet pudding, typically cylindrical, and studded with currants or raisins. Its name has made it the target of double entendres as leaden as the pudding itself often is.
The first reference to it comes from the Modern Housewife (1849), a cookery book for the middle classes by the French chef Alexis Soyer, who settled in Britain: he gives a recipe, beginning: Plum Bolster, or Spotted Dick--Roll out two pounds of paste...have some Smyrna raisins well washed...' And in 1892 the Pall Mall Gazette reports that the Kilburn Sisters...daily satisfy hundreds of dockers with soup and Spotted Dick'.
The origin of dick is not clear, but there are records of its more general use, meaning pudding', in the nineteenth century: an 1883 glossary of Hudderfield terms, for instance, gives Dick, plain pudding. If with treacle sauce, treacle dick. An alternative name, spotted dog, had appeared by the middle of the nineteenth century: For supper came smoking sheep's heads...and "spotted dog," a very marly species of plum-pudding' (C.M. Smith, Working-men's Way in the World, 1854)."
---An A-Z of Food and Drink, John Ayto [Oxford University Press:Oxford] 2002 (p. 321)