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.

    Is it still the standard? Can't we get over it yet? I'd say 140 is more than acceptable with current displays (even smartphones). I chose 140 because it's the limit in Twitter, but 160 (doubling the previous) would fit as well...

  • Oded

    Oded Correct answer

    8 years ago

    You can thank the IBM punch card for this limit - it had 80 columns:

    IBM punch card

    After that early teletypes, and later video terminals used 80 columns (and then 132 columns) as a standard width.

    @LapTop006 - Well, yes, but that's the historical start of the "standard"...

    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.

    Now the question is: Why did the IBM punch card have 80 columns?

    @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.

    Don't forget PC text mode. BIOS and DOS: 80 columns.

    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?

    @AlBiglan Why was currency that size?

    Later 72 chars because of this: 3270 editor

    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. :-)

    @Blrfl But that then begs the question why typewriters are typically 10 pitch.

License under CC-BY-SA with attribution

Content dated before 6/26/2020 9:53 AM