Saturday, February 27, 2010

Thrift Store Find: The World of Objects

The internet really is amazing, when you think about it.

A few weeks ago I found an old VHS copy (never opened before) of THE WORLD OF OBJECTS with Philippe Kahn.  With VHS tapes going for 50 cents, I didn't even hesitate to throw this one in my cart.  Then I found it hosted on Google Video, which was convenient.

Yesterday I watched it.  What was amazing to me about it was how little things have changed when it comes to Object Oriented Programming.  The video hammers out the three main facets (Encapsulation, Inheritance, and Polymorphism) as if they are revolutionary concepts in programming.  Well, at one time they were.

My students, though, have never lived in a pre-OOP world.  For them, the usual responses range from a nonchalant "oh, okay" to a somewhat amused "well, duh!"  I remember Don Slater giving a demo of Alice 3 at Carnegie Mellon University.  He made the comment, "you know, as far as objects go, students 'just get it'."  He was right.  In fact, I've found it easier to teach objects than it is to teach functions, which is a strange twist on reality if you grew up programming BASIC on a Vic-20

This last week during our programming club at Skyline, one of my best programming students and I talked about redesigning old video game classics like Breakout using OOP principles.  We each had a piece of paper and were soon diagramming UML boxes for a Breakout clone.  It was pretty clear to me, right then and there, that a) you can't go home again, and b) you wouldn't want to anyway.

This weekend "just for fun" I'm programming the Breakout clone and also a cellular automata simulation of forest fires that I came across in a great book on computational programming.  For the Breakout clone I used some of the design that my student and I had come up with, but toned down the OOP a little (The paddle class and ball class should be quite re-usable).  But for the forest fire sim, I sat down and just started coding.  That turned out to be a mistake.  I hadn't fully planned the program on paper, and I know that the grid class I write will be used by students in the future.  So now I'm back to paper and UML diagrams, thinking through what a grid object's attributes and methods should be.  At least when I do start writing the code, I'll have a good plan in place.

Processing will be used for this, and the results will eventually appear on Skyline's Processing Playground page.

No comments:

Post a Comment