Sometimes just when you think an argument is over and become a settled issue someone else comes up an reopens it. Sometimes what you discover is that people have been as much beaten into submission as convinced my the arguments. All they were waiting for was someone with some authority or credibility to come alone and express a contrary opinion. Something like that happened in the Advanced Placement Computer Science mailing list last week. The issue in question is if creating objects should be taught early in a first course or late - perhaps as late as the second course.
The proponents of teaching objects early have definitely been in the ascendency in the last couple of years. But all of a sudden someone reported that they had been asked for resources for teaching a first course as a strictly procedural, rather than object oriented, class. Well talk about opening Pandora's box!
Don't they know that java is all about objects? Don't they know that you can't program in Java without using Objects? Don't they know they are supposed to teach objects early? Well you get the drift. And them Stuart Reges puts in his two cents. Stuart Reges is a senior lecturer at the University of Washington and he is not one to shy away from controversy. He jumped in with mention of a textbook he is working on called Building Java Programs that takes a back to basics approach. He also talked about a paper he presented at SIGCSE in 2006 called Back to Basics in CS1 and CS2. Mark Guzdial takes on the Object Early question on his blog this week as well. Apparently this has come up on the SIGCSE mailing list lately as well. I think I need to get on that list.
What Stuart proposes (and this is simlar to what Mark Guzdial recommends) is that the first course avoid teaching students how to create classes. He does suggest using objects early. At Washington they apparently teach creating classes as part of the CS2 or Data Structures course. This seems like a pretty good approach to me. It feels a lot like the way I did things back in the Visual Basic 6.0 days. I taught the objects that are used to create a graphical user interface but we didn't actually create new objects. In the second course (C++ back then) we learned how to actually create a class and the discussion of Object Oriented Design began.
I do worry that we often try to cram too much into a first course in programming. There is so much to learn and it all seems so important that this is a natural trap to fall into. We need to be very careful that we develop a proper scope and sequence so that we can build a proper foundation without drowning students in more than they can handle. Syntax complicates learning how to program and the syntax used to create objects is among the hardest for students to learn. It may very well be better to leave that to later when students are more comfortable.
Teach objects? Absolutely! Maybe using them early and creating them later is the right way to go. It seems pretty reasonable to me. What do you think?