[Edu-sig] Explaining Classes and Objects

Rodrigo Dias Arruda Senra rodrigo.senra at terra.com.br
Sun Jun 19 16:46:52 CEST 2005


 [ Kirby ]
 -----------
 | > >OO really is a different world.  I think it still makes sense to teach
 | > >the subject historically, even though we *can* start with objects at 
 | > >the same time.

 +1, did that in practice and worked really well.


 [ Laura ]:
 ------------
 | > This may make sense for people who already know procedureal programming,
 | > but I don't think that it is a good idea for the rest of the world.  I 
 | > think that you need to learn about exception handling _early_ 

 I couldn't agree more. Even though I did not planned to teach exceptions in
 an introductory undergraduate programming course, that came as a natural
 result of adopting Python.

 While exploring the interactive prompt, sooner or later the students have to face 
 something like:

 >>> x
 Traceback (most recent call last):
   File "<stdin>", line 1, in ?
 NameError: name 'x' is not defined

 There had to be an explanation for that, and a way to deal with it.
 So I had to squeeze the unplanned topic of exception handling into the course
 plan ;o).
 
 | > right after you learn how to write a loop, and unit testing, and test 
 | > driven design from the moment you get out of the 'how to play with the 
 | > interpreter' stage.

 I agree with you on the importance of TDD. Nevertheless, I'm not sure on
 the feasibility of introducing this practice during introductory courses.
 Perhaps, is not a matter of feasibility, but a conscious choice of cutting
 the red tape a bit, and allow a more free and joyfull first encounter with
 programming. 

 | The average beginner isn't going to know any programming, so why not start
 | with class/object right from the top?  

 Time permitting <wink>. OTOH, a bottom level approach has the advantage 
 of introducing a mechanism after the need for it is felt.

 | Yet the procedural model requires less setup I think, less background.
 | There's no "class hierarchy" to discuss.
 
 Indeed.

 | Having listened to more than a couple CS teachers describe their curricula,
 | I'm seeing the procedural-first, OO-next approach is fairly widespread.
 
 That is also true here in Brazil.

 best regards,
 Senra

-- 
    
  Rodrigo Senra       <rsenra |at| acm.org>                      
 ------------------------------------------------
  GPr Sistemas  http://www.gpr.com.br                
  Blog          http://rodsenra.blogspot.com                    
  IC - Unicamp  http://www.ic.unicamp.br/~921234  
 ------------------------------------------------


More information about the Edu-sig mailing list