The barcode was inspired by Morse code.
Why it is true
A graduate student heard his university dean wish for an automated system to read product information and adapted the dots and dashes of Morse code into lines.
Source: Tech History
Would you rather be asked first?
This is the reading side of the site, so the answer is in the sentence above — that is the whole point of it. Test yourself works the other way round: the question comes on its own, and the fact and the explanation only appear once you have answered.
Related facts
The first product ever scanned with a barcode was a pack of chewing gum.
The first email was sent in 1971 and used the at sign to separate the user name from the machine.
The computer mouse was invented in 1964 by Douglas Engelbart.
Morse code was invented by Samuel Morse in 1837.