views:

347

answers:

6

I will be teaching my first university level Computer Science course this summer, and I'm currently working on coming up with ideas for fun assignments that the students will complete. The course is the second in the program, covering analysis of algorithms and basic data structures such as stacks, queues, lists, trees, etc.

I have a number of ideas that I can run with (creating music with Markov chains, Twitter client, etc.), but am always looking for new ideas that would be interesting/fun for the students -- after all, it is easiest to become/remain engaged in the course material when one is having fun. I am looking for ideas on interessting first-year level assignments that you or others may have completed in the past.

Before anyone suggests it, yes I know about Nifty Assignments, and have checked it out. Just soliciting any other ideas that you might have. We all remember certain assignments from university that were particularly fun to work on. These are the experiences I am ideally seeking.

+2  A: 

SICP has some very nice assignments.

Eli Bendersky
+5  A: 

The trouble with "fun" assignments is that they often turn out to be more work for students than you intended them to be. Especially students with poor English and students who leave the assignments to the last minute. [And then turn up on SO with "please do my homework" questions.] A lot of them are going to have difficulty with any assignments you set, but you don't need the aggravation of a bunch of students complaining about the exercises being too hard, or not being covered in your lecture notes.

My advice (from experience) is to try to keep the amount of background knowledge and "challenge" of marked programming assignments low.

Setting interesting problems for optional exercises is a reasonable idea, though it is important to warn students NOT to spend time on them at the expense of other more important work.

Stephen C
I definitely agree, and am looking to keep assignments short and relatively simple -- but hopefully sweet as well. :) I have had the opportunity to create a few assignments in the past for the same course (in a teaching assistant role). Some worked well, and indeed some ended up being just as you described -- fun and interesting, but too long and complicated for the students. Nevertheless, I am hoping to find a few gems that might just be simple enough to understand and complete, while still being fun. Certainly though, I respect your answer and will take strides to keep things simple.
Jon Stevens
Students with poor English and students who leave the assignments to the last minutes should have been filtered long before reaching the university level. Still being reasonable with "fun" level will give you less hassle when checking the assignments and interacting with students.
Anonymous
@Anonymous - unfortunately, that is not the way it really works.
Stephen C
A: 

I have been using the following pages as an inspiration:

You can also use the tasks from contests (example), but this will most likely require some work on your side - to assure fairness in distributing the assignments (some might be tricky, and not focused on the things you've mentioned).

Anonymous
A: 

One thing to consider, maybe not for the first programming course the students do, but later on, is to hand them back code from previous assignments (their own or someone else's) for fixing. THis works better if you pick incorrect submissions, ideally with subtle flaws.

A similar idea is to have a sequence of labs, using the (successfully completed) code from the previous lab as a starting-point. When I did the introductory programming course (PINK - programming in incremental systems) at LiU, lo so many years ago, there was one segment of teh lab work that (essentially) boiled down to implementing a calendar, using abstract types and accessors, then changing the implementation of the abstract type afterwards. Quite valuable for illustrating the need of providing a good interface you don't need to side-step, if nothing else (from memory, I ended up spending a day or two pondering the "change implementation", then 15-20 minutes actually changing my abstract data types, since I'd done the hard work up front and just needed to convince myself of this).

Vatine
A: 

Pig Latin.

Have your students write code that translates a text stream from English to Pig Latin. The rules are fairly simple, but they will require some interesting special cases, especially when it comes to punctuation and capitalization, requiring them to write a basic scanner/tokenizer.

With a typical sentence like this:

Quietly, Anne walked into the forest.

You should get this:

ietly-quay, Anne-ay alked-way into-ay e-thay orest-fay.

but you are likely to get:

uietly,-Qay Anne-ay alked-way into-ay e-thay orest.-fay

which has misplaced punctuation, improperly placed Qu and incorrect capitalization.

plinth
A: 

A couple of ideas that I've found to resonate with students:

  1. Fractal art--an excellent way to teach recursion because students can visualize the process (ex. sierpinski triangle, L-systems for ambitious students). You can see some pretty impressive graphics generated with context-free grammars over at context free art.
  2. Image manipulation--teach functional programming by mapping pixel manipulation functions across an image (ex. swap color channels, Gaussian blur, manipulate hue); this is somewhat simpler than the typical syntax tree-based generative art assignments.

The hardest part about teaching introductory-level computer science classes is the disparity in programming ability across the typical class. So, if you can create assignments that can be simple enough for the less capable students and easily extended (through extra credit for example) to more complex problems for advanced students, then that is ideal in my opinion.

awesomo