Beefy Boxes and Bandwidth Generously Provided by pair Networks
No such thing as a small change
 
PerlMonks  

comment on

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

I've never used the POSIX char classes, but my suggestion would be...

1) Somewhere at the beginning of the write up state something like "For regular expressions I will be using [:alpha:] to match alpha-numerical strings, which is generally matched via [a-zA-Z0-9], so on and so forth for each of the char classes

2) Within the first few snippets give a few quick in regards to TIMTOWTDI with references to camels, llamas, and panthers (o my!), but then state that henceforth your code will always be in this form to maintain consistency across the text.

Also I would show the reasoning behind using multiple variables, even though you don't *have* to, so they at least have a feeling of the thought process behind creating the code. I've heard I don't know how many times.. "Oh yeah, well, I can read it, but writing it is still way too beyond me."... Generally if they can follow the why it was used, the how/when will come as a natural extension

P.s: sorry about nesting the first comment in code blocks, but I'm not familiar with HTML, don't really want to be, and I couldn't figure out how to get a literal bracket, which I will now figure out how to do.. :P

/* And the Creator, against his better judgement, wrote man.c */


In reply to Re: "Correct" program style questions by l2kashe
in thread "Correct" program style questions by Ovid

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 studying the Monastery: (9)
As of 2024-03-28 08:57 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found