Step 40: Teach Loops

Another week, another failure.

My lab last week continued to be too hard. The ultimate cause of all this misjudgment on my part is that in place of a homework that would have gently introduced my students to loops, they had their first project instead, which was still focused on functions and branches. Since the students did well on the project, I hadn’t realized this, and had written the lab as though students are already comfortable with loops. There were other faults with that lab – like the fact that it could be done without using loops at all, and the fact that students are still struggling with loops made that the more attractive option. Which is why I had to back-track and review loops yesterday.

The good thing is that I’m starting to understand where students are failing. The students actually understand loops, or at least, they can figure out what code with loops will do. What they can’t do is think about them. Perhaps it has been too long since I’ve learned to code, but it came as a total surprise to me that students didn’t know how to write a loop that summed up the contents of a list. More specifically, student have an intuitive grasp that they need a variable to accumulate values outside the loop, nor do they have a good sense whether they should be looping over the elements of a list or the indices of those elements.

The bad thing is that I still don’t know how to go about addressing these problems. After lab last week, I talked with the students to see what I could do to help, and ended up writing both a guided worksheet to loops as well as a larger set of ungraded problems for them to try out. The exercises were a good idea – most of the questions were asking students to implement existing functions from the Python library, both to give them practice and to reinforce the idea that they don’t need to memorize all those functions if they don’t want to. While this is great for a lab in the next iteration of this course, I’m not sure it is sufficient to build students back up to where I hope they would be. Also frustrating these efforts is that, because their first exposure to using loops was through the overly ambitious lab, their confidence may have taken a hit that is harder to recover than if they had to just gain it in the first place.

We do have a quiz on Thursday, so I’ll wait for that to see how the students are doing before deciding my next move. But I need to get my act together and fast.

Step 40: Teach Loops

Step 39: Build a Student Computer Science Community

When I first learned about my job, one of the my first goals I set is to establish a community around computer science. I actually find this mildly amusing, since I’ve never considered myself a particularly social person, nor do I feel I have the skills to create a sense of community in others, and yet here I am.

Mostly this entry will be about students. This is not because I haven’t built a network of faculty and staff to work with, but because I still don’t quite understand what I am doing or what I’m trying to accomplish. Having more experience with what students struggling with and how to support them, it’s easier to articulate why I am doing the things I am doing, and also talk about how I think it has worked out.

Since I only started teaching computer science this semester, the only thing I started doing last semester is to get to know students are already in the computer science program. This was mostly through the student-run Open Source club, which I have mentioned before on this blog. Although the club was not a large one, attending the meetings and getting to know the club officers ended up being one of my key sources of information into what students think of computer science. It helped that some them of there were in my Topics in AI course as well, so I saw these students in both academic and more social settings.

One of the more remarkable things that the club did was that the volunteered their time to peer tutor less advanced students for their programming assignments. This is particularly commendable given that Oxy’s Center for Academic Excellence (CAE) pays students to do the same thing. So of course I went and talked to the CAE, and got them to pay one student for continuing to do what they do. By coincidence, we managed to coordinate our schedule so that peer tutoring hours are the day before homeworks are due, and I’ve heard that every week about five students from my class show up every week, which is a pretty good turnout.

But this is still not ideal – the tutor is a peer, but some are more peer than others. What I really want is for students in the class to be helping each other out. I implemented three policies towards that end. First, I am giving 1% extra credit for general helpfulness. I will admit that I am not yet sure how I will assign that 1%, but it will likely be from surveying students about the top three people outside of their project teams who have helped them the most (I will have to be careful to avoid social effects/sampling bias). Second, I enabled the online forums, one for discussing course content and the other for general computer science news. These have proven helpful on occasion, but their general use is still less than what I imagined they would be.

The last thing – and I thought this was the cleverest of the three – is that I held what I call “work sessions” for students. The inspiration came from hearing about how groups of faculty would meet once a week over the summer to just get work done, even if they are from completely different fields. What struck to me is that I have never heard of students taking part in it. There’s no inherent reason why they couldn’t join, as long as they were actually working, and it would contribute to the intellectual community of the college.

So starting two weeks ago, I organized a two hour work session every week. As I explained to the students, the idea was to have a predetermined time where students would be in the same physical space, so they can use each other as resources. I told them I will also be there, but – and I enjoyed telling students this – I won’t be answering questions about the course. About ten students came to the first one, and roughly the same number to the second. Of course, I did end up answering some questions, but I felt no obligation to do so, and if I wasn’t chatting with students about other things, I just did my own work while keeping an ear on the conversation. I had hoped that students would self organize another work session yesterday or today, given that their first project is due, but no such organization has appeared (at least not on the course forums).

I think these are good efforts for the first six months of being at Oxy. My strongest tie to students is through the Open Source club, but a number of those students are graduating, so I’ll have to start building ties with the next generation of club officers. The most sustainable of these efforts is the student work session, and I honestly wouldn’t mind being “required” to work two more hours each week. My goal is to have students self-organize these sessions, with students taking different computer science classes (or who formerly took computer science classes) present, and being willing to help students who are not as far along in the curriculum. I think this goal is achievable, even if it takes a couple years, and I hope I am up the task of making it happen.

Step 39: Build a Student Computer Science Community

Step 38: Prevent the Second Assignment Failure

I am currently teaching an introductory computer science class, with a three-hour lab every week, split into two lab sections. The last lab on Thursday went a little pear shaped – not enough that I couldn’t fix it in the two hours before the other half of the class had lab, but enough that I had to change the grading criterion for the first section. What caught my attention is that this is the second lab (technically it’s the third, but the first lab was just getting software set up), which reminded me of the fiasco with my second assignment for Topics in AI last semester. This is not a universal trend – the second homework for the intro course is due tonight, and students have finished it without too much trouble – but I do think it’s a trend worth exploring.

The most salient addition connection between the semesters is that the assignment/lab didn’t work for the same reasons, namely, that it was too difficult for the students. More specifically, I think in both cases an excellent first assignment led me to raise the bar for the second, only to find that the required thinking was too abstract. Last semester’s assignment was on reinforcement learning, where I expected students to connect properties of the domain to properties of their feature space – despite only having learned about agents a month ago. For Intro CS this semester, although the content itself was not as abstract as with reinforcement learning, the method of thought I expected of them was too difficult. We had just covered functions and branching, so I thought a good lab would be for them to write two functions (and a main) that tells the user whether they are in California, and how far away they are from Oxy. As a warm up, I also made students write a test case for a simple function, with the idea that they will first write their own test cases for the two functions and submit them to the autograder, then submit the code, and their grade will be based on some weighted average of the two.

The first wrong thing I did was I stupidly left the text telling them that they have to write their own test cases at the end of the lab. If I’ve learned anything from three weeks of labs, it’s that no one reads ahead. Not even the to the next line, which would provide an explanation for the puzzling behavior they just got.

But the bigger wrong thing was that the thought process of figuring out whether a point was in California was much more difficult than I had anticipated it to be. I defined seven points that marked the (non-convex) corners of California, so the next step was to rule out increasingly tight bounding boxes, with a bit of high school geometry/algebra to help. I paired students up by self-identified ability in high school math… which as a rule was an over-estimate of their actual ability.

The real problem was not even about the computer science – once students figured out what they were doing, they could write the code to do it. The problem was that students didn’t have a good intuition for how to tackle the geometry problem. Some students wanted to separate the area of California into multiple triangles, which while a possible solution, is much harder than ruling out external areas. A number of pairs got really close to code that would pass most of the test cases, at least for that function, but they were 15-45 minutes short of ironing out all the bugs.

For the second lab section, I moved the text saying that they have to write test cases first, then added a hint about wanting to rule out areas instead of rule in areas. I also removed the other two functions from the lab. Most of the students were then able to finish in the last 30 minutes, which means the lab was well timed, and that the fault was almost entirely in the lab instructors.

Still, even identifying the error now in retrospect, I don’t feel like I have a good grasp on what other skills I can trust students to have. The failure in reinforcement learning I could understand, since it was a topic new to all of them. I’m not sure if what students lack is computational thinking, although one could certainly after that they lacked the skill of breaking things down into simple/the simplest components. It wasn’t exactly the high school math, either since, students eventually could figure out the equation of a line and determine whether a point is above or below it. The difficulty was entirely in the approach, and I’m not sure how to teach that to students in any generalizable way.

At a different level, I don’t think the lab worked as well as I wanted as an introductory challenge for students to learn about functions and branching. They did write a function, but they didn’t get to use it, and most solutions did not require any nested branching. I still think the question is one that gets students thinking, but I will probably replace this lab in future semesters.

For now, I’m temporarily scaling back my lab ambitions. My original intention for the coming lab (on lists and looping) was for students to write all of (console-based) Connect Four, but now I think I’ll just have them write two key functions. I worry that it will be too easy, but I suspect that it will be perfect with the added difficulty of figuring out what they need the computer to do in the first place. I’m also thinking of making them explain their plan of attack before letting them write code, treating the whole process as though its engineering design, but that’s probably a little too much.

Step 38: Prevent the Second Assignment Failure

Step 37: Examine the Core Program

One thing I really enjoy about being at a liberal arts college is that I get to participate in discussions about college-wide issues. One of more recent ones is about the Core Program at Oxy, which includes a selection of freshman writing courses that every student must take, called the Cultural Studies Program. Under the current curriculum, freshmen must take a CSP in both the fall and the spring semesters.

Before I go any further, perhaps it’s better to describe what the program is supposed to accomplish – which, at least from my point of view, is part of the problem. On paper, the program is aimed at improving the writing skills of students, especially during the fall semester, students are supposed to write some number of papers, which are critiqued and edited by the faculty. Unofficially, however, I have heard faculty talk about the CSP having additional roles: helping students adjust to the college workload, being a shared experience between everyone on campus, and introducing (and potentially recruiting) students to the breadth of disciplines on campus. Additionally, after the student protests last semester, there is also talk of using CSP courses as a way for students to explore their own identity and learn about the identities of others.

The main motivating reason for this recent discussion about CSP, however, is that student surveys say that students’ don’t find the courses particularly helpful in writing, despite the faculty still finding students’ writing not up to par. The question is then how we should change the program to simultaneously ensure students are actually learning, while fulfilling the various unstated goals that faculty have assigned the program… while getting around additional constraints, such as how very few tenured/tenure-track faculty is willing to teach these service courses. A number of proposals were thrown out, such as making the second semester division specific (ie. humanities, social sciences, physical sciences), making the second semester be about quantitative reasoning, pushing the second semester to the second year, and so on. While these are all suggestions worth thinking about, to me, I don’t think we are addressing the issue at the Core (get it?), that the goals we have prescribed to CSP may be inherently contradictory.

I don’t know if there is a solution here. Of the main three goals, my instinctive response is to question the value of a shared college experience. I know there are faculty who vehemently defend this component of the program, but it’s also the only goal of the three that do not squarely fit under the liberal arts banner. One argument I might concede from that angle is that a liberal arts college is not only about the content of courses, but also about being in an academic community, which is why shared experiences are – although I am not convinced that CSP is the best way to achieve that either. I am not saying that community building is not important, but that I think it’s possible to do it by building upon a base of writing and of broad knowledge. At least, that’s how I would classify my own education as belonging to the liberal arts: not by taking the same courses as other students, but by taking different ones then having conversations about our different trajectories. This framing even fits the narrative of CSPs being about the discovery and exploration of identity.

I suppose I should also consider sacrificing the writing competency and the broad multi-disciplinary focus. The case for the former was actually brought to my attention by a college. Their view was that the CSP’s current focus on writing is misguided, when there are so many other forms of scholarship, including various art forms, media, and even computer programs. To isolate writing as the exclusive product of academia is to exclude the scholars who produce in other ways, including not only artists and musicians and computer scientists (although not me), but also faculty who organize communities or advise national organizations. Instead of putting all of our eggs into writing, we should instead expand the CSP program so students see the alternate paths to being a productive member of society.

As for CSP allowing students to sample different fields, I think the best argument here is not that students should not do so, but that better ways to do so exist. One immediate thought I had was to enforce stricter distributional requirements – not only so many credits in each division, but a course in one of this list of departments, and so on. The obvious objection is that this encourages shallow memorization and disengagement as opposed to deep understanding, in which case perhaps the requirements should move away from being organized by disciplines to instead being organized by problems. Riffing off the identity theme, I can imagine a requirement that students must take two courses about personal identity, two courses about social identity, and two courses about global identity. Within each leitmotif are courses offered by multiple departments, from which students could choose; I can easily see computer science offering courses in all three. This actually doesn’t quite satisfy the goal of allowing students to sample – after all, they could take computer science courses in all three areas – but, with some assumptions about course content and instructor interest/competence, it should showcase how different fields of academia interact and provide different perspectives on the same issue.

As hopefully this entry so far has suggested, I don’t have an answer to CSP that will satisfy the entire faculty. I understand the value of each of the goals of the program, while simultaneously understand how each goal could be sacrificed in favor of the others. I think the point here should not be for me to come down on one side or the other, but to record my current thoughts, so that when this again comes up for discussion two, five, ten years down the line, I can see how my view has changed, so that I may more productively contribute to the discussion at that time.

Step 37: Examine the Core Program