Why is 80 characters the 'standard' limit for code width?
Why is 80 characters the "standard" limit for code width? Why 80 and not 79, 81 or 100? What is the origin of this particular value?
Before anyone thinks of adding another answer to this question *please* read the accepted answer and Mark Booth's answer. These answer the question comprehensively. The punchcard came first.
You can thank the IBM punch card for this limit - it had 80 columns:
After that early teletypes, and later video terminals used 80 columns (and then 132 columns) as a standard width.
An old lecturer of mine gave me one of his old punch cards, I have no idea what the code represented on it does, but it makes a great bookmark and conversation piece. I was thinking of laminating it for posterity, but was afraid that it'd ruin it.
@LapTop006 I am curious about the 132 standard now. Is that also a cary over from punch cards?s
@hydroparadise 132 columns is a carryover from line printer carriage widths. It was also standardized as an optional "extended" limit in one of the later Fortran versions, I believe.
@FactorMystic - the punch card size was based on the size of the currency back in the late 1880's's when Hollerith designed them to assist with the 1890's census.
The cards are that size because in 1890, CTR wanted to reuse currency carriers (the dollar was bigger back then) to carry the census data cards.
80 columns does derive from punched cards (and that's why line numbers were used too because if you dropped a stack of punched cards you didn't need to sort them). 132 columns probably derived from the standard width of printer paper.
One reason for the card size has been given. How about a reason for the size and spacing of the holes required for the result to be 80?
There were also a LOT of early dot matrix printers that had an 80 character width limit - ( and some/later wide ones with 132 characters) - so you had some 132 width stuff early on as well.
@hotpaw2 The spacing and size of the holes looks similar to those used by player pianos, I wouldn't be surprised to hear that they were reusing technology if not actual components.
@fredley currency was that size so they could fit 80 characters of text on it ;-)
The Pica typeface, which originated in the late 1700s and was used on typewriters, is typically 10 pitch. That puts 80 columns across a letter-sized page. I won't speculate about Why letter-sized pages are the size they are or what that has to do with railroad gauges or the ancient Romans. :-)