Hacker News new | ask | show | jobs
by yeukhon 4499 days ago
Here is what I've said about 80 char in the past.

"If the argument for expanding to 100 or more is that screen is getting wider, then the benefit of wide screen is the ability to fit multiple terminals in one window. For normal workflow, I'd split my windows into two or terminals, depending on what I am doing, so I don't see any benefit in increasing the limit."

4 comments

I used to think that 80 (or even 100) characters was too short, but I've changed my mind for two reasons:

1. Like you said, splitting windows. I now use a tiled window manager and also I use vim splits a LOT. If I can fit two windows side by side, good - if I can fit three, great!

2. I find that when my lines go over 80/100ish characters they are very hard to read anyway (too much eye travel between lines) and its usually (though admittedly not always) a sign that my code is too nested or otherwise could be simplified.

So now I happily use 80 character lines (When using Python I strictly follow the vim PEP8 checker, for example). I actually kinda prefer 80 to 100 now because I use slightly above average font sizes (I don't have the best eyesight) and this way I can still comfortably fit two editors side by side.

Touche. Multiple monitors and more screen real estate has been proven to increase productivity. It's an easy win.

If the lines come out too long too often, it may be a symptom of other problems.

  if ((browser.OS == 'win') && (browser.userAgent == 'IE')) {
is often better written as:

  isIE = (browser.userAgent == 'IE');
  isWindows = (browser.OS == 'win');
  if (isIE && isWindows) {
It's self-documenting and reads like natural english. It also has the good side-effect of making lines shorter, more terse.
Its more code, more variables. I sometimes do this with complex conditions, but for your example I find it counterproductive.
Well if this is deep deep down in a nested loop, then either you increase char or you wrap that code into multiple statements. It would be counterproductive if this is first or second level.

However, I think I missed one important point. If you are writing for Linux kernel, then 80 chars is definitely not enough since 8 spaces = 1 tab in kernel code. That is, if you have a deep branching, then after 2-3 levels 80 chars wouldn't be enough. But increasing to 100 is only going to help for an extra level.

So the important point missing is the char limit is often project coding style dependent.

I quite like 100 chars: it's perfect for two side-by-side windows on my screen. (i.e. two adjacent emacs buffers are about 101 chars wide each.)
I have 80, but then, I like my font size a few points bigger.
Please take the time to review and correct this sentence next time you copy-paste. This is a painful read.
Missing the occasional definite article out is something that seems to be fairly common with second language english speakers.

I decided some time ago that it was worthwhile forcing myself to adjust until it wasn't noticeably painful; there are too many people out there I want to communicate with who do it.

Agreed, people all over the world are going out of their way to post in English so we don't have to constantly go to a translator. If you really do not understand what is being said ask for clarification, otherwise just be appreciative.
Spot on. ESL. Grew up in the U.S as a kid. Took grammar as elective. But I can't perfect my writing (and am too tired to correct it now). Shoot an email to yeukhon@acm.org for a correction, if needed. Just fixed a bit, not sure if the revision is better or worse. Probably missing some "the". Can't edit it now :3