Turning on a Paradigm

I’m in Milwaukee for SIGCSE this week. I love this conference most for the informal conversations that take place. having been coming to SIGCSE for at least 10 years now I have a lot of friends who I often see only once a year at this conference. We talk a lot of small talk of course but as you might expect when you get a bunch of computer science researchers, faculty and industry people the talk gets to computer science pretty quickly and pretty often. A lot of it may not sound all that exciting to outsiders but for those of us really interested in computer science and especially computer science education it can be fascinating. One conversation I had with two people from Microsoft Research (both former university faculty members) really got me thinking.

It started when one of them reminisced about their first course they too in LISP. The instructor asked people if they knew other programming languages. To the person who answered “none” he replied that they could learn LISP in three days. To the person who said they were an experienced FORTRAN programmer (this was a while ago :-)) he said it would take them several weeks. Sometimes it takes longer to unlearn things so that you can learn a new paradigm.

I learned how to program about 38 years ago and the big new thing was called “Structured Programming.” Experienced programmers were saying it was too hard, too complicated and just not something they wanted to learn. To me as a raw beginner being taught this way it seemed easy and logical. No big deal. OF course later when I had to learn object oriented programming I started to really understand what learning structured programming must have been like way back when.

And I admit that making the transition from Visual Basic 6.0 to Visual Basic .NET was a bit of a struggle for me as well. I hear from a lot of teachers and a lot of professional developers that it is hard for them as well. On the other hand the students I and others I know who taught Visual Basic .NET generally found that VB .NET was as easy for them to learn as VB 6.0 had been for previous years students. Not really a surprise when you think about it. It’s the unlearning or relearning that many of us struggle with.

One of the things I suggested in the conversation was that to really learn a new paradigm or a new way of programming is that you need a project that requires the new way of doing things. Or at least where the difference between old and new ways of doing things is significant. The killer app that helped me to “get” object oriented program was a game called Simon.

This game consisted of four colored buttons that lit up and beeped in random order. The object of the game was to learn the order and press the buttons in the correct sequence. After each round the device would replay the sounds and add a new button press to the sequence. One day I decided to write a program version of this in Visual Basic .NET.

The first problem was how to make the buttons appear to press in time with the beeps. The solution was to have two images for each button. One would represent the button up and the other would represent the button down. Using a procedural programming method one would have to keep track of both images for each button. The program would then have to load the appropriate image into the button object at the correct time. Complicated. A pain in the neck. And then it hit me – create a button class and let each button object keep track of things. Instantly things got easier and I finally felt like I understood the value of objects.

Since then I have always looked for projects that we less forced and more specifically requiring a feature, a function or a different paradigm. It seems to work.

BTW if you are interested in learning more about my Simon project you can read my write up about it on my personal web page here.

Comments (0)

Skip to main content