Live data from Hacker News

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

lkml.org

291–300 of 330 posts

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

#291

Earlier quoted context omitted.

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

Tell that to 'functional programming' people, or the lambda-crazy people who put entire functions in argument lists to the point you can't parse a statement to save your soul. I've had to print and highlight code to figure out where it began and ended.

I mainly use Clojure and keep most of my lines under 80 characters.

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

#292
post #57

I'm a big fan of softwrapping. Not because it's inherently prettier or something, but because the results are consistently better on more platforms because they can softwrap at what you've set the column width to be and not some arbitrary number someone thought was a good idea. (I have a similar argument for using tabs, but I digress.)

This is what Linus has said in the past regarding soft-wrapping: https://github.com/torvalds/linux/pull/17#issuecomment-56611...

After reading that, I'm really thankful that git-by-email is dying. Hard wrapping is just really terrible for anyone not using a VT-100.

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

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

I try to keep my Clojure code under 80 characters (so that I can have three editors comfortably side by side at my preferred font size) and keeping lines short is more than just where to wrap or other visual-only things. Usually when I have a long line, it makes me reconsider the structure of the code and I refactor it into something else. Most of the time, the new structure not only has shorter lines, but is simpler too, so its a double win. This isn’t always a task that the tools could do for mem, though, as it sometimes rewuires rethinking what I’m trying to accomplish.

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

#294
post #279

Earlier quoted context omitted.

Yep. I have yet to hear a coherent argument against tabs. It’s such a tiresome squabble.

Vertical alignment of related lines.

If you indent with tabs, you can still align with spaces for vertical alignment.

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

#295

Earlier quoted context omitted.

> Good programmers gravitate towards shorter lines of code by nature. If your average line of code is wider than 80 characters, it's likely you have some other, bigger coding style problems which need to be addressed. This kind of thing is really obtuse and it drives me insane that so many people subscribe to ideas like these. This kind of thinking is what leads to linters with completely arbitrary rules telling me h…

When is shadowing is right thing to do? Why picking a new variable name wouldnt work?

No matter what I say here, I feel it would be very likely you will tell me I'm wrong.

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

#296

Earlier quoted context omitted.

This would make debugging hard, as debuggers are very much line number based. Step commands move one line at a time, breakpoints are for specific lines, and stack traces from exceptions include line numbers but not character offsets. That’s why for function calls passing multiple arguments where each argument may be non trivial, it’s a good idea to put each argument on its own line.

Not always. I can set the breakpoint in jetbrains rider to a function in a multi function line. And Java stacktraces certainly contain character offsets.

I’ve seen character offsets for JavaScript (which requires it due to minimization), but never Java. I’m pretty sure that data is not available in Java bytecode, nor most compiled languages.

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

#297
post #272

Earlier quoted context omitted.

> so bad it locks most people out. Could you specifically describe why it locks most people out? > I did contribute to Git, and the experience was horrible. What was bad about it? > The amount of time spent on the mailing part was far far greater and confusing than the amount of time writing code From what I've read on the mailing list, a lot of the time was spent discussing the patch or patch series in general. That…

The single conclusive answer to your questions is "everything", absolutely every single component in that process is obsolete, cumbersome, finicky and convoluted. What's confusing about that description?

> that process is obsolete, cumbersome, finicky and convoluted.

It just sounds like you don't like the process since you apparently aren't able to express a specific issue with it.

Here's what I don't like about Github

1. You need to set up an account on there (I already have an email account)

2. You need to fork a repo rather than just simply cloning it.

This means you have to go through a rather convoluted process to keep your fork up to date with the original repo. That either involves setting up another origin pointing to the original repo and then pushing up those changes to your forked repo (and taking into account any branches you updated). Or you have to delete the forked repo, fork it again and then have to somehow resolve possible conflicts when running git pull.

3. It's not possible to comment on a commit message itself

This means that I need to comment on the first line of the diff for that commit or I have to edit the url to navigate to the commit itself and then type stuff into a comment box at the very bottom of the diff.

Then that comment doesn't show up with any context other than saying "github-user commented on abcdef1". And those comments disappear when someone force pushes to the branch to update the commit. If the comment is associated with the first line of the diff for that commit, it either is collapsed or not depending on whether the line changed. I still have to go to the commit view to check whether the updated commit message addresses my comment.

4. It collapses comment threads when the line of code changes regardless of whether the change pertains to the original comment.

This means I have to scroll from the top of the conversation view page and search for collapsed comment threads to find the comment I made, then go to the diff view to compare that line with what's in the current diff to determine whether the change actually addresses a comment I made

5. It's not easy to jump between different revisions of the branch over several force pushes in a way that makes it easy for me to see what changed on a per commit basis

6. It doesn't provide a way to distinguish different subthreads of conversations on the same block of code

7. It requires far more scrolling in the conversation view when there are a lot of comments on a pull request

As for email, all I need to do is

1. Run a few git config commands to set up git to send email using my existing email account (this is a one type step)

git config --global --add sendEmail.smtpServer "your.server"

git config --global --add sendEmail.smtpServerPort 587

git config --global --add sendEmail.smtpEncryption tls

git config --global --add sendEmail.smtpUser "your.email.username"

2. Clone their repo, check out the appropriate branch, make your own branch and do your work

If the upstream repo is updated while you do you work, you can simply run git fetch and rebase your local branch on top of the updated branch, which is a lot less convoluted compared to what you have to do to keep a Github forked repo up to date.

3. Create your patch files with cover letter

git format-patch --to email.list.address --cover-letter base-branch

4. Edit the cover letter file and update the subject and body to include your patch series description (which isn't much different than composing the PR description on Github)

5. Run git-send-email to send your patch series to the email list

git-send-email *.patch

6. Check your email for replies, engage in addition discussion, etc (which is better than having to scroll through a large diff to find every comment)

7. Update your code, rebase

8. Run git format-patch the same way but add -v2 to indicate a reroll

9. Run git-send-email and reference the message-id of the original cover letter

In terms of engaging in discussion over email, one can reply inline and comment on any part of the cover letter, commit message, line in the patch etc. One can save the emails from multiple patch series, run git am to apply them in different branches locally and run git diff or git range-diff to check what's changed. That's not possible in Github if someone force pushes to the branch because there's no longer a remote branch to fetch to allow for a comparison.

In any case, I would certainly be interested to read your specific complaints about the email based process instead of just a dismissive reply.

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

#298

Earlier quoted context omitted.

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

> Good programmers gravitate towards shorter lines of code by nature. If your average line of code is wider than 80 characters, it's likely you have some other, bigger coding style problems which need to be addressed. This kind of thing is really obtuse and it drives me insane that so many people subscribe to ideas like these. This kind of thinking is what leads to linters with completely arbitrary rules telling me h…

> Arbitrary rules like line width (and I assure you, those rules ARE arbitrary) help exactly 0 people per day, and cause problems for more than 0 people per day.

I have no idea why you think I am arguing for stuffing arbitrary line lengths in code. I was arguing for the exact opposite, that line length limits are rarely beneficial.

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

#299

Earlier quoted context omitted.

When is shadowing is right thing to do? Why picking a new variable name wouldnt work?

No matter what I say here, I feel it would be very likely you will tell me I'm wrong.

I am skeptical but curious. I honestly can't think of one. The closest one I can think is maybe you have some kind of macro that uses a temp variable? like a swap macro? But i think you can still have a unique variable name for that particular line if you want?

But if these cases are exceptional then you can use pragma to suppress those warnings for that particular block of code. If they are not exceptional perhaps you shouldn't have enable the warning/linter check for that warning.

But honestly I can't think a good reason for shadowing variables and would appreciate an example

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

#300

Earlier quoted context omitted.

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

> Good programmers gravitate towards shorter lines of code by nature. If your average line of code is wider than 80 characters, it's likely you have some other, bigger coding style problems which need to be addressed. This kind of thing is really obtuse and it drives me insane that so many people subscribe to ideas like these. This kind of thinking is what leads to linters with completely arbitrary rules telling me h…

> Arbitrary rules like line width (and I assure you, those rules ARE arbitrary) help exactly 0 people per day, and cause problems for more than 0 people per day.

Linters' line length rules solve a problem of useless bikeshedding and introduce consistence to the code. This already helps everyone involved in reading and writing the code.

Post reply on HN