Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #67201
| References | <e77aff42-6ec3-4749-9683-6ebb2a33ac1a@googlegroups.com> <85ppm8nqx7.fsf@benfinney.id.au> |
|---|---|
| Date | 2014-02-28 16:41 +1100 |
| Subject | Re: posting code snippets |
| From | Chris Angelico <rosuav@gmail.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.7458.1393566098.18130.python-list@python.org> (permalink) |
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 | Next — Previous in thread | Next in thread | Find similar | Unroll 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