[Edu-sig] When to introduce OOP
Chris Meyers
cmeyers@guardnet.com
Sat, 28 Jul 2001 08:02:53 -0800
Hi Tim,
I just completed teaching a 15 hour little survey course on Python
at the community college here in Eugene. It went pretty well,
particuarly since it was the first time for me with this material.
I tried to make the course sort of data-oriented. Concentrated on
first simple data types, numbers and strings and then moved on to
lists and dictionaries. Treated the rest of the language as just
operators on the data, so introduced "for" along with lists, etc.
We mostly played with small pieces of code, often at the
interactive prompt.
Near the end I introduced 2 larger programs. The first was strictly
procedural, a tic-tac-toe that showed off functional decomposition
pretty well. That was last week. In the last 3 hour class this week
we first looked at object oriented stuff and then showed an OOP
simulated card game. This game will be a chapter in the OBP book
real soon now.
People seemed to have no problem with OOP this early. Some of it
might be that they were already used to composite data with lists
and dictionaries. Including things like nested lists etc.
So objects referencing other objects was ok. Tying methods to
objects, no problem. Inheritance a little trickier but still ok.
My impression is that the two programs were about the same in
complexity and size. But my students had to struggle more with the
procedural one. There were a lot more smiles this week than last.
I think maybe it's all about being able to map the code to a model
in your head.
As Kirby said, you still got to use procedural code to stuff into
the object methods. I vote for using OOP as early as you can and
have them use it if they are writting programs. Set good habits
early.
Chris Meyers
07/27/2001 8:21:27 PM, Timothy Wilson <wilson@visi.com> wrote:
>Hi everyone,
>
>I'm working on planning my Python course for this fall, and I'd
like to get
>the group's advise on when I should introduce OOP. I work with
Zope a lot
>and the OO paradigm is pretty deeply embedded there. I've really
gotten to
>like it. (Not that I've mastered it. :-)
>
>Now I'm fully aware that Python is just as capable a procedural
programming
>language as it is an OO one. I don't want to skip talking about
that side of
>things, but OOP seems so prevalent in many areas that I'd like to
get my
>students working with it as soon as possible.
>
>I'd appreciate any thoughts you might have on this topic.
>
>-Tim
>
>--
>Tim Wilson | Visit Sibley online: | Check out:
>Henry Sibley HS | http://www.isd197.org | http://www.zope.com
>W. St. Paul, MN | | http://slashdot.org
>wilson@visi.com | <dtml-var pithy_quote> | http://linux.com
>
>
>_______________________________________________
>Edu-sig mailing list
>Edu-sig@python.org
>http://mail.python.org/mailman/listinfo/edu-sig
>