Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl-Sensitive Sunglasses

Re: 78/80 chars perl line still a meaningful rule

by ww (Archbishop)
on Oct 19, 2012 at 03:54 UTC ( #999858=note: print w/replies, xml ) Need Help??

in reply to 78/80 chars perl line still a meaningful rule

Count the chars in a typical line in a newspaper column. It will vary a bit with the format of the paper, but generally won't exceed 40-50.

There may be a (retro-justification) reason for that: a good deal of research on comprehensibility identifies something in the 40-60 range as optimal (given the head and eye movement issues cited by talexb) and that isn't far off from AM's offering at Re^2: 78/80 chars perl line still a meaningful rule.

But code is NOT prose and that fact may be an argument for even shorter lines in code (allowing for occasional longer ones if those don't split reasonably. Generally, tho, I find that a 2 or 3 char indent on an extended line (ie, one with a CR that isn't really supposed to end the line).

  • Comment on Re: 78/80 chars perl line still a meaningful rule

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://999858]
[marto]: nah, it's not off screen
[Corion]: Somehow I'm happy that my Javascript mostly targets Firefox nowadays :)
[Corion]: But my conundrum currently is how to do lightweight SQL for maintaining my user database, instead of home-cooking too much of an ORM ;)
[Corion]: But maybe Just Enough of an ORM might be the ticket, that is, just locked hashes read from the DB :)

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (7)
As of 2018-03-21 12:05 GMT
Find Nodes?
    Voting Booth?
    When I think of a mole I think of:

    Results (267 votes). Check out past polls.