It was a tough week. It’s midterm, students are busy and stressed. Exams in other freshmen science classes get priority over CS Principles homework. The general bonhomie of class has been replace by some tension. Nevertheless, students performed up to expectations and continued to be sufficiently engaged in the content.

## Narrative on Week’s Goals

The weekly calendar shows that Friday’s assignment received a 1-day extension, and the other two assignments this week got the same treatment.

Calendar Entries for the Fifth Week

**Lecture 31 Jan:** The first part of the lecture continued the coverage of functions from last week, including why one would use them and the details of parameters, arguments

and the “formal/actual correspondence” relating the two. This had to be added to the plan because of having forgotten to handle the parameter details on Friday.

The listed topic was the fundamental principle of information, which I call, “The Bias-free Universal Medium Principle.” It says that bits are sufficient to represent all digital information. We have covered content relevant to this principle in several lectures, so mostly the lecture summarized that content.

**Assignment 12:** Students create a GUI with two buttons (Pal and Clear) plus a line where text is displayed. They are to accept text input and when the user clicks the Pal button, the text is to reverse, so they can see if it reads backwards as a palindrome. This is an exercise to learn about text input (more complex in Processing than graphics), and the three data types, char, String and String[], which will all be needed for the next assignment.

**Lab 1 Feb:** Students work through a lab in which they write a series of value-returning functions based on 13^{th} Century wine merchant measures noted by Knuth: http://www.burtonmackenzie.com/2008/01/legend-of-binary-wine-merchants.html They compute the metric weight of a liquid measure by computing the weight of it’s defining measures and adding it to itself; the basis is a gill at 118 g. Brandon then explains how the function calls are executed.

**Lecture 2 Feb:** Realizing just before class that everyone seemed to be struggling with Assignment 12, I decide at the last minute to begin with a chalk-talk about how the computation works, and a summary of the properties of the data types: char, String and String[]. The lecture is on computational complexity. The lecture begins with linear time and ends with the halting problem; exchange sort is a concrete example of a polynomial computation.

**Assignment 13:** The computation shows a pond in which a turtle can be programmed to swim around, avoiding the whirlpools and going for the sunny rock. This assignment is a primitive version of the LightBot problem used on the first day. Friday (the due date) is the last day of the first half of the term, meaning that the students will have gone from users of the game to implementers. If it isn’t too hard!

**Lab 3 Feb:** Students have lab time to work on the turtle assignment, with Brandon’s assistance.

**Lecture 4 Feb:** Realizing that the turtle is at the screaming edge of the class’ ability, I decide to begin lecture with a review the logic of the turtle computation. After that the Halting problem, which spilled from Wednesday, follows. And finally, I review the high points of the course to this point in preparation for Monday’s midterm exam.

## And How Did It Turn Out?

Overall, the week was our first tough one. The students are busy with other classes – freshman chemistry was having a midterm, and the relentless pace of the class was beginning to show on everyone, including me.

*Monday’s *lecture began covering parameter passing to recover from having omitted it with the revised presentation Friday. Susan had also recommended that I explain more directly the point of functions, which seemed curious since Friday we’d built a timer and the students had just built the Sudoku GUI using functions. It was a good thing to do, however. Parameters were received curiously – the class seemed uninterested in them. I figure that students are in one of two camps: those who had figured them out on their own, and those who were not far enough along to understand what they were doing; I can identify specific students in each group. Nevertheless they have all used them extensively now, so operationally, they know what to do.

Regarding the “bits are the thing” main lecture content, I had the sense students were thinking, “Duh,” given that most of the components of the principles came from earlier lectures. We need to state the principle, but it won’t need as much buildup next time.

*Tuesday’s* lab was successful, reinforcing the value-returning functions and parameters using the binary wine measures, gallon down to gill. Brandon explained how functions suspend the execution of the present function and eventually return to continue its execution using this diagram, where red is gill, purple is gallon, and time moves to the right

*Wednesday’s *lecture started out with a chalk talk on the homework. This turned out to be quite a success in an odd way. I was determined not to solve the homework for them, so I only explained it at a high level. The students paid attention, and then right after class, most of them turned in the homework. What I liked is that my high level description implied a decent understanding of the material we’ve been covering.

The lecture was on complexity: linear time to the halting problem. Given the prevailing exhaustion and stress, I thought students paid attention well enough. But I note that in the summary statistics from the After Image Survey, no student mentioned this lecture as engaging. It is a dry topic for most people, and the amazing aspects of it – NP-completeness, undecidibility – are not so important for beginners. I’m sure it is possible to have a sexier lecture on the topic, but it’s eluded me for quite a few years so far.

*Thursday’s* lab was time to work on the turtle assignment. I had forgotten to mention a detail about testing equality of strings, which caused a small bump, but only for the better students. One problem with the recent assignments – basically 11-13 – is the unwillingness of students to read the assignment through before starting. Brandon was frustrated, writing to me after lab,

Honestly, I think the students would do a lot better if they would just read the assignment start to finish instead of greedily completing tasks as presented to them. For example, [two top students] started programming their own logic for interpreting the Turtle commands instead of looking at the flow chart (which contained almost exactly what code to use) [on the last page].

As one of my colleagues remarked, “Not reading the assignment often saves 10-15 minutes at the cost of hours of frustration.”

*Friday’s *lecture also started with a chalk talk on the homework. This one was not as satisfying as Wednesday’s, partly due to the fact that it wasn’t as well organized, though both were impromptu. After that, the lecture reviewed the content to date. Students were engaged, but not by how cool was the content as they were looking for hints as to how Monday’s test would go.

It was definitely the midterm slump. Despite the tough week, students still found material that they could be positive about in the After Image Survey. Susan’s summary reported few negative comments, but perhaps she is being selective [later, she wasn’t].

My recent plan to be more informal about the class structure, and to open up with more conversation is getting tested as I scramble to explain what is written in the assignment. Am I abetting their habit of not reading the assignments if I go over what I wrote out in the first place?