This is part of the talk “UNIX archeology” I gave at OpenFest 2023.
Have you ever thought why the 79 characters limit per line is so popular in programming and pretty much nowhere else? Python with their notable PEP-0008, the Linux kernel, PostgreSQL and the GNU project, just to name a few. Sounds like an arbitrary one. But why?
People tend to believe that this is because terminals were able to print up to 80 symbols per line and this just got carried over. The most popular one being VT100:
Jason Scott | CC BY 2.0
To be fair, not all of them did, but VT100 is iconic enough to inspire such a tradition. It was able to operate in two modes - 80 columns by 24 rows or 132 columns by 14 rows. So, we might as well agree with that and call it a night. But why?
IBM 80-column punched card
Okay, so seems like VT100 and some of its predecessor were not the first ones sticking with 80 symbols. Here’s the IBM 12-row/80-column punched card format which came to dominate the industry:
Pete Birkinshaw | CC BY 2.0
This makes sense. The EOL is an actual characters and this is how we’ve ended up with 79 characters limit, depending on whether you’re counting the EOL as one. So, this makes sense to be the initial reason for that limitation - the most popular punched cards were limited to 80 symbols. But why?
Initially, punched cards allowed far less characters per-line in order not to tear the card with too many consecutive holes. In fact, way before that they weren’t used to store lines of text in the first place. The only thing that never changed was the size of those cards.
Hollerith tabulating machine
Adam Schuster | CC BY 2.0
The Hollerith Tabulating Machine, an ingenious invention of the late 19th century, marked a pivotal moment in the history of data processing. Conceived by Herman Hollerith, this revolutionary device was inspired by the challenges of efficiently processing vast amounts of data from the 1890 U.S. Census. The machine’s core innovation lay in its use of punched cards, a concept borrowed from the Jacquard loom, to store and sort data.
Each punched card represented a unique data point, with various patterns of holes encoding specific information. When fed into the Hollerith machine, a series of mechanical and electrical systems interpreted these holes, tabulating and summarizing data with unprecedented speed and accuracy.
Yep, U.S. Census. Each card did NOT encode text, but the details for each counted person. Here’s what it looked like:
If you wonder what any of this means, early computers have a great article about 1890 Census: The Meaning of the Hollerith Card Codes . Some of the entries here might not be approved by today’s standards. So, the cards for that machine were that big and every single machine dealing with punched cards, kind of just went with it. But why were the cards for that machines so big?
U.S. dollar bills. See those boxes next to the machine? They were used to transport bills which before 1920 were kind of huge. This way, you don’t get to manufacture new type of boxes and new type of paper cutters for those new special cards.
So, the next time somebody asks you why they should abide to that 79-characters per-line rule, you can tell them the old U.S. dollar bills are to blame. That’s why!