Saturday, June 13, 2009

Real Life Is An Open Book Test

The other day a regular reader of my primary high school computer science blog (thanks Avi Burstein) sent me a link to an article titled Academic source code dust-up symptom of CS education ills. The short version is that a college student posted the source code from a school project to the Internet and his professor objected strongly. The professor was concerned that future students would be able to find the code on the Internet and turn it in as their own. The student believes that his right of expression allows him to post his work. Eventually an academic judicial affairs office sided with the student. Kyle Brady the student involved tells his version of the story on his blog.  I don’t expect this to be the last of this sort of conflict though. And that is a shame.

I’ve been programming for school, for fun and to make my living for about 37 years know. And while I have learned a great deal from course work and from “book learning” I have learned even more from reading the code other people have written. In fact many textbooks include sample code. Certainly the books I have written have included sample code. But professional developers spend a lot of time reading other people’s code. Formally, informally and in any way you can imagine. They also look to reuse code. And they keep documentation around. Even today when much of what one wants to learn professional software developers often have shelves filled with books. Believe it or not they actually reference them too!

I don’t remember when I first heard someone say “real life is an open book test” but it really stopped me on my feet one day. It also influenced me as a teacher. While I often expected students to memorize some things and gave my share of closed book tests and quizzes I always expected students to take advantage of external resources for projects. That included the textbooks of course and the help files and programming language documentation. It also includes asking for help – though one does have to be careful about explaining the difference between getting help and getting someone else to do the work. And yes, even looking things up on the Internet. That’s how professionals work.

There are people, often great educators whom I respect, that want to put more limits on students. For example they want to avoid things like Intellisense (IDE features that show programmers options for function/method calls and parameters) because if means they don’t have to memorize as many of those things. I disagree because I see greater value in the experimentation and “accidental learning” that provides. But that is ok I think.

Stealing (or borrowing) code from the Internet is a real and justifiable concern for many people teaching computer science (well programming anyway). I would argue that faculty should know their students programming styles well enough to spot clear cheating just as English teachers can pick it up in student essays. Sure that is not very practical in sections of 300 but I don’t approve of sections that are too large for the instructor to know their students. (So there :-P ) IF you are going to have sections of 300 you are begging for cheating to occur so you should not whine when it happens. That doesn’t mean I approve of cheating – I don’t. But you already heard me write disapprovingly of overly large sections and cheating is one reason for that.

One thing I used to do with semester end projects was to have one on one mini-code reviews with each student. They would do a demo and I would test a few things. Then we would talk about the code. I came prepared and if there was code that seemed to advanced for the student or too different from their normal work I asked them to explain it. If a student can explain code in a way that makes it clear to me that they know how it works, can debug it, can modify it and can make it fit their particular application why should I care if they wrote it from a blank slate or took some ideas and code snippets from someone else? It would be like penalizing a student in shop class because they borrowed a saw.

School is about learning. It is not teaching students to work with one hand tied behind their back. It is about helping to understand what they read (or find on the Internet) not making them reinvent the wheel. I’ve blogged  before that I think it is important to have computer science students read more code. IF they find student code on the Internet and learn something from that I think that is great. I suspect they’ll learn how not to do things more often that how to do things but that is valuable learning too. In the mean time there are a great many code samples on the Internet. Microsoft posts lots of code that answers the question “How do I?” (some links below) There are many other sites that do the same thing. Students will find sample code. But they will learn for it and that is what we’re all after isn’t it?

 

No comments: