In 1948 a supermarket executive showed up at the Drexel Institute of Technology, in Philadelphia, with a request: He wanted the engineers there to design a technology that could encode information about his products. Two graduate students, Bernard Silver and N. Joseph Woodland, took him up on it. Woodland became obsessed and dropped out of school to concentrate on the problem. That winter he was sitting on Miami Beach, dragging his fingers in the sand, when he had his Eureka moment: a series of lines of different widths could be deciphered like elongated versions of the dots and dashes of Morse Code. In other words, a bar code.
For the rest of the story: http://www.businessweek.com/articles/2012-12-17/how-the-bar-code-took-over-the-world