Thinking like a computer scientist

I’m teaching a course called “Orientation to Computer Science“.  It seems all the engineering departments have such a course at Oregon State.  It acts as an overview to a degree in a particular field.  I’ve been asked to teach it because I’m young and female delightful and, apparently, likely to increase retention.  I’ll talk more about the class again, I’m sure.  I had a “pre” lecture on Thursday as part of freshman orientation, welcoming the students in my class, which officially starts next week. (Good thing I wasn’t still travelling!)  I told the class that computer science is a way of thinking and that a programmer is not necessarily a computer scientist and a computer scientist is not necessarily a programmer.  To try to get them thinking like a computer scientist, I used the following exercise:

Ask for ten volunteers and have them line up at the front of the room, in no particular order.  Each person acts as a separate processor.  The class must then come up with a simple procedure to program into each of the processors so that, upon execution, will sort the students by height from left to right.

It’s the first time I tried something like this, and it worked really well.  With discussion, explanation, etc, it took roughly 15 minutes, but could be stretched to 30 minutes or even an hour if some formality was added.  The first challenge was just coming up with a procedure that would work for all the processors in line; the first suggestions were of the form “the guy with the blue hat should move left”.  When a reasonable suggestion came up, we needed to work out the bugs: “do you mean stage left?”  Then there was discussion of how long this algorithm takes and how much longer it would take with twice as many people to sort and how the time depends on how unsorted the people are to start with.  (I would have loved to have longer to give them more formality at this point … but perhaps that would have been become a little boring.)

Overall, I was very impressed with how good their intuition was (at least among the vocal students) – I would bet even better than the junior’s that I am used to teaching, who have, perhaps, had their intuition molded out of them.

Would love to hear other people’s suggestions of warm-up activities.

Print Friendly, PDF & Email

One thought on “Thinking like a computer scientist

  1. Sriram Pemmaraju

    ACM Computer Science Unplugged has a nice collection of warm-up activities. I have used a couple of these in a First Year Seminar on Algorithms.

Comments are closed.