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":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.