Beefy Boxes and Bandwidth Generously Provided by pair Networks
good chemistry is complicated,
and a little bit messy -LW
 
PerlMonks  

Re: On what column do you wrap your code?

by grinder (Bishop)
on Feb 08, 2006 at 18:12 UTC ( #528885=note: print w/ replies, xml ) Need Help??


in reply to On what column do you wrap your code?

Interesting question. I pulled up some code and run it through (don't shoot me)

  awk '{print length($0)}' * | sort | uniq -c | sort -nk2

... which produced the following output:

504 1 112 2 12 3

(504 blank lines, 112 lines with a single char (probable a closing brace) and so on). I turned that into a scatter plot and I see that I have a fair spread of line lengths all the way out to about 75. From there the number of lines with longer lengths drops off a cliff, but that there is a clearly visible tail of line lengths all the way out to 120 or so.

Which does tend to correspond to the way I code. I like breaking things up, such as named parameters on separate lines, but as I'm either in an xterm or a Putty session, I just make the window as big as it needs to be, and if a certain line of code just looks nicer at 120 characters then I'll let it be.

• another intruder with the mooring in the heart of the Perl


Comment on Re: On what column do you wrap your code?
Select or Download Code

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://528885]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others browsing the Monastery: (6)
As of 2014-07-29 00:42 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My favorite superfluous repetitious redundant duplicative phrase is:









    Results (211 votes), past polls