Live data from Hacker News

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

lkml.org

201–210 of 330 posts

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

#201
post #36

Earlier quoted context omitted.

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.

I've also been buying a larger monitor every few years, as the prices drop. But I hated the 42" 4K I tried and returned it. The problem was the edges are just too far away. If I use them I end up with the same kind of neck strain I would get with a multi-monitor setup. So I only used kind of the middle section of the screen anyway. And at 42" 4K the physical pixels are just too big - everything is fuzzy. 32" 4K is th…

Do you know if your neck strain is due to horizontal or vertical movements? On a few times I had to work with big monitors (>30"), I noticed that I placed/sized windows only at the center, and not all the way to the top. Looking up too much is not comfortable for my neck. For the horizontal movement, I have no problem. But when my eyes are focused on the centre part, if I need to look at the extreme left/right, I need to refocus, which is slow/tiring.

My work setup is 2x24" monitors, and I really prefer 2 small ones instead of a bigger one. I can orient them so that all pixels are approximately at the same distance to my eyes.

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

#203
post #199

Earlier quoted context omitted.

This was a solved problem with tab indenting. It's a bit unfortunate that space indenting won, but I understand why.

Not really a solved problem. Even if you set your editor to display 1 tab as 2 columns, another person may set their editor to display 1 tab as >2 columns. So even using tabs, a project has to set rules for tab width.

Why would that be a problem? That's the point, that you can set tab width any way you want.

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

#204
post #61

Earlier quoted context omitted.

Even on very large high resolution screens, it's nice being able to tile that many more files on the screen. I think 'narrow' source code is advantageous no matter your display.

I agree with you to a degree, but one of my pet peeves about certain linters and code formatting tools is when they take something that could easily be a very understandable single line, and break it up into three or more lines because that's what the normal rules look like. As a result, sometimes a 15-20 line function ends up being over 50 lines, and I end up not being able to see the entire thing without scrolling.

Also sometimes, long lines can more easily render the structure of the program. Like when a function is called with many/long arguments several times in a row, with varying arguments. If you have one line per call, you can easily see that it is the same function and what argument is changing at each call. If you rewrite each call as 5 lines, it is much more difficult to grasp what is going on.

And when you need to change, say, the second parameter, you will see that the same call is made n times, and not forget one in the process.

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

#205

Optimal code line width has very little to do with monitor or window width. It's more of an anatomical restriction: the resolution of the human eye and the field of view. For example, if we had 10 meter-wide monitors we won't be able to see them entirely from a close distance. Increasing the distance will require to increase the font, so the number of characters per line we can use doesn't change much. Not so long ag…

Details matter. The way I'm set up at my desktop, my editor can fit ~320 columns. Which means I can fit four 80-column-wide files side by side. Three, if you account for line numbers on the margin. (I usually do two, because my code tends to go up to ~120 characters.)

The more reasons to use narrower lines, right? I mean, I work in two files side by side 50% of the time, and with 120 chars the text would require wrapping, which is really unreadable in e.g. python.

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

#206
post #196

I'd rather have 80 columns on a 4:3 ratio than 120 columns on 16:9. "A wide monitor is for" watching video, playing games, and putting larger diagonal numbers on the box. I miss turning one monitor sideways to nearly fit an A-sized document. And I miss those 120 extra vertical pixels from before 1080 became the standard. I think the only good and common option right now is 21:9 in a large size and resolution, you sti…

I would gladly pay twice the price for a 4k 4:3 or 3:2 monitor. Even on wide displays, I rarely split top-to-bottom more than once. More vertical space would mean a lot more usable screen estate for me.

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

#207
post #175
post #98

Earlier quoted context omitted.

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)…

> the problem is that the vast majority of programming tools today conflate content and presentation.

This is not a problem, but a beautiful and crucial property of text files. I like the principle that "a program is a text file", that you can edit with tools orthogonal to the language in question

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

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

Unlike text in print, code is not a paragraph, in typical code every line is not going to be that long. I am not sure the same rules can apply.

I find that breaking a line at 80/120 makes the piece of code I am trying to understand less readable, while the line itself may have become more readable.

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

#209
post #183

Earlier quoted context omitted.

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.

How can you make a linter for this?

Annotate the long line to ignore that particular linter rule. This makes it clear that it's not because the coder was lazy, ignorant, etc.

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

#210

If you’re going to have this argument, it’s important that you do it right. The question is not precisely “how wide can I display code”. The question is “how wide is a side by side diff?” That is the worst case scenario for code reading, and it is the one where the worst classes of errors can slip in (one where neither author actually wrote the bug). Linus answers this indirectly: you can easily diff 100 characters o…

Using softwrap when looking at diffs seems natural. After all you already rely on tools to show you the meat of the diff, the changed lines, and preferably the tokens inline.

Plus I find that most of the time I just use the default patch view, not the side by side one when doing review.

Post reply on HN