Why programming CAN be an Introduction to Computer Science
First, before I get spammed by oh so many people I want to point out the word ***CAN*** - not should, not is, but can. This post is for all the teachers out there who dont necessarily get to make decisions at the meta level and are told that CS1 _is_ a programming course.
One of the things that I have become a proponent for in the past year or so is that Introductory CS has learned nothing from its counterparts in other departments. (especially the humanities) Lets look at departments that match CS’s profile in terms of exposure prior to the standard “intro” course. Philosophy, psychology, etc. Even add some of the sciences here - intro to bio, intro to chem, etc.
These intro courses are survey courses. They are to help us understand not only the specific topics delineated in their syllabi, but also to give us an idea of what the field is about - whats the difference between cellular biology and marine biology? And also to let us know that these divisions exist. We (cs) are very bad at that.
A colleague recently asked me to share an example I did with my classes, and I realized it would be better written up as an assignment. I thought I would share it with all of you as well (and yes, I’m going to go put it in the CSTA repository as well). The assignment is about Blackjack. The creative part however is not about having the students code blackjack in any way shape or form. Instead, they need to use an array and develop a series of “weights” that tell a computer player whether to hit or stay from a given hand.
This is a very very small introduction to the concept of machine learning. We are generating random trials (and part of the assignment is to look at how the numbers change with different number of trials) and using them to “teach” a computer to play blackjack, thereby exposing a statistical truth that we all know about. (although machine learning often works with unknown truths) It even includes a link to an open machine learning problem that has a million dollar prize - for something the students use!! Netflix (http://www.netflixprize.com/)
I believe there are lots of great examples out there that allow us to (within a programming class) introduce the variety of fields related to computer science - and many of you are probably already doing it - lets just make it explicit for our students!
So here are the files: There is a word document describing the assignment here, and a zip file with code (completed) here.
Tuesday, October 28th, 2008