more useful options | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
> Moreover, I'm a huge fan of Skimmable code
unfortunately is this link only showing the talk abstract, but no further details. From what you describe, this is very close to the recommendations of Damian's PBP, especially: > I often use "paragraphs" inside subroutines IIRC, this is called "chunks" there, though I tend to start them with one full line comment You didn't mention it explicitly, but avoiding too many nesting levels is one of general best practices. They are a clear indication for more smaller subroutines. for instance a contrived example following the input/process/output scheme
I like to read such a loop inside a full page ( at most 100 lines), even prefer to have a sub inside such a window. (I hate guessing in which function/loop I'm currently being, {update: I want to see the declared private variables too}) So if the chunks consist of more than a handful of lines, I try to refactor them into a bunch of dedicated subs. With meaningful "self-documenting" naming I can even avoid the then redundant #--- documentation line. Hope I'm grasping your idea, and would love to hear where Schwern's recommendations are differing from Damian's.
Cheers Rolf
UPDATEfor very strange reasons I'm getting my own code displayed with doubled line distance. I hope it's only me, logging out shows them correctly.
updateChanged the css settings to line-height: 10px , no idea when this changed. In reply to Re^2: Section Dividers - What are your thoughts
by LanX
|
|