Update: 2009-02-15 ca 1730 GMT: THIS VERSION IS NO LONGER CURRENT.
FOR A CURRENT VERSION The current version -- improved by the many folk who've replied or /msged about this -- has been posted to How do I post a question effectively?. Since we anticipate additional improvements, please check that and /msg SDC. Thanks
How to ask a question effectively
This is a little long. But, please, at least scan it. It's our best effort to help you get help. These are not "rules for the sake of rules" but, rather, guidelines to help you help us to help you.
So here we go (and eventually, we'll even get around to "Where to ask?"):
First and foremost, think through your question.
- Can you explain it clearly to yourself?
- Can you explain it to others?
- What example data would help them understand the issue?
- What's not happening that you think should happen, or happening that you think should not (or don't understand)?
Write it down -- preferably in your editor on your machine.
Look away for a moment; perhaps mull the question over some more.
Edit for clarity and precision (leet-speek iz rong on both cnts!). Spelling and grammar count (but we try hard to understand if English is not your native tongue).
Repeat as necessary. It's often said and often true that explaining a problem to a rubber ducky or to a teddy bear will show you a solution.
Show us that you've made an effort.
- Show your code (at least the problematic snippet)
- Explain in detail what you get (include sample output, error messages and warnings, for example).
- Tell us how your output means your script isn't working.
If you do, it's likely someone will provide pointers in the right direction.
Now you're getting close to a good question.
But before you post it, take another step. Include (inside <code>...</code> or <c>...</c> tags) a minimal, compilable script that demonstrates your problem and sample data (input).
Use strict and warnings. If you don't, and your sample code throws errors or warnings, NodeReaper (or some solicitous Monasterian) will throw that in your face.
Failure to use strict and warnings is a red flag; it tells us you didn't use the available tools ("aka, make an effort").
On the other hand, using these pragmas may show you how to solve your problem before you post. For example, they'll catch variables where you make a typo between assignment and use. Failure to use them is like ice-climbing without a safety line.
Again, use code tags without fail or the Monks' outrage may lead them to conclude, prayerfully, of course, that you need penance. In fact, failure to use at least minimal markup will almost certainly persuade some of the Reverend Brothers and Sisters to point you to the sackcloth and ashes in the third sub-dungeon. ( See Markup in the Monastery for quick reference or Perl Monks Approved HTML tags for an exhaustive list of what's allowed.) And be sure to close your tags; the special dialect of html used here is unforgiving about failure to close some tags.
Preview. See if what the preview screen shows looks like what you intended. And if it doesn't, fix your markup, and preview again. ONLY when your note "looks right" should the "Create" button tempt you.
Select an informative title. "Need help ASAP" doesn't cut it. Neither does the name of any Perl function.
For example, if you're having problems dereferencing an array in a hash, SOPW won't accept a one word title like "%hashref"; %hashref problems" isn't fully descriptive; but "Why doesn't this deref the @arrays in my %hasref?" is probably OK.
OK, but what was that 'or not' business about?
Ah, I'm glad you asked.
Laziness is one of the virtues admired by Perl programmers -- in themselves or when demonstrated with competence and verve! It is not admired when demonstrated by a Seeker of Perl Wisdom who is too lazy to adhere to the hints above; who posts ambiguous questions; who fails to read the docs (see perldoc perldoc for an overview of the knowledge that's at your fingertips; or who inconveniences thousands of electrons to ask redundant questions.
But I never asked that question before!
No, but surely you don't think you're the first to come to the mountaintop seeking that wisdom, do you?
Super_Search is your friend. Use it! Or Google PM. Big G is quite good at finding nodes here that will help you, if you ask with reasonable search terms.
But I'm new at this; I don't know what search terms to use!
Ah, that plaint is sometimes justified, but have you RTFMed How to RTFM? Did you look at the plethora of information available via perldoc or at perldoc.perl.org? The Tutorials may also speed your search for enlightenment.
And a few scattershot points:
- Log in before you post unless you want it to be anonymous (and remember that that anonymonk can't update a node nor get notifications of replies)
- Don't ever wipe the original content of any node you've written, even if you've solved your problem; you're clarifying your issue; or you realize you just made a "D'oh!" Mark the changed/new content with the word "Update." Don't delete! Doing so is likely to make replies you've received unintelligble to future readers. Use <strike> ... </strike> if you must.
- Be patient. And don't tout your node in the CB.
- Don't post real email addresses, usernames, or passwords
- Own up to homework. (We may help with homework when you show some effort, but you're not learning anything and we're not helping if we do it for you.)
- Understand that the Monastery is NOT a code-machine. Don't ask for a handrolled script to suit your needs. That costs $$$$.
- RTFM -- the various FAQs, guidance and tutorials on our standards, as well as those on Perl.
More to come... Suggestions to ww.
But all I wanted to know is "where to post my question?"
There's a form at the bottom of the Seekers of Perl Wisdom page (but first, please go back to the top and actually read the suggestions).
Wow! How can I thank you enough?
Adhere to these suggestions... and pass them on to others.
What would you add/remove/change? ( Given the date of posting, note that valentines and brickbats are equally welcome. :-) )