How long is a piece of string?

I use the phrase

How long is a piece of string

every now and then, usually when somebody asks me when I'll finish some programming task that I haven't even looked into yet.

I know what it means:

English

Phrase

How long is a piece of string?
1. (colloquial, often humorous) Used as a response to a question such as "How long will it take?" or "How big is it?" when the length or size is unknown, infinite, or variable.
-How long is a piece of string?, Wiktionary.

But I'd like to know what is the origin of this phrase?

Why is it used to denote an unknown size, length or time? As in, what is it about the string that makes it supposedly hard or impossible to measure?


Solution 1:

Ngram indicates that the phrase is relatively recent, at least as recent as the 19th century.

enter image description here

The earliest use I could find either in books or periodicals is from 1885. I have no reason to believe this is the first use, apart from being the earliest citation I can personally find, but the use in this article has quite a bit of context in the explanation.

enter image description here

  • Lawrence Daily Journal 01 Sep 1885 (paywall)

The growth in popularity in the early 1900's, indicated by the spike around 1920 on the Ngram graph, could be a result of a rather prominent and widely reported use of the phrase by US Secretary of War Lindley Garrison in 1913. One of various similar reports on that quote was retrieved here. This particular use also does a good job explaining what the phrase means; Nobody knows the answer to "how long is a piece of string" without further context, just as Sec. Garrison claimed to need to know more before answering a question about his policy in the Philippines.

Sec of War quote

  • The Burlington Free Press 10 Nov 1913 (paywall)

Solution 2:

It is not that it cannot be measured. It is that a piece of string can be arbitrarily long.

Technically, I suppose if it were short enough we might call it lint, and there is probably an upper bound on how long a piece of string could be in practice, but linguistically it is an unanswerable question in the abstract.

The reason it's used in this context is that a particular piece of string can be measured, but just knowing that it is a piece of string tells you nothing (or almost nothing) about its length.

So if someone were to ask you "how long is a piece of string?" the only real answer is that you do not know. It's a different question from "how long is this piece of string?"