in reply to Re: To <=80 char code line length or not
in thread To <=80 char code line length or not

I think it's a lucky coincidence that the console width is near the optimal width for eye movement... I'm pretty sure this has already been investigated by scientists,

I bet -- in fact I'll pretty much guarantee -- that you cannot cite one authoritative reference for that piece of pseudo-science. (You'll probably claim that you're "too busy", or it's "too hard to do from your phone", like normal.)_

It doesn't even stand up to the most casual of thought processes.


With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
  • Comment on Re^2: To <=80 char code line length or not

Replies are listed 'Best First'.
Re^3: To <=80 char code line length or not
by Your Mother (Archbishop) on Jun 08, 2018 at 12:38 UTC

    Surprisingly spurious rebuttal. I was a typographer before I was a programmer and agree with Line length. I checked about a dozen other resources and found *only* agreement with, or within the bounds of, 45 to 75 characters as optimal reading length. Add in the need for extra spacing and punctuation in programming, you get close enough to 80.

      I was a typographer

      And I was a fireman. What of it? Because that occupation is equally (ir)relevant to this discussion.

      Source code is not prose, or poetry or a novel. No one needs to (nor should!) speed-read source code. Even with prose, a 45/50 character wide column is painful to read. (Tell me you find it comfortable to read this.)

      Source code is an entirely different kettle of fish: tokens + structure. And formating source code according to typographical (paper) rules -- which have been comprehensively demonstrated to make little sense when applied to a VDU (by Northern Telecom amongst others as far back as the early to mid-80s) -- is as inane as white on black themes because there seen as retro and thus 'cool'.

      For the most part, code only gets wide when indented and the part of the lines you read are only 50-60 chars anyway; but scrunching those 50-60 characters across three 20 character lines, because the current indent level takes you half way across to the arbitrary limit makes the code less readable, not more so.

      And no, moving the nested levels out to a separate, called-once sub does not always make sense, especially if it obscures the structure of the algorithm -- which such artificial re-structuring invariably does.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
      In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
Re^3: To <=80 char code line length or not
by LanX (Saint) on Jun 08, 2018 at 13:05 UTC
    > that you cannot cite one authoritative reference for that piece of pseudo-science.

    Well please define "authoritative reference", psychologists will normally argue from study to study about methodology and sample. (for instance I'm dyslexic and color blind, did they cover my group in their sample?)

    Anyway ...

    I was referring from memory (I earned my first money hacking for a DTP product) about what I read about typographical Line_length which is at least normatively set to between 45 and 75 characters.

    Normative means we got used to it, like we got used to a decimal system, which is not necessarily the objective best of all parallel universes.

    Additionally there are subjective preferences:

    60% of respondents indicated a preference for either the shortest (35 CPL) or longest (95 CPL) lines used in the study. At the same time, 100% of respondents selected either one of these quantities as being the least desirable *

    Which seems to indicate that around middle you'll have the least discussions with annoyed users.

    Anyway all these studies deal - like I said - with prose in paragraphs, not intended code, and I said I'm not dogmatic here.

    Code is actually two column text, because comments are best aligned

    Regarding your question: So the above WP article lists some studies, do I need to copy&paste them and are they "authoritative" enough? ²

    Question: what is the blind text in different sizes supposed to tell us???

    Cheers Rolf
    (addicted to the Perl Programming Language :)
    Wikisyntax for the Monastery

    *) Hmm ... wondering what dyslexic guys prefer...

    ²) NB: the German WP article highlights the importance of line spacing while the English strangely doesn't seem to mention it.

      Re 2, “10/12” is a best practices idiom/shorthand among English typographers.

        yeah, but it's paradox if coding style guides talk about CPL but leave line space to the individual editor setting.

        It's a combination of both which counts.

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery

      In short: Source code is not prose; and typographical rules applied to prose on paper make no sense on screens. (Tell me you find this readable.)

      Question: what is the blind text in different sizes supposed to tell us???

      It simply demonstrates that blindly saying "the console width is near the optimal width for eye movement" makes no sense, as it doesn't take font size, proportionality, kerning, or the particular users optimal eye-to-screen distance into account.


      With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
      Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
      "Science is about questioning the status quo. Questioning authority". The enemy of (IT) success is complexity.
      In the absence of evidence, opinion is indistinguishable from prejudice. Suck that fhit
        > In short: Source code is not prose;

        Well, I said this already ...

        (many times!)

        Cheers Rolf
        (addicted to the Perl Programming Language :)
        Wikisyntax for the Monastery