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


Groups > comp.lang.python > #50565

Re: Understanding other people's code

References <66c25416-eaa5-4ac1-a71d-2b2948dec2fb@googlegroups.com> <krpuv5$8cc$2@ger.gmane.org>
Date 2013-07-12 19:49 -0400
Subject Re: Understanding other people's code
From Joel Goldstick <joel.goldstick@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.4668.1373672979.3114.python-list@python.org> (permalink)

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Fri, Jul 12, 2013 at 6:11 PM, Terry Reedy <tjreedy@udel.edu> wrote:

> On 7/12/2013 10:22 AM, L O'Shea wrote:
>
>> Hi all, I've been asked to take over a project from someone else and
>> to extend the functionality of this. The project is written in Python
>> which I haven't had any real experience with (although I do really
>> like it) so I've spent the last week or two settling in, trying to
>> get my head around Python and the way in which this code works.
>>
>
> If the functions are not documented in prose, is there a test suite that
> you can dive into?
>
>
> --
> Terry Jan Reedy
>
> --
> http://mail.python.org/**mailman/listinfo/python-list<http://mail.python.org/mailman/listinfo/python-list>
>

I'm very appreciative of pydoc. -- even for code I write myself!.  Learn
about it and redirect its output to files, so you can print out all of your
modules.  (well -- my suggestion!).  For the functions and classes that are
lacking docstrings, review them and see if you can figure out what they
do.  Add docstrings..

Not to disrespect this original coder in the slightest, but my work
experience has been involved in reading and fixing or updating lots of
other peoples code -- most less documented than would be nice.  So my def
of good code is code with good descriptive docstrings -- at the top level
even before documenting the details.  Its nice to know where the
developer's head was at when the system was put together.

-- 
Joel Goldstick
http://joelgoldstick.com

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


Thread

Understanding other people's code "L O'Shea" <lo0446@my.bristol.ac.uk> - 2013-07-12 07:22 -0700
  Re: Understanding other people's code Chris Angelico <rosuav@gmail.com> - 2013-07-13 00:46 +1000
  Re: Understanding other people's code Peter Otten <__peter__@web.de> - 2013-07-12 17:21 +0200
  Re: Understanding other people's code "Eric S. Johansson" <esj@harvee.org> - 2013-07-12 12:04 -0400
  Re: Understanding other people's code Terry Reedy <tjreedy@udel.edu> - 2013-07-12 18:11 -0400
  Re: Understanding other people's code Joel Goldstick <joel.goldstick@gmail.com> - 2013-07-12 19:49 -0400
  Re: Understanding other people's code CM <cmpython@gmail.com> - 2013-07-13 23:58 -0700
  Re: Understanding other people's code Azureaus <lo0446@my.bristol.ac.uk> - 2013-07-15 03:02 -0700
    Re: Understanding other people's code CM <cmpython@gmail.com> - 2013-07-15 12:13 -0700
    Re: Understanding other people's code albert@spenarnc.xs4all.nl (Albert van der Horst) - 2013-07-27 13:13 +0000
      Re: Understanding other people's code Chris Angelico <rosuav@gmail.com> - 2013-07-27 14:41 +0100
  Re: Understanding other people's code asimjalis@gmail.com - 2013-07-15 19:10 -0700
  Re: Understanding other people's code David M Chess <chess@us.ibm.com> - 2013-07-16 14:38 -0400
  Re: Understanding other people's code David Hutto <dwightdhutto@gmail.com> - 2013-07-16 20:05 -0400
  Re: Understanding other people's code David Hutto <dwightdhutto@gmail.com> - 2013-07-19 22:57 -0400
  Re: Understanding other people's code Azureaus <lo0446@my.bristol.ac.uk> - 2013-07-25 09:26 -0700

csiph-web