Live data from Hacker News

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

lkml.org

41–50 of 330 posts

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

#41
I'm a bit fan of usually wrapping at 80, but not requiring it in a linter.

Do what makes the most sense for readability, but often lines significantly over 80 characters are more readable as two lines.

I typically work with multiple horizontal splits open. That's part of why I prefer 80 characters. However, I really do feel that a soft break at about 80 is good for readability, and certainly easier with larger fonts.

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

#42

The problem here is that our editors aren't smart enough to wrap code appropriately. Word processors know to wrap lines on word boundaries; a smart code editor should be able to wrap lines and indent parameters in a human-pleasing way as you drag a window wide or narrow.

Perhaps this could be a new feature for the language server protocol? Or is it already in the works...?

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

#43
post #19

Earlier quoted context omitted.

A note on your last sentence. Once I used my Win10 laptop at an interview at Apple. The interviewer saw me drag one window the the side, snap it, and then select another window to fill in the space. He said, wow, Windows is really nice! :)

The #3 productivity app on the Mac App Store is a $2 app that enables this on Apples: https://apps.apple.com/us/app/magnet/id441258766?mt=12

Hammerspoon can do this (and way more!) for free :)

https://www.hammerspoon.org/go/#winresize

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

#44

Isn’t there some merit to the notion that long lines are typically either overly verbose or mentally challenging to understand?

Subjectively, I feel that at some width, I lose the ability to take in lines at a single glance, and spend more time in horizontal head movement. I rarely test this in code, but in web pages that use the entire width of the window, it's pretty evident to me that my reading speed goes down when the text gets too wide.

Like Linus, I find 80 columns too narrow a limitation (and I got started on a 40x25 system, not even 80x25), but it would seem useful to me to standardize on some sensible maximum width, e.g. 100 or 120 columns.

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

#45
post #17
post #6

Many programmers are averse to line wrapping plain text files (especially source code), which has never made much sense to me. There's great support for it in like every editor.

linewrap is aesthetically and logically jarring when you're debugging code 'by shape'. peaks and valleys between functions and such are a huge aid visually -- line wrapping makes visualization of source code harder for myself, personally.

That's only a problem if you're using a line-wrap method which doesn't account for indentation and just blindly wraps (which yes, is awful). If you want to have nice indentation aware plain text line wrapping, your text editor almost certainly supports it.

If you use vim, look into the "breakindent" option.

If you use Emacs, you can use the "adaptive-wrap" package with a configuration like this:

    ;; Indentation of softwraped code
    (use-package adaptive-wrap
      :ensure t
      :init (defun my-activate-adaptive-wrap-prefix-mode ()
              "Toggle `visual-line-mode' and `adaptive-wrap-prefix-mode' simultaneously."
              (adaptive-wrap-prefix-mode (if visual-line-mode 1 -1)))
      (add-hook 'visual-line-mode-hook 'my-activate-adaptive-wrap-prefix-mode))

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

#46

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

> I'm barely in my mid 30s and the average font size has been steadily creeping, maybe 1.5 pts per 5 years

I'm a similar age, and my font size has been decreasing steadily. As monitors get better pixel density, text is readable at smaller size. The ereader app I use on my 5.6" phone screen shows 38 lines of text (and approx 45 characters wide) plus blank margins.

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

#47

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

Well Linus is 50 years old. So I expect he also suffers from age related vision problems. So I don't think he is unaware of it being more difficult to read text as you get older.

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

#48
Fwiw, we use 120 columns for Riot/Matrix stuff (https://github.com/matrix-org/matrix-react-sdk/blob/develop/...) - 80 is incredibly constraining for JS and JSX. The key metric is to ensure that a typical laptop can show two screens side by side, without any ugly line-wrapping. Also, any wider and you either end up having to scan a wide distance left to right (the same reasons that newspapers use columns to be more legible) - and it also helps discourage lots of nesting and cyclomatic complexity.

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

#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 cpl). Those that liked the 35 cpl indicated that the short line length facilitated "faster" reading and was easier because it required less eye movement. Those that liked the 95 cpl stated that they liked having more information on a page at one time. Although some participants reported that they felt like they were reading faster at 35 cpl, this condition actually resulted in the slowest reading speed.

The Effects of Line Length on Reading Online News[1]

1. http://psychology.wichita.edu/surl/usabilitynews/72/LineLeng...

For slabs of body copy, I like about 70 characters per line, but anything in the 50-80 range seems good. I also think justified text is harder to read, due to the lack of unique shapes to track on the right side of text — it's far easier to lose your place.

https://graphicdesign.stackexchange.com/questions/13724/reco...

I still often code on a 13" Macbook where I can open a pair of side-by-side windows in my editor with the dock on the side and get about 95 characters into each window. I typically code in Python and use a 4 space tab and a font legible to my 48 year-old eyes w/o reading glasses. On my external monitor, I take advantage of the extra width to open additional windows.

So I dunno, still prefer 80-88 characters for coding, 100 max.

The grep thing seems like a red-herring. Use grep's -A, -B, and -C options to get more context.

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

#50
post #36

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

Do you need reading glasses? I found I did (I'm 47) and it made a massive difference in looking at code- I can use a smaller font and experience much less eye strain.

Yes this. I have 20/20 vision but as I got older getting some mild reading glasses dramatically improved my development experience.
Post reply on HN