Why does this not work?

Peter Hansen peter at engcorp.com
Sun Mar 13 11:04:08 EST 2005


D H wrote:
> Ask on the wxpython or python-tutor list instead of this one.  You'll 
> get better help than there as you've already found out.

Not likely.  IMHO he got the best help he could possibly
have gotten, but clearly that's debatable. :-)

> The only thing I'd agree with is what Michael Hoffman said about posting 
> a snippet of your code instead of a zip file.

This is also debatable.  I'd strongly recommend against
ever referencing a zip file in some other location when
posting requests for help, unless it's a very complex
situation and you have laid the groundwork for people
to be bothered going to all that effort.  Even then,
there's at least one serious disadvantage... see below.

The benefits of posting a snippet are many, provided
we define an appropriate snippet to be "the smallest
piece of code that you can produce which reproduces
the problem and has the fewest external dependencies"
or some such:

1. The act of creating the above almost always leads
to the discovery of the problem and a solution, meaning
you don't even get to the posting stage.

2. Posting a snippet vastly increases the likelihood
someone (often many) will help, versus the chances when
you post a link to code elsewhere (which are near zero).

3. Posting a snippet means that the code is archived
along with the request, allowing people who follow
along later, perhaps with the same question, to reliably
find the code in question, and the fixed code in the
followups.  Posting links to elsewhere makes it very
likely the code in question will have vanished, wasting
lots of time for those who come later.

4. It's just plain polite, good netiquette.

Caveat: posting monster programs is never a good idea,
and a good rule of thumb is probably that any snippet
posted (for any reason) in a mailing list or newsgroup
like this should be no more than about fifty lines
long.  That should be enough to reproduce just about
any problem, if you aren't lazy...

-Peter



More information about the Python-list mailing list