Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #67201

Re: posting code snippets

Path csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.031
X-Spam-Evidence '*H*': 0.94; '*S*': 0.00; 'programmer': 0.03; 'debugging': 0.07; 'subject:code': 0.07; 'coding,': 0.09; 'someone,': 0.09; 'subject:posting': 0.09; 'sure,': 0.09; '\xe2\x80\x94': 0.09; 'cc:addr:python-list': 0.11; 'itself.': 0.14; '9:15': 0.16; 'brilliant': 0.16; 'expert,': 0.16; 'finney': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'manageable': 0.16; 'objection': 0.16; 'smart,': 0.16; 'variants': 0.16; ':-)': 0.16; 'wrote:': 0.18; 'feb': 0.22; 'code,': 0.22; 'saying': 0.22; 'cc:addr:python.org': 0.22; 'him.': 0.24; 'helpful': 0.24; '(or': 0.24; 'cc:2**0': 0.24; "i've": 0.25; 'gets': 0.27; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message- id:@mail.gmail.com': 0.30; 'code': 0.31; 'posting': 0.31; 'complete,': 0.31; 'explained': 0.31; 'respects': 0.31; 'though.': 0.31; 'yourself.': 0.31; 'run': 0.32; 'another': 0.32; 'everyone': 0.33; 'fri,': 0.33; 'problem': 0.35; 'knows': 0.35; 'but': 0.35; 'received:google.com': 0.35; "he's": 0.36; 'should': 0.36; 'problems': 0.38; 'ben': 0.38; 'form,': 0.38; 'process,': 0.38; 'little': 0.38; 'expect': 0.39; 'explain': 0.39; 'does': 0.39; 'extremely': 0.39; 'itself': 0.39; 'sure': 0.39; 'even': 0.60; 'solve': 0.60; 'helps': 0.61; "you're": 0.61; "you'll": 0.62; 'complete': 0.62; "you've": 0.63; 'making': 0.63; '(that': 0.65; 'talking': 0.65; 'american': 0.66; 'believe': 0.68; 'partner': 0.70; 'intelligent': 0.74; 'subject.': 0.74; 'female': 0.84; 'her.': 0.84; 'idiot': 0.84; 'madness': 0.84; 'male': 0.84; 'short,': 0.84; 'touching': 0.84; 'bears': 0.91; 'to:none': 0.92; 'technique': 0.93
DKIM-Signature v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:cc :content-type:content-transfer-encoding; bh=Vm27gK9IVY1m0I2O3aeYs1mqAKrs2DVdzGrgPsP70lI=; b=LM9I97cZXjNBNBtBpC+mCGDgd+vrHATPVGof7yrmej+TikDg1RepiNfdhuxP4jMfIL apW6z6ae+IvXQZi/l0/9SwelU2h+8QiIxt5NaYL5HhhVD8CC27g3i4jwrN2UUXucC4DA xQFwRLC1e2FqdvBJhm5bJQUJ8SNM2xqnzz7wQNJHeatIQWSxuZRHxqbgGg/124XJitOI r01Y23u9ujJZrN1tuHOV4oW5pKostWjQhmldrECFCw2/Vs7Mgr+YB64vyewDkqcJk0GX Cc2Go6YcArE3UwM2vtRHLHNy8yPbFhkyyUdscF4uXuL4QyqRi5CK98H6RCtLp5vioaIz 4EaQ==
MIME-Version 1.0
X-Received by 10.66.129.133 with SMTP id nw5mr1345041pab.98.1393566088981; Thu, 27 Feb 2014 21:41:28 -0800 (PST)
In-Reply-To <85ppm8nqx7.fsf@benfinney.id.au>
References <e77aff42-6ec3-4749-9683-6ebb2a33ac1a@googlegroups.com> <85ppm8nqx7.fsf@benfinney.id.au>
Date Fri, 28 Feb 2014 16:41:28 +1100
Subject Re: posting code snippets
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
Content-Transfer-Encoding quoted-printable
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.7458.1393566098.18130.python-list@python.org> (permalink)
Lines 33
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1393566098 news.xs4all.nl 2845 [2001:888:2000:d::a6]:48715
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:67201

Show key headers only | View raw


On Fri, Feb 28, 2014 at 9:15 AM, Ben Finney <ben+python@benfinney.id.au> wrote:
> Since you'll be posting the code in-line, make sure it's short. Since
> it'll be short, make sure it's complete — we should need nothing else to
> run the code and expect to see the same behaviour you're seeing.
>
> Since you'll be making it short, complete, and still demonstrating the
> behaviour, you may even get the result that you understand the cause of
> the behaviour before posting it. Everyone wins! :-)

Which is the scientific basis of the astonishingly successful (that
is, it's astonishing to people who don't understand) debugging
technique of Rubber Ducking, or talking to your teddy bear, or other
variants of the subject. (I have a figurine from American McGee's
"Alice: Madness Returns" who is extremely helpful to me. She's pretty,
she's smart, and she's pretty smart.) By the time you've explained it
to someone, you've boiled the problem down into a manageable form, and
that often helps you solve the problem yourself.

The problem does have to believe that the rubber duck/teddy
bear/figurine is an expert, though. I've had my siblings or parents
come to me with problems and, without saying a word or touching the
computer or anything, I've solved them. The problem itself respects my
skill, and retracts its objection and solves itself. Why this works I
am not sure, but just remember to treat your teddy bear as an
intelligent partner in the debugging process, not as an idiot who just
gets in the way. He's a brilliant programmer from another dimension;
he knows all about coding, but not about your code, so you have to
explain its little oddities to him. (Or her. Female teddy bears are
just as good at debugging as male ones are.)

ChrisA

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

posting code snippets "Mark H. Harris" <harrismh777@gmail.com> - 2014-02-27 04:13 -0800
  Re: posting code snippets Chris Angelico <rosuav@gmail.com> - 2014-02-27 23:27 +1100
  Re: posting code snippets Jerry Hill <malaclypse2@gmail.com> - 2014-02-27 10:01 -0500
    Re: posting code snippets "Mark H. Harris" <harrismh777@gmail.com> - 2014-02-27 07:23 -0800
  Re: posting code snippets Tim Chase <python.list@tim.thechases.com> - 2014-02-27 09:56 -0600
  Re: posting code snippets Ben Finney <ben+python@benfinney.id.au> - 2014-02-28 09:15 +1100
    Re: posting code snippets "Mark H. Harris" <harrismh777@gmail.com> - 2014-02-27 15:13 -0800
      Re: posting code snippets Dave Angel <davea@davea.name> - 2014-02-28 00:05 -0500
  Re: posting code snippets Chris Angelico <rosuav@gmail.com> - 2014-02-28 16:41 +1100
    Re: posting code snippets Grant Edwards <invalid@invalid.invalid> - 2014-02-28 14:31 +0000
      Re: posting code snippets Gene Heskett <gheskett@wdtv.com> - 2014-03-01 16:55 -0500
      Re: posting code snippets Chris Angelico <rosuav@gmail.com> - 2014-03-02 09:16 +1100
        Re: posting code snippets Alister <alister.ware@ntlworld.com> - 2014-03-02 11:25 +0000
          Re: posting code snippets Gene Heskett <gheskett@wdtv.com> - 2014-03-02 07:20 -0500
      Re: posting code snippets Gregory Ewing <greg.ewing@canterbury.ac.nz> - 2014-03-02 17:20 +1300

csiph-web