[Tutor] RE: OOP purpose

Erik Price erikprice@mac.com
Wed, 3 Apr 2002 07:32:35 -0500


On Wednesday, April 3, 2002, at 06:39  AM, alan.gauld@bt.com wrote:

> OOP does take some time to adjust to however - estimates
> vary from 6 months to 2 years for an experienced
> procedural programmer.
>
> Beginners are supposed to pick it up faster because to
> them the concept of asking a table to move across a
> room is more obvious than the idea of moving a table
> data item by explicitly changing its X and Y coordinates...
>
> Theres lots more to be said (and most of it has been already!)
> and a browse of the cetus-links web site is a good place
> to start...
>
> But don't get hung up on OOP, it's not the final word in
> programming nor is it even the best approach in every case.

Wolf,

I found two extremely helpful resources in understanding OO a little bit 
better (but this was just the other day, I am no expert):

(1) Check the archives, this past weekend someone posted a question 
about how to use objects to keep track of stocks.  Kirby Urner posted a 
class that made total sense to me.  I saved a copy of it if you want I 
can post it again (I commented it, and Kirby gave me feedback on the 
comments, so it should be helpful).

(2) But the class itself doesn't really explain some of the 
fundamentals -- I found the following two-part tutorial to be helpful in 
explaining those:
well, DevShed's site is under severe load I guess so I can't get the 
exact link.  I got this one from Google, but check and make sure that it 
is the first of a two-part introduction to Object Oriented programming 
with Python:  
http://www.devshed.com/Server_Side/Python/OOPWithPython/OOPWithPython2

I recommend reading the introduction (takes about 20 minutes including 
the time it takes to do the exercise using clockclass.py) and then 
taking a look at the more advanced Stocks.py .   Note that these two 
resources really require some basic Python experience to make sense of 
(or at least, for me I wouldn't have "gotten it" if I didn't already 
know something about Python).


Good luck,

Erik