Early mainframe computer programs were contained in stacks of cardboard punch cards. Although it has been many years since they have been used for this purpose, punch cards still have a few uses, and are most notably used in some voting machines.
Punch cards were actually invented before electronic computers. Originally patented by Herman Hollerith, the punch card was first used with tabulating machines to record vital statistics by the New York City Board of Health, and later, in the 1890 census. Hollerith actually got the idea from the cards used in Jacquard looms, which use cards to control a weave pattern.
Hollerith invented electromechanical machines that included a punch device, a tabulating machine and a sorting machine, which could be used to accumulate and store statistics. His company, the Tabulating Machine Company, was later joined by Thomas Watson, who later renamed the company International Business Machines (IBM).
The size and number of columns has varied over the years, with the original card used in the 1890 census having 20 columns with 10 punch positions each. There are a few interesting parallels to modern operating systems. In 1928, IBM introduced and patented the 80 column card that used rectangular holes instead of round holes, which was significant because it limited IBM's competitors to the older, incompatible round-hole format.
Remington Rand designed a competing format that permitted 90 columns of text to be stored on 45 column cards, which was actually a superior design, but because of IBM's dominance of the market, were not used as often. Card processing did not necessarily require the use of a computer. Some retail applications, for example, used a card sorter and tabulating machine for accounting functions, such as totaling price fields on cards in multiple categories.
Programming languages required the early fixed format cards to move to a free format design, and with the development of standardized computer languages such as FORTRAN and COBOL, generic punched cards became prevalent.
It wasn't until the 1970s that large data processing operations began shifting from punch cards to timesharing environments with data stored on magnetic tape.
Punch cards are still widely used in voting machines, despite problems that have occurred over the years. In the 1968 general election in Detroit, a rainstorm soaked one batch of ballots, and in the 2000 presidential election, questions arose as to their accuracy and efficiency as compared to more modern systems.