Daily Archives: June 11, 2017

Writing in Computer Science Classes

WRITING IN CS CLASSES
=====================

by Richard White
—————-

2017-06-06
———-

In the new *Advanced Topics in Computer Science* course that I developed this year, I had the opportunity to introduce a new type of Computer Science assignment (at least new to me): a written report.

I stole the idea of a written report in Computer Science from Michael Lew, an AP Computer Science A instructor whose summer institute I attended last year, and it solved a problem that I’d seen in my CS teaching: computer science students tend to enjoy coding, often to the exclusion of other important aspects of the subject. Coding is fun, of course: give my students a few challenging CodingBat problems and they’ll happily ignore me for hours.

Once problems become larger in scope, however, it becomes important to sandwich the coding in-between two other important aspects of any significant project:

  1. planning/design at the beginning, with consideration given to how the project is going to proceed, and
  2. a culminating conclusion to the assignment, possibly in the form of evaluation of the product (by the student or teacher), reflection on the process, a presentation of the project, etc.

Both of these aspects of a larger-scale project require time, either in class or at home, and that is certainly one of the challenges in implementation. In my own teaching, I feel like I’ve developed the ability to build in time for project-planning in the course calendar. The culminating experience, however, is something I’ve often been weak on.

This year, in the *Advanced Topics* class, we were studying the performance of various sorting algorithms, the simplest ones of which are all O(n2). After a brief introduction to SelectionSort, Bubblesort, and InsertionSort, students were semi-randomly assigned a sorting algorithm from among the MergeSort, ShellSort, and QuickSort.

The first challenge for students consisted of simply getting a working algorithm running. Depending on the level of the student and the difficulty of the algorithm, this might have been the easiest or the hardest part of the assignment.

The second challenge was doing determining the performance of the algorithm, both empirically (by collecting time data for data sets of different sizes), and possible analytically (by counting the number of statements the algorithm would execute under different conditions).

Finally there was the writing of the report itself, something that students who are good in math and computer science don’t ordinarily have the opportunity to try. In this particular assignment, I gave them a concrete example of my expectations by briefly showing them in class a report that I’d written myself for one of the algorithms. (I didn’t want them to copy the format too closely, so I didn’t make it available for study online.)

By the end of the assignment, there were a number of goals that had been accomplished:

  1. Students each had a solid understanding of at least one of the sorting algorithms assigned.
  2. Students had a strong understanding of how algorithm performance, expressed in Big-Oh notation, is related to an algorithm.
  3. Students had a concrete document demonstrating their understanding of this material, suitable for presentation or inclusion in a portfolio.
  4. Colleagues had a better appreciation for some of the work we’re doing in the course. This was an unintended consequence, but a welcome one: with students turning in this assignment in a more traditional format, my fellow teachers were able to see evidence of the work my students do.

I only offered this assignment in my most advanced course this year, but I’ll be expanding it to my other computer science courses next year. (Download a PDF version of the assignment.)

What traditional assignments do you find translate well to non-traditional courses? Do students appreciate being able to leverage their familiarity with the format of a traditional assignment, or do they find it annoying?