Beefy Boxes and Bandwidth Generously Provided by pair Networks
Think about Loose Coupling
 
PerlMonks  

Before You Post ...

by Ovid (Cardinal)
on Jun 29, 2000 at 21:33 UTC ( #20443=perlmeditation: print w/ replies, xml ) Need Help??

Tradução em Português

Oftimes, when Monks seek Wisdom, they are admonished by fellow Monks to make sure they have their FAQs straight, or worse, told to RTFM. However, new Monks are often intimidated or confused by the information available and are hoping for a clearer explanation. Also, the newest of the new often don't know where to find documentation.

I am perfectly willing to grant absolution to a fellow Monk for such venial sins. However, there is one sin that verges on mortal: failure to reduce your problem to a minimal test case.

Several examples are this post by vnpandey, this post by the ubiquitous Anonymous Monk, and also this node which isn't even Perl, but is the output from make install! These posts contain in excess of 250 lines of code.

Now contrast those nodes with kudra's recent post. kudra took the time to to reduce the code to a minimal test case so that we could focus on the problem and not be distracted. All monks should consider this. There are several benefits to this.

  1. You don't annoy fellow monks (that link is a joke. I personally like the kid).
  2. You don't find yourself in the Hall of Shame.
  3. Monks are more likely to offer assistance.
  4. And most importantly: you can focus on the problem.
That last point is critical. You can even forget the other three. More than once, in trying to isolate a problem, I have attempted to strip it to a minimal test case. Often, by removing clutter, the problem has stood out like a beacon. Other times, by stripping "irrelevant" code, the problem has gone away and I found the "irrelevant" code to be the problem.

So please, let's try to be more considerate and reduce our code as much as is feasible before we post. You'll learn more about your code, about coding in general, and are more likely to have relevant answers to your questions.

Cheers!
Ovid

Comment on Before You Post ...
RE: Before You Post ...
by Adam (Vicar) on Jun 29, 2000 at 21:41 UTC
    This is a very good point Ovid. Many times I find that in trying to phrase my questions clearly and concisely the solution becomes self evident.
RE: Before You Post ...
by JanneVee (Friar) on Jun 30, 2000 at 13:49 UTC
    How about rephrasing these points a little and putting them in Guide to the Monastery ??

    And some words about the 'community'? I don't find it unfriendly in anyway. It is open for mature discussions...

    some ideas.... JanneVee

      That's an interesting thought. Perhaps a Monk "Sins" section could be created that could allow us to post some basic etiquette rules? Personally, I can't post anything to the Perl Monks guide to the Monastery and it doesn't look like it's a possibility in the near future (It appears to be an uneditable page).
        Well form and agree on the etiquette rules first... After that vote on them so a majority of the commynity can accept them? Before we post them to the person who handles the guide...
RE: Before You Post ...
by redmist (Deacon) on Jun 30, 2000 at 13:51 UTC
    It's just like squashing the bugs in your code yourself...you try a methodical approach. I analyze buggy code of mine one line at a time, rephrase certain lines, etc. until I isolate the problem. How can people who didn't even *write* the code single out the problem(s) when it is 90% irrelevant?

    redmist
RE: Before You Post ...
by mrmick (Curate) on Jun 30, 2000 at 22:29 UTC
    Wonderful! I'm not quite up to the point where I may vote, but if I were - this would definitely get one from me.
    • Clear and to-the-point without offending anyone.
RE: Before You Post ...
by ivory (Pilgrim) on Jun 30, 2000 at 23:22 UTC
    I understand what you're saying, but are you possibly forgetting what it can be like to be a newbie? I personally posted a request for help on a problem I needed to solve, and I got negative votes. The thing is, I said very clearly in the post that I needed help and didn't know how to write the script I needed to write. I think that it's easy to forget what it's like to not understand a problem even enough to simplify it. I mean, if I needed to build a house, I might post something saying. "help! I need to build a house and don't know how. Any help would be greatly appreciated!". The thing is, I might really not know what the first step should be... Perhaps we could have a "newbies" section where people could post those "stupid" or "I have no idea what's going on!" questions. That way you'd have to actually go to that page to see them....but people should get extra XPs for replying to those posts.... --Ivory
      Ivory, I appreciate your response, but I feel either you have missed the point of my node, or I have failed to explain it adequately. I assume the latter is the case.

      I am not "forgetting what it can be like to be a newbie." Every time I read a post by chromatic, merlyn, or too many others to mention here, I know that I am still a newbie when it comes to Perl. On many occasions an experienced Monk has offered me guidance and advice. In turn, I try to offer guidance and advice to monks who are less experienced than I (I heard a rumor that one or two Monks qualify).

      The posts that I mentioned as examples of the most egregious offenders were not, in my opinion, newcomers to the language. The first two posts (see note below) were in excess of 500 lines of code and the third had a make install listing comprised of over 250 lines of output! With the possible exception of the make install poster, these were not newcomers. Newcomers, in my opinion, do not write 500 line scripts, much less post them.

      My concern is with those monks who don't seem to understand the problem with posting excessive amounts of code to ask a question about a why their four line while loop isn't working. Having to scroll through several pages to get to the point (sort of like my reply, huh?) can be very annoying. I suppose if we didn't care to try, we would simply ignore those posts. Regarding my original examples, with the exception of the make install post (which wasn't Perl), Monks took the time to go through 500 lines of code for a complete stranger in an attempt to help. I am merely suggesting some basic posting etiquette.

      On a side note, I would like to point out that if you scroll through the responses, I actually answered the second post with reasonably detailed information on how the poster could use the debugger to resolve the poster's problem. While this thread makes it clear that I would prefer posters not to do that, I'm still going to help if I can.

      Please, go to my home node. I have quite a number of posts and many, if not most, are my attempting to help others. Most of these others, due to my limitations with Perl, are newcomers to the language. I will never forget what it's like to be a newcomer and in turn be the object of scorn or derision of those who have forgotten. That's somewhat of a burning issue with me (for personal reasons that I won't go into here). I am truly sorry if my post came across as negative to newcomers to Perl. I welcome them. A language without newcomers is a dead language.

      Note: The first two examples were both by vnpandey. Had I realized that he was the author of the second post, I would have chosen another example so as not to single anyone out.

RE: Before You Post ...
by vnpandey (Scribe) on Jul 06, 2000 at 14:01 UTC
    Dear Ovid, I am too sorry for the trouble I did,by posting a unclear question but to be true it happened by mistake as I copied a different file and realised it after clicking the submit button!! & I didnot knew how to undo it....I am extremely sorry for all this also I'll be very careful regarding posting the questions in the future...One more problem was earlier that after you post a question it immedieately doesn't appears on the seekers of perl wisdom sites but comes in the newest nodes site...which I came to know later so it may be also leading to some people sending their querries again & again under the illusion that there questions have still not reached the monks....I know one could call them silly but anyway it leads to themselves being troubled & also to the monks maintaining the site work unnecessarily!!!....it will be nice if you can please announce the same... To share my expierience I got reply to a very peculiar question's answer from this site!!! which I was trying to debug from 3-4 days!!! So I am having a lot of regards for the monks!!(not only because of this reason..) and I'll try my level best not to do similar thing not for reason 3... but for 1,2,and 4 certainly!! Thanks!!! V.N.Pandey
      vnpandey: don't worry about it. It's an easy mistake for a newcomer to make and I don't think most Monks stress about it (at least I hope they don't!).

      Cheers,
      Ovid

RE: Before You Post ...
by TStanley (Canon) on Jul 11, 2000 at 22:12 UTC
    I read this post before I actually posted a question here,
    and I definitely consider it to make a whole lot of sense.

    I also took to heart the objective of actually searching
    the FAQ's, Tutorials, and other resources, before I
    asked for the Wisdom of the Perl Monks. Thank you Ovid,
    for clearing up the question as to how to make a proper
    (IMHO) request for information.

    TStanley
Re: Before You Post ...
by eibwen (Friar) on Apr 09, 2005 at 20:35 UTC
    Eric S. Raymond's "How To Ask Questions The Smart Way" is a valuable resource for posters. Of particular interest:
    • Explictly state the question
      (Make sure the question you post is the one you want answered)
       
    • State the chronological order when applicable
      (If the problem occured after a sequence state that sequence)
       
    • If you don't understand a reply, do some research, then ask
      (If nothing else you'll learn something and may even answer your own question)
       
    • Follow up with a brief note on the solution
      (Be verbose enough to help others)
       

    Lastly, I'd like to reiterate the importance of reducing a problem code to the "minimal test case." It has been my experience that even the most elusive errors become significantly more apparent once the unrelated code is removed. Moreover, questions pertaining to the "minimal test case" are often significantly more apt than those formulated while looking at the code as a whole.

Re: Before You Post ...
by crusty_collins (Scribe) on Jun 07, 2005 at 20:09 UTC
    I could not agree more. Several times I have figured out my problem by getting ready to post it and finally seeing the stupid mistake! Thanks for the reminder.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: perlmeditation [id://20443]
Approved by root
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others meditating upon the Monastery: (8)
As of 2014-12-28 03:38 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    Is guessing a good strategy for surviving in the IT business?





    Results (178 votes), past polls