Monthly Archives: June 2017

Writing in Computer Science Classes


by Richard White


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?

Implementing a Post-AP Computer Science Course

Implementing a Post-AP Computer Science Course

by Richard White


This past semester I began teaching an “Advanced Topics in Computer Science” elective that I’d developed for my school. It’s an interesting class for a number of reasons.

  1. Although it was a new class for me, the topics covered in the course aren’t new to longtime high-school teachers who taught the College Board’s old AP Computer Science AB course back in the day. The “B” part of that course included discussions of some of the topics covered in this elective, including various types of more complex data structures and algorithm analysis. The “B” part of the course was discontinued in 2009 in an effort to “focus resources on efforts that will provide a much greater degree of support for AP Computer Science teachers than ever before.” [1] (Yes, I don’t quite follow the logic there either.)

  2. The class was offered as a “post-AP” course. In the context of my school, there are a wide number of students who are interested in learning some computer science, and who are more-than-happy to earn some AP credit for it. Most of them are not going on to study CS, however, so this class filled a need for those students. The impetus to develop the class came mostly from me, informed by some encouraging prodding from alumni.

  3. Although the standard AP Computer Science A course uses Java (currently), I wanted students in this elective to focus on the data structures themselves, without having to muck about with Java infrastructure. I elected to offer the course in Python, and this had a number of implications.

    1. For students who really were taking this after the AP CS course, they needed to learn Python, and fast. A year of Java had given them a solid grounding in object-oriented strategies, but the Python syntax and quirks like dynamic typing took some getting used to. The Advanced Topics class, then, began with a Python-based Boot Camp to bring everybody up to speed.

    2. There were a couple of students who chose to take this class after completing a single-semester Python class. This required a bit of a stretch on their part: although they were well-versed in Python syntax, they had been learning CS for a shorter period of time, and weren’t as well-grounded in object-oriented thinking. The Boot Camp strategy attempted to bring them up to speed, but was no substitute for the more extensive curriculum in the AP Computer Science A course.

  4. The class was initially developed as a way of returning to the curriculum that was originally offered by the College Board program, and can be viewed as supporting that model. I have since had a number of conversations with teachers and administrators who see this course as a potential model of what a rigorous class might look like as part of a non-AP program. That wasn’t my intention in creating this course–I actually appreciate the idea of a national-standard curriculum against which my students can gauge their mastery–but this course can certainly serve different needs, depending on context.

  5. As we worked our way through the curriculum, I tried to be sensitive to the experience of the students. Developing Python implementations of stacks, queues, trees, and graphs isn’t everybody’s idea of a good time, so I worked to include offshoot activities that built on the skills they were learning. This can be especially challenging the first time a course is offered (and I was teaching this class as an overload), so I expect next year is going to be a much more satisfying experience for the students. Abstract structures may be developed with visual representation, for example, bringing a more graphic appreciation of the structures.

I wasn’t too unhappy with how things worked out this first time through, but I’m looking forward to refining some aspects of the course and smoothing out some of the rough edges in anticipation of offering it again next year. In the meantime, you can see the webpage for the course at Advanced Topics in Computer Science.

I’ll be writing a bit more about this course in the next month or so. Stay tuned.