Part II of Reinventing the Wheel
After the brilliance of rediscovering the Strategy Pattern the other day, I got to thinking about it, and I'm more than a little embaressed now.
The Strategy Pattern is fundamental to the way layout managers work in Java. There is even a lecture that points this out. Now I have studied SD2 while a student at Swinburne. Then I tutored SD2, while still studying. Then I lectured SD2 in two seperate semesters.
And the implications of the Strategy Pattern only occured to me the other day when I was trying to solve a specific problem.
This to me reinforces something that Andrew Cain has been saying for some time.
Students (like myself) need proper and valid problems to work on before thay will be able to appreciate the solution.
Simply being told that layout managers use the Strategy Pattern never meant anything to me. An!
d when I was lecturing that subject I did in fact read up on the stratey pattern to help me explain it to the students (because it hadn't made sense to me before then). But I still didn't realy get it untill I had a specific problem that I was trying to solve, and the strategy pattern turned out to be the solution. Now, 4 years after I first sat in a lecture theatre and was told about it, I think I finaly get the Stratergy Pattern.
I just never had a proper problem for it to make sense before then.
I'm into my second year as an academic teaching OOP (not counting the time I spent tutoring OOP), and I'm still unraveling the sublties of this stuff.
Can I write an OO program that works and does something? Sure. I've been doing that since first year of my Grad Dip. But do I think I can write a propper OO program? Well, I'm getting there. TO realy use, and perhaps appreciate, OOP, requires the ri!
ght set of problems.
We have been arguing back and forth
about how best to teach OOP to first year students and the argument (around FICT, at least) seems to be going toward the answer that we shouldn't be teaching OOP first. The more I learn about this stuff, the more I realise that I'm only just starting to get it. I know that's a pretty cliched thing to say, but it's true.
So why should I believe that all these first or second year students, no matter how well they cut code (and some truly are brilliant), come out of SD1 and SD2 really understanding OOP?
When I look at the path my own learning took, and despite the fact that I studied SD1 and SD2, I think now that it took me consolidating basic procedural principles first, before I could start to come to a real understanding of OOP. I was using objects all along, but I wasn't using objects.
When I look at my solution to the summer semester SD2 assignment from 18 months ago, I'm ashamed to say it!
's very much not an OO solution. And I was the one who set the assignment, and marked it. While I'm quite proud of the solution, it doesn't represent a well designed OO program.]]>