Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

comment on

( [id://3333]=superdoc: print w/replies, xml ) Need Help??

I don't very often read any section other than newest nodes. When I did load one today I remembered why. Those really long code lines that make every other post too wide are really annoying.

I have to assume that I'm not using the site as it was envisioned by it's creators. Since I don't like the monastery gates I rarely see quests etc. I'm fairly confident that I'm not the only person this is annoying. I'm also fairly sure I'm not the only person avoiding the monastery gates for the same reason.

It has been pointed out at various times (while discussing this subject) that it is not easy to create a parser that can break code lines intelligently.

Suggestion: I think it would make the site more readable if users were given the option to force a line break at a certain number of characters. This would be similar to the facility offered by emacs. When a line is too long to display on the terminal it is terminated with a single character and continued on the next line. Mutt uses something similar except that it puts a small highlighted + at the beginning of continuation lines. This would only affect users who requested it be turned on and the line length should be independently configurable by each person.

what I envisage is something like this.

foreach (@example) {
$unfeasibly_long_variable_name_I_should_know_better_really += $why_
+do_people_not_learn_to_break_lines / $_;
}

Where the + is the place that the line was forcibly split. This keeps the text understandable and the other parts of the post will be filled as usual. I only see this being used inside <code> tags

Nuance


In reply to Suggestion for dealing with unfeasibly long code lines by nuance

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Are you posting in the right place? Check out Where do I post X? to know for sure.
  • Posts may use any of the Perl Monks Approved HTML tags. Currently these include the following:
    <code> <a> <b> <big> <blockquote> <br /> <dd> <dl> <dt> <em> <font> <h1> <h2> <h3> <h4> <h5> <h6> <hr /> <i> <li> <nbsp> <ol> <p> <small> <strike> <strong> <sub> <sup> <table> <td> <th> <tr> <tt> <u> <ul>
  • Snippets of code should be wrapped in <code> tags not <pre> tags. In fact, <pre> tags should generally be avoided. If they must be used, extreme care should be taken to ensure that their contents do not have long lines (<70 chars), in order to prevent horizontal scrolling (and possible janitor intervention).
  • Want more info? How to link or How to display code and escape characters are good places to start.
Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others perusing the Monastery: (7)
As of 2024-04-23 11:47 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found