Live data from Hacker News

But no, 80-column terminals in 2020 isn't “reasonable” any more

lkml.org

131–140 of 330 posts

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#131

Typical ill-considered comment from Linus, and surprising for someone getting on his years. Column width is an accessibility issue . I'm barely in my mid 30s and the average font size has been steadily creeping, maybe 1.5 pts per 5 years. I could tolerate 132 column files today, but by the time I'm 50 there is no way this will work, regardless of screen size

Can't you enable line wrapping in your editor?

Line wrapping is an abomination.

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#132
France named Basile Bouchon invented a way to control a loom using perforated paper tape in 1725. The descending lineage can be traced to 80-column terminals:

https://dave.autonoma.ca/blog/2019/06/06/web-of-knowledge/

In his Elements of Typographic Style, Robert Bringhurst suggests that 66 characters per line, including spaces, for single-column pages is optimal:

https://dave.autonoma.ca/blog/2020/04/11/interior-book-desig...

What studies have reviewed code quality versus line length? Or eye fatigue versus line length? Or comprehension versus line length? Are their any studies that attempt to approach optimal line length empirically?

My preference is to indent 2 spaces rather than 4, which allows a lot of code to fit within 80 columns. When and why did 4 spaces became the norm?

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#133

Earlier quoted context omitted.

I think most editors these days do a pretty decent job? It's not perfect, of course, but 99% of the time it's fairly readable.

More generally though, there's an argument to be made that line-wrapping should be a thing your editor does as part of the rendering process -- not a thing it encodes into the actual source file. Modern languages come with excellent auto-formatters which can make the code look nice at just about any line length. What we need to do is integrate the auto-formatting into the editor (likely via a language-server) so that…

We could stop storing code as text, just store an AST and let the editor parse it and render it respecting the preference of the user

(I think this is a terrible idea, but also got me thinking if there's something interesting there)

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#134
post #49

The problem with overly wide lines is that it hurts readability because it's harder to find the next line when scanning your eyes from right back to left. Take it from the world of books: This study may be helpful: > This study examined the effects of line length on reading performance. Reading rates were found to be fastest at 95 cpl. Readers reported either liking or disliking the extreme line lengths (35 cpl, 95 c…

> The problem with overly wide lines is that it hurts readability because it's harder to find the next line when scanning your eyes from right back to left. There is some truth to this, but it's largely irrelevant. When text is laid out for books, it's based on a fixed width and each sentence follows the next. Code isn't laid out that way, with code, each statement starts on a new line which naturally limits line wid…

Another reason the assumption that style rules for natural language is transferrable to code is kinda baffling. I wonder if there's ever been much research in this space which doesn't make that assumption.

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#135
post #39

I guess most of us, pragmatic people, agree that 80 columns is not a sane standard anymore. The more interesting question is "what would be a good default line length in 2020?" I vote for 120 columns.

I would say that 120 is too much - for 1920px (still widespread resolution) and split screen (2x120), one would need 8px-wide font to fit and no other borders. 8px-wide font is IMHO not enough for good readability, even VGA in 198x switched to 9px-wide fonts (from EGA 8px-wide fonts).

Next natural values are 106 (for 9px fonts) and 95 (for 10px fonts).

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#136
I see a lot of people saying that 80 char is a thing of the past, but that's not really my experience:

My work machine is a macbook pro 13", I rarely have a second monitor (and when I do, I tend to have my browser on it). I get 2 panes of just under 90 chars side-to-side in VSCode, with a normal-smallish font.

Am I in such a minority?

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#137

I think this is a subject most editors fail to address. A single line of code should be written to file as a single line - no matter how long. However, the editor you are using should be able to gracefully word wrap it depending on your settings. Most editors word wrap based on window size or some other hard setting. They should be able to wrap gracefully at a logical point in the code e.g. at a comparison operator o…

Is it an issue of editors or of language? The amount of errors that incorrect whitespace characters cause in whitespace sensitive languages could attributed to editors obfuscating what's written to file.

I think the pragmatic solution is an opinionated linter that can be broken.

Re: But no, 80-column terminals in 2020 isn't “reasonable” any more

#139
post #104

Earlier quoted context omitted.

Github provides an email to Github comment gateway. So he was composing his replies in his email client.

And his email client hard-wraps at 80 chars, because that's the standard of both Linux and Git mailing lists, because they send patches in emails. I like the irony :)

> patches in emails

Cringe.

Post reply on HN