Hacker News new | ask | show | jobs
by hyperpape 3516 days ago
Many people in our profession write code that's less that 80 characters per line because that's how much you could display on terminals in the 70s.

As a profession, we can't complain that someone might be bothered by the idea of word-wrapping.

2 comments

> Many people in our profession write code that's less that 80 characters per line because that's how much you could display on terminals in the 70s.

It's _also_ a very reasonable & readable amount of text in a row. There's nothing wrong with that.

Not only is 80char more readable, as a sibling comment said, but it also allows addition pieces of code to be displayed side-by-side on a laptop screen.

To be fair, 120char wide code is also not too bad for this purpose and readability.

> It's _also_ a very reasonable & readable amount of text in a row

Presumably, that's why they used 80 characters in the first place, as anything more is too hard to read.

132 column displays were common by the end of the 1970s.

80 column displays date back to the early 1970s.

I started coding on an 80 column display, and I have no doubt at all that a modern 16:9 monitor that can display a double page PDF or a web page with a variety of fonts is a much better display device.

It was 80 columns to match a punch card, AIUI, not a decision on readability grounds at all.
And why was a punch card 80 columns?
It sounds like that was the limit they could fit in the available space given the technology (earlier versions had fewer columns, the "upgrade" to 80 was based on using new narrower holes) - the width was set by wanting to match existing infrastructure for money.
Isn't it more so it is readable inside a phone display to an ssh session as well as a fat 4K screen? That's my reason at least. Can always scale up something, but line breaks I didn't make myself make me want to commit unspeakable atrocities in the name of a demonic deity taking the earthly form of a little girl. Or, you know, angry.
I'm one of those people, though my reason is more so that I can fit more code windows side-by-side (especially on a system with a tiling window manager, like the laptop on which I'm typing this comment) and not have to deal with horizontal scrolling or weird word wrapping that's out of my control.

It also helps to keep my code readable; the shorter the line, the quicker I can work out what exactly that line happens to do. In the vast majority of cases, an inability to keep a line within 72 characters is a line that needs refactored.