Bil Lewis

Dr. Dobb's Bloggers

Computer Science for International Relations Majors

April 23, 2010

The abstractions that I thought so simple ("See? You can make a flip-flop out of two NAND gates. Now we'll draw a square around that and treat it as a black-box."), were foreign to them. They seemed to comprehend that they could construce a flip-flop, but when I tried to use lots of flip-flops, they had trouble.

The abstractions that I thought so simple ("See? You can make a flip-flop out of two NAND gates. Now we'll draw a square around that and treat it as a black-box."), were foreign to them. They seemed to comprehend that they could construce a flip-flop, but when I tried to use lots of flip-flops, they had trouble.Computer Science for International Relations Majors

I was asked to teach an introductionary CS course a few years ago. It had list of things the students were supposed to learn, but no recommended text, no clear objective, no teaching approach.

I wasn't particularly upset and took to it with gusto.

I had about 50 undergraduates, all in non-science majors. I opened the course by complementing them on their courage. "You could have taken the easy way to fulfill your math requirement by taking Calculus, but you decided to take my course."

They looked a little nervous.

I opened the course as I would have for science majors, doing simple Boolean logic, the binary number system, advancing to logic gates, memory, and finally a full-fledged computer.

They didn't get it. Or should I say they couldn't keep it all together.

The abstractions that I thought so simple ("See? You can make a flip-flop out of two NAND gates. Now we'll draw a square around that and treat it as a black-box."), were foreign to them. They seemed to comprehend that they could construce a flip-flop, but when I tried to use lots of flip-flops, they had trouble.

I moved on to objects, drawing the usual pretty pictures of memory, and declaring a set of words to be an object. Finally, I started writing some Java code.

Again, what I thought so simple, they struggled with. Even though they had been able to follow each individual step, putting them all together was beyond them.

We started with modifying a basic "Hello World" in Java, using Eclipse. They had a hell of a time doing it.

About half-way thorough the course, I realized that I was not getting what I wanted from them. I drew up a list of times and asked them to come to office hours in groups of three for ten minutes.

I decided that I had the wrong objectives for the class. They were not going to become programmers. So what value did my class hold for them?

I concluded that what was useful was for them to understand the fundamentals of programming, so that they could talk to programmers and describe what they wanted. And so they could understand what was or wasn't fesible.

Out went any thoughts of discussing polymorphism, interfaces, packages, etc.

I went through the construction of a basic dating system in class, then gave them the code and asked them to implement the missing ranking algorithm. "If you think a five foot tall man wouldn't enjoy dating a seven foot tall woman, then add that to your method." It was tough, but they basically got it.

End of programming.

For the rest of the class, we talked about the issues of programming and what information must be organized and how, what the challenging parts of mapping reality to computer programs were.

In designing a swim meet recording program, what is a "race"? Is it eight people swimming a few laps? Or is it a set of heats of eight people swimming a few laps?

I still wrote code on the board, but didn't ask them to write any more programs. I particularly didn't want them screwing around with Eclipse near finals time.

In the end, I was relatively satisfied with the results, as I think they were.

But I'm left with an uncomfortable feeling that most such non-major courses don't have very useful outcomes. It's a hard one.

Dr. Dobb's encourages readers to engage in spirited, healthy debate, including taking us to task.
However, Dr. Dobb's moderates all comments posted to our site, and reserves the right to modify or remove any content that it determines to be derogatory, offensive, inflammatory, vulgar, irrelevant/off-topic, racist or obvious marketing or spam. Dr. Dobb's further reserves the right to disable the profile of any commenter participating in said activities.

Video

This month's Dr. Dobb's Journal

This month,
Dr. Dobb's Journal is devoted to mobile programming. We introduce you to Apple's new Swift programming language, discuss the perils of being the third-most-popular mobile platform, revisit SQLite on Android
, and much more!