in reply to Avoiding code tag considerations

Why not present the (new*) user with a mini template?

*Could be turned off by those that dislike it.

<p>Your question goes here <code> Any code goes here < /code>

Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
"Science is about questioning the status quo. Questioning authority".
In the absence of evidence, opinion is indistinguishable from prejudice.
"Too many [] have been sedated by an oppressive environment of political correctness and risk aversion."

Replies are listed 'Best First'.
Re^2: Avoiding code tag considerations
by xdg (Monsignor) on Feb 02, 2007 at 22:57 UTC

    Great idea. Just have it be the default User Template in the Signature Settings. Then they can change it whenever they want. Just add a link to that page of user settings in the bullet points below the textbox.

    Personally, I have a template already with some standard stuff like blockquote, para, code, list so I don't have to retype it. New users might like this rather than find it annoying.

    -xdg

    Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

      I don't think you can easily hijack the signature for this because of the div wrappers. It's also not an obvious place for the code to live.

      --
      In Bob We Trust, All Others Bring Data.

        Not the signature itself -- the part that says "Your Node Template". It just happens to live on the Signature Settings page.

        -xdg

        Code written by xdg and posted on PerlMonks is public domain. It is provided as is with no warranties, express or implied, of any kind. Posted code may not have been tested. Use of posted code is at your own risk.

Re^2: Avoiding code tag considerations
by bobf (Monsignor) on Feb 03, 2007 at 04:12 UTC

    I like the sentiment of the idea, but I wouldn't be surprised if we ended up with nearly as many posts like the one below (which subsequently get considered to move the code into the template*). xdg's suggestion to make recommended tags more prominent could help but certainly wouldn't solve the problem. I suspect diligence, patience, and gentle reminders to new users will continue to be required.

    *Update: Then again, it might be possible to automatically remove empty templated code blocks after hitting the Preview button, since the text (if left unmodified) would be easy to identify. That would prevent considerations for superfluous template but would not solve the original problem of missing code tags.

    Example post:

    I want to use a regex to find all of the 2 digit numbers in a string like 'abc1cdef23gh456ijl78mn' but I can't get it to work. All of the digits are returned one at a time, but I only want the numbers that contain 2 digits (like 23 and 78). Can you help me? Here is my code: my $string = 'abc1cdef23gh456ijl78mn'; while( $string =~ m/(\d)/g ) { print "found $1\n"; }

    Any code goes here

Re^2: Avoiding code tag considerations
by belg4mit (Prior) on Feb 03, 2007 at 21:56 UTC
    As for customizability, that's why I suggested "on preview", which is something that people can eventually choose to bypass (not that I advocate it).

    --
    In Bob We Trust, All Others Bring Data.