Gmail Calendar Documents Reader Web more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion ten small Python programs

View parsed - Show only message text

Path: g2news1.google.com!news4.google.com!proxad.net!213.200.89.82.MISMATCH!tiscali!newsfeed1.ip.tiscali.net!news.tiscali.de!newsfeed.freenet.de!feeder.news-service.com!newsgate.cistron.nl!xs4all!transit2.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path: <showel...@yahoo.com>
X-Original-To: python-l...@python.org
Delivered-To: python-l...@bag.python.org
X-Spam-Status: OK 0.010
X-YMail-OSG: mx9bnMIVM1nPMXqjTV82NaXtX2qeZDDQmsID2JqG_guq5hJjzITWc4edGPE4xHW1jBOARpi6ix6wxnyfIqDz7fmTW90DAWQ7jleB3NkpGLrrXQiOzeiApfHWYo0HcA--
Date: Sat, 26 May 2007 19:58:10 -0700 (PDT)
From: Steve Howell <showel...@yahoo.com>
Subject: Re: ten small Python programs
To: Paul McGuire <pt...@austin.rr.com>, python-l...@python.org
In-Reply-To: <1180232026.357074.186770@o5g2000hsb.googlegroups.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-BeenThere: python-l...@python.org
X-Mailman-Version: 2.1.9
Precedence: list
List-Id: General discussion list for the Python programming language
	<python-list.python.org>
List-Unsubscribe: <http://mail.python.org/mailman/listinfo/python-list>,
	<mailto:python-list-requ...@python.org?subject=unsubscribe>
List-Archive: <http://mail.python.org/pipermail/python-list>
List-Post: <mailto:python-l...@python.org>
List-Help: <mailto:python-list-requ...@python.org?subject=help>
List-Subscribe: <http://mail.python.org/mailman/listinfo/python-list>,
	<mailto:python-list-requ...@python.org?subject=subscribe>
Newsgroups: comp.lang.python
Message-ID: <mailman.8231.1180234696.32031.python-list@python.org>
Lines: 95
NNTP-Posting-Host: 194.109.207.14
X-Trace: 1180234697 news.xs4all.nl 328 [::ffff:194.109.207.14]:46841
X-Complaints-To: abuse@xs4all.nl


--- Paul McGuire <pt...@austin.rr.com> wrote:

> On May 26, 8:48 pm, Steve Howell
> <showel...@yahoo.com> wrote:
> >
> > I'm thinking you could actually have a progression
> > from a 1 line program up to a 50-line program. 
> The
> > number 50 is kind of arbitrary, but my gut says
> that
> > by a 50-line program, you will have demonstrated
> > almost every useful concept.
> >
> 
> If there is anything arbitrary here, I'd say it is
> your "increment
> each example by one source line" constraint.  This
> can force you to
> use some bad coding practices to meet your target
> line count for a
> given example.
>

I understand your point, but I'm sticking to the
concept for now.  My intent with the progression isn't
so much for each example to thoroughly teach a concept
(although I could certainly hyperlink to a more
in-depth treatment), but really more to give a bird's
eye view of the language very quickly.

I recently helped teach a Java programmer to program
in Python, and he learned a lot just by seeing simple
examples.  So I guess my target audience isn't so much
people learning how to program; it's more for
programmers getting their first exposure to Python.

On the other side of the fence, I recently tried to
relearn a bit of Ruby, and I remember being frustrated
by their tutorials, as really, I just wanted to see a
bunch of simple programs, and I can figure out mostly
what they're doing.  Instead, I had to wade through
verbose descriptions of what a variable is, rules for
how you construct identifiers, etc.
 
> Maybe try this approach:  pick your top 10/20/50
> language features and
> develop concise examples. Then order the examples by
> length as a first
> cut (longer examples probably *are* more complex),
> and then reorder a
> bit to handle pre-requisites (introduce a minimum of
> new features,
> preferably 1, per example).  Overall, I'd have a
> tough time picking
> just 10 language features to illustrate, but there
> are probably 10-20
> basic features that will get new people onto fairly
> productive
> ground.  Pick 20 as your example count (50 sounds a
> bit long), and
> stick to it, and then later add "20 More Little
> Programs" for the next
> wave of examples in increasing complexity.
> 

My only reluctance with that approach is that it
sounds like a little more work than I'm ready to take
on right away.  But it's on the Wiki now, so maybe
other folks can help me grow it.

> One other nit to pick: have your example classes
> inherit from object,
> to get new people using new-style classes from the
> get-go.
> 

My only fear here is that when old classes go away
(Py3K? I don't know), that practice may become
obsolete.

But on a more general note, I welcome folks to just
clean up my examples on the Wiki if I accidentally
introduce some bad practices...but preserving line
counts. :)





 
____________________________________________________________________________________
Never miss an email again!
Yahoo! Toolbar alerts you the instant new Mail arrives.
http://tools.search.yahoo.com/toolbar/features/mail/

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google