Hacker News new | ask | show | jobs
by rbanffy 2026 days ago
When I get tired of actually arguing for 80 columns (legibility, shorter names, fewer indent levels, etc) I just say that "God made the VT-100 with 80 columns for a reason" (which is amusingly incorrect on many levels).
4 comments

When I get tired of actually arguing for 80 columns, I just say that using 80 columns is actually too many columns, as it excludes developers who program on systems with 40 columns; it's no chance that the most sold home computer in history had 40 columns.

Without arguing about 80 columns being optimal or not, this is the author's habit:

> I frequently have two or more editor windows next to each other, sometimes also with one or two extra terminal/debugger windows next to those. To make this feasible and still have the code readable, it needs to fit “wrapless” in those windows.

It's not clear whether the terminals are horizontally next to each other, however one must consider that in his calculations, there is the presupposition of extra programs (other than the editor) horizonally stacked on the same screen. The sky is the limit, with such presupposition.

I still contend that 40 columns should be the maximum, as in addition to the editor, any sane, productive developer should keep one or two terminals, the team chat, and the music player stacked horizontally on the same screen. /s

I unironically prefer 40col but I'm afraid nobody shares my sentiment... it doesn't help that I also have a preference for 8-space tabs
> it's no chance that the most sold home computer in history had 40 columns.

It really depends on the language, but 40-columns is actually not bad if you are programming for an 8-bit computer in BASIC.

One should avoid having overly long, multi-statement lines anyway.

I know it was a joke but I am curious where the 80 columns limit originated? Fortran? Punched cards?
Yes, it predates CRT displays:

https://en.wikipedia.org/wiki/Punched_card

“A 12-row/80-column IBM punched card from the mid-twentieth century”

The hardware was produced to match the fixed limitations.

Note: even with 12 rows a punched card traditionally stored only one line of the source text. That allowed editing by replacing one or more cards.

Also, even more details:

https://en.wikipedia.org/wiki/Characters_per_line

A minor nitpick - it's a 80x12 bits, not character rows. It held one 80-column line on each card. When I did it (a looong time ago) the reader printed the line on the top of the card.

The cards were one of the reasons CRT-based terminals such as the 2260 and 3270 had 80 characters per line (VT-52 had 64 and there was some 3270-like terminal w/ 40 columns.

> it's a 80x12 bits, not character rows

Never said anything else. The rows I've mentioned were clearly the rows of bits (represented by presence or absence of a hole). From a pure theoretical point of view it still appears to be wasteful (as the used character set encodings didn't use all representations of 12 bits), but there were "good enough" reasons behind that decision too: It all started from the design of the tabulating punched card from the 19th century, and from every digit 0-9 having its own row, and two more rows for other marks. The hardware depended on these properties.

125 years ago, the logic I've described was already there, 12 rows but still less columns on this card:

https://en.wikipedia.org/wiki/File:Hollerith_Punched_Card.jp...

Increasing the number of columns was obviously later technical improvement.

Punched cards. The 80x12 format "IBM card" was introduced in 1928! [1]

[1] https://en.wikipedia.org/wiki/Punched_card#IBM_80-column_for...

And there is/was an 8 character limit on COBOL variables.
While we're doing jokes, here's mine:

I paid for the whole monitor, I'm gonna use the whole monitor!

Just rotate it by 90 degrees and be happy.
Let's nest these comments to oblivion in tribute to the article.
If I'm honest, I don't disagree with tall-screen over wide-screen. I actually prefer it for reading.
"God created the Alto (and the PERQ, the Apollo DN 100, the Sony NWS 800, and the Tek 611) with a portrait display for a reason."
In as few words: Yes
80 columns would be enough most of the time.

But how often do you really have 80 columns? With indentation you chip away on the left side and with a few indentation levels you have not as much space left.

Three or four levels is most likely too deep.
Depending on language that's easily reachable with sane code.

One level of indentation for the module/class level and another one for a method. Already at two levels.

Within a method, two levels of indentation are by far not extreme.

Good point. I was thinking from the base of the code block :-(

/me slaps forehead.