Understanding other people's code

Joel Goldstick joel.goldstick at gmail.com
Fri Jul 12 19:49:31 EDT 2013


On Fri, Jul 12, 2013 at 6:11 PM, Terry Reedy <tjreedy at 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
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20130712/8fcce0f0/attachment.html>


More information about the Python-list mailing list