Re: debugging makes a person a better programmer

From: Mike C. Fletcher (mcfletch_at_rogers.com)
Date: 01/09/04


Date: Fri, 09 Jan 2004 08:50:57 -0500
To: python-list@python.org

broebel wrote:

>I'm just wondering,
>
>people tell me that helping to debug someone elses program is a really good
>way to learn to understand the language it's programmed in.
>
>
One of the reasons that "debugging as learning" is often useful is that
many modern systems are large, complex collections of loosely coupled
components. Zope, for instance, is almost impossible to grok fully
without spelunking through with a debugger to see what actually happens
with the security machinery, the traversal machinery, etceteras. The
debugging gives you a guide to "where to start reading the code". Keep
in mind that in these situations, you're not actually looking for bugs,
you're just using the debugging tool to figure out what's going on under
the covers.

As to the actual suggestion of trying to fix bugs to learn. It can be a
good way, but it really does need a mentor to make it an efficient
operation. If you want to pursue it, look at the bug-tracker for the
project in which you're interested (this is particularly easy with
SourceForge-hosted projects), and choose something that seems small.
Email the developers of the project to let them know you'll be playing
with the bug, (let them know that you're a new-ish developer).

Depending on the maturity and size of the projects, you may even find
"how to get started hacking on X" documentation hanging around.
Otherwise you'll often need to talk with the developers to make any real
headway. The developers of the project may even have a suggestion for
what bug would be an appropriate first step. If you're lucky, the
developers will have failure-case code available (i.e. unit-tests) so
that you can know when you've succeeded :) .

>My question is: from wich point of can someone start to try to help a
>programmer by debugging or testing a program.
>
>If indeed you already need a profound knowledge of the language than how can
>you learn something about it? except for the fact that you see other
>possibilities of way to programm.
>
>
One of the ways that people often suggest is to read (and then play
with) small samples of really well-written code. The Python Cookbook
(both the dead-trees and the online versions) is designed for this kind
of learning. This code will tend to have fairly low defect rates, but
it is, in essence, a collection of the "verse literature" (poetry) of
the language (where projects such as Zope or Twisted is the "prose
literature", i.e. long-form/novels).

Personally, I'd suggest studying short-form examples of the art first
(i.e. poetry), they tend to be easier to keep entirely within the mind,
and will tend toward more varied expressions of what can be done. Once
you've been exposed to the possibilities, try spelunking through the
larger and more heavily structured projects (e.g. Twisted, Zope).

Have fun, and good luck,
Mike

_______________________________________
  Mike C. Fletcher
  Designer, VR Plumber, Coder
  http://members.rogers.com/mcfletch/



Relevant Pages

  • Re: Microsoft releases key Vista developer technologies
    ... Then in two years have to learn new language again, ... So we are going to live in word of bugs, ... > My pragmatic recommendation is that VB 6 developers learn a new language ...
    (microsoft.public.vb.general.discussion)
  • Re: Tool to mark code which has been executed
    ... a external party where all coders are C# coders ... They are all VB6 developers and management ... why move them to another language. ... VB6 program while we're doing the VB.NET upgrade. ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Whidbey - Why is refactoring not in VB.NET?
    ... You basic point is that one should pick the language which one is most ... of the advance features. ... Refactoring is one very important thing. ... VB.NET made us professional developers, using OO Programming, UML, ...
    (microsoft.public.vsnet.general)
  • Re: Tool to mark code which has been executed
    ... a external party where all coders are C# coders ... They are all VB6 developers and management ... why move them to another language. ... Coders who come from Java, C, C++ or anny other curly brace language feel ...
    (microsoft.public.dotnet.languages.vb)
  • Re: When will M$ dump support for ASP?
    ... Intranet or Extranet and not even all Internet. ... Since when do most developers only know one language? ... - .NET does not support VBScript, so former VBScript ASP developers must ...
    (microsoft.public.inetserver.asp.general)