Live data from Hacker News

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

lkml.org

171–180 of 330 posts

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

#171

I remember bikeshedding with my coworkers about this topic a few years back while coming up with lint settings. We ended up analyzing all current line widths and realized that something like 98% of lines were under 110 characters, so that is what we ended up using.

But the thing to remember is that you don't need to have a rule of "lines must be no longer than this". Instead, it should be "aim for lines no longer than this", and then sometimes, you need longer because it makes sense in that specific case.

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

#172
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 this idea is you then get these web site designers who take it as dogma and try to force a particular width, without regard for the browser window size. This results in sometimes 1/2 or more of the horizontal area on the page wasted by this giant white space border. If you must have a margin, at least make it a reasonable percentage of the browser window width. Or better yet, don’t force my browser t…

Somewhere I have a picture of daringfireball taking up around a quarter of the monitor width and just blank space around it.

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

#173
post #98
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…

It really doesn’t matter. We must strive to separate content and presentation, so people could choose whatever presentation they like (and have the editor do the wrapping as desired), for whatever whimsical reason that is nobody else’s business. It’s crazy to keep having this discussion and debating what the “research” indicates. C’mon, haven’t we made any progress in forty years!? Everybody can have their own damn b…

Ah so you're "tabs" haha

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

#174
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.

Good line length for 2020 is 80 columns.

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

#175
post #98
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…

It really doesn’t matter. We must strive to separate content and presentation, so people could choose whatever presentation they like (and have the editor do the wrapping as desired), for whatever whimsical reason that is nobody else’s business. It’s crazy to keep having this discussion and debating what the “research” indicates. C’mon, haven’t we made any progress in forty years!? Everybody can have their own damn b…

This. The problem itself has nothing to do with the number of characters you have on a line - the problem is that the vast majority of programming tools today conflate content and presentation.

The job of making sure the line length is reasonable is not up to the writer of the code - it is up to the tools that are used to read it. Lines should be as long as necessary, and then intelligently (i.e. syntactically-aware) soft line-wrapped by the editor when opened.

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

#177
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…

Is there any research to suggest that reading legibility of code is the same as for regular text? Unlike regular text code often has special characters & indentation to break it up, so intuitively I would assume it could support longer line lengths.

Yeah, we cant forget whitespace (indenting, space alignment, etc).

In a 100 char wide code line, how many actual non-whitespace chars would there be on average?

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

#178
post #68
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…

Let's say I want to find every function call too `foo` that passes `true` as the last argument. I might do something like `grep "foo\(.*true\);"` That would work well enough if the codebase was mostly uniform and all calls to foo were on a single line. However, if we have callsites like "foo(x->y(get_arg(z)), something, \ntrue);" where 'true' is split onto a newline, that naive grep misses it. As linus says, grep is…

Then pipe through

  perl -pe 's/\\\n//g'
Before grepping

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

#179

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…

> wrap gracefully at logical point in the code This is so clearly right, how can it not yet exist? ‘Just’ dynamic virtual pretty print per personal lang style prefs.

Xcode on OS X has been doing this for at least one decade.

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

#180
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…

[deleted]
Post reply on HN