Web Images Videos Maps News Groups Gmail more »
Recently Visited Groups | Help | Sign in
Google Groups Home
Message from discussion ten small Python programs
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Steve Howell  
View profile  
 More options May 27 2007, 12:58 pm
Newsgroups: comp.lang.python
From: Steve Howell <showel...@yahoo.com>
Date: Sat, 26 May 2007 19:58:10 -0700 (PDT)
Local: Sun, May 27 2007 12:58 pm
Subject: Re: ten small Python programs

--- 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/


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Google Groups - Google Home - Terms of Service - Privacy Policy
©2009 Google