[Tutor] List exercise

Erik Price eprice@ptc.com
Mon Feb 10 10:50:09 2003


alan.gauld@bt.com wrote:

> The only problem with this approach is that learning by experience 
> can teach an awful lot of bad habits that are hard to break. Using 
> a tutorial that teaches good habits early saves a lot of time in 
> the long run because you don't have to unlearn so much.

One thing that always helps me is to see the source code of others. 
This can also teach very bad habits, because the neophyte might make the 
assumption that the author of some source code would know not to use bad 
habits (in the situation where the author may have used a bad habit), 
but if you exercise variety in reading the source code of others, you 
can hopefully alleviate this.

There are books written about avoiding bad habits too, for instance one 
of the best I've seen is a little pocket guide called "The Elements of 
Java Style".  Admittedly not very relevant to a Python programmer, but 
maybe the Python Cookbook has a section dedicated to style.  (Anyone know?)


Erik