Subject:      Re: TIP: How to post good questions
From: (Mark-Jason Dominus)
Date:         1998/06/28
Message-ID:   <6n69o5$7m6$>
Newsgroups:   comp.lang.perl.misc

In article <>, I R A Aggie <> wrote: >Repost, time..and yes, Olga, there *are* stupid questions.

Since I wrote that, I've found a few more. Right now the #1 on my shit list are the ones that invent some new syntax out of whole cloth, and then are puzzled when it doesn't work.

And gosh, it sure is hard not to be sarcastic here:

I think it must be something about the phrasing that gets me in the sarcasm gland.

It's so easy to fix these! The maxim here is

Cardinal Rule of Reporting Technical Problems

Never, never, never, never, never say `doesn't work'.


Proper Prophylaxis:

Just say ``I wanted X, but it does Y. How do I get X?''

By just including some tiny hint about X, you turn a stupid question into an intelligent one.

Here's an example from a couple of weeks ago:

>Why does this:
>    while ( ($k, $v) = each $this->{'stopped_content'}->{} ){
>        print       $v;
>       }
>not run?

Answer: ``Because it's a syntax error.''

Actually, the author here did do the right thing. The original text was:

>Why does this work:
>    foreach $key (@keys){
>        print $this->{'stopped_content'}->{$key};
>        }
>But this:
>    while ( ($k, $v) = each $this->{'stopped_content'}->{} ){
>        print       $v;
>       }
>does not run:

And then the answer becomes ``You should have used %{$this->{'stopped_content'}}''. See the difference here? One question can be answered; the other can't.

Here's another recent one:

>i get errors when i try:

Answer: ``Yes, that's what's supposed to happen.''

I am happy to report that the original author did actually include X:

>i get errors when i try:
>trying to delete all BOBs from my file

The answer is now clear: ``Use print unless /BOB/... blah blah or see perlfaq5 `How do I delete a line in a file' ''

I don't have many examples where the author really blew it, because I try not to answer those questions. I figure that even if I don't, someone else will come along and say ``Because you can't just make shit up and expect the computer to magically know what you mean, Retardo!''. And even if nobody does come along and say this, that's not a bad thing.

Well, here's one I was able to dig up from last month:

Xxxx Xxxxxx wrote:

> I've written a routine to get the file size of each file within a
> specific directory.
> however, it only works on particular files.  There doesn't seem to
> be a pattern either.  I'm using NT as a platform.
> Any suggestions ?

Dear Xxxx,

Perhaps your veeblefitzer is clogged.

Return to: Why Questions go Unanswered | Universe of Discourse main page | What's new page | Perl Paraphernalia