Computer Science Principles is a 12-part record of the first offering of the University of Washington’s Computer Science Principles course, CSE120 in Winter 2011.
It was the last week of the quarter, the end of CSE120 and an extremely fun week. Because of the 42nd SIGCSE conference in Dallas, I missed Friday as did Susan, and so the final class was canceled by a vote of the students.
Narrative on Week’s Goals
Monday’s Encryption and Steganography lecture was one of the high points of the term, a big finish.
Calendar Entries for the Tenth Week
Lec 7 March: The lecture introduces encryption, briefly touching on the Caesar cipher, Private Key Encryption and an overview of Public Key Encryption, and then moves on to Steganography. Motivated by an example mentioned by Owen Astrachan, the material is taught by example wherein a photo, the guest is embedded into a host photograph to hide it. Because it is a way to ship pictures under the noses of repressive governments, I use a photo of a jubilant crowd in Cairo’s Tahrir Square as a guest photo,
and a tranquil photo of two men fishing on a foggy morning
as a host. After the process is explained, it is implemented and embedded picture is compared with the original. Then the class lines up for a class photo, which becomes the guest for another embedding.
Lab 8 March: Lab 08 is a simple XML styling exercise using XSL. The point is to solidify the ideas of using XSL as a styling agent for XML in order to support the final assignment. One student came to office hours afterwards to get help, but generally they had no difficulty with it, and most finished quickly.
Lec 9 March: This is not a lecture, but rather a walkthrough review of the second half of the term in preparation for the final.
Lab 10 March: No formal lab exercise is planned, but Brandon is on hand to help with the assignment.
Lec 11 March: Canceled due to the teaching staff attending the SIGCSE’s Symposium on Computer Science Education.
And How Did It Turn Out?
Monday’s encryption/steganography lecture was a terrific success. Students were skeptical when I said I would hide a photo in another. The idea of first restricting the photo to two bits per color per pixel worked well, leading to a discussion of the differences. Then, after the embedding the two images were compared – there is no apparent difference. But, because the original used jpeg representation, but and the embedded copy used png representation (to avoid the lossy compresson) there seemed to be a slight shading difference. I’m guessing that the difference tricked one student into claiming that there was a visible difference. This made the tineye.com searches for the host and the embedded photo, which come out the same, a compelling experiment to do. There was a reluctance to come up for a class photo (everyone’s wearing their “finals week” sweats), but in the photo the class is smiling, so I assume it wasn’t too “elementary school”. We embedded the class photo, and extracted it! With a little bit of time left, I passed out the student evaluation forms for them to critique the class.
After class I sent everyone the embedded class photo and told them how to extract it.
Tuesday’s lab apparently achieved its goals, because on Wednesday the students clearly understood the task.
Wednesday’s review, like its counterpart at the end of the first half, left the class in a grim frame of mind. It’s been a long time since I’ve had to explicitly take a test, but this seems odd. I would think it would be positive, because I mentioned lots of stuff that wouldn’t be on the exam, but apparently, I left too much stuff on the list that might be on it.
Thursday’s lab time turned into office hours for Brandon and a few students sought help.
Friday was a free day, though they still had to do the AIS.
The class ended with a bang rather than a whimper. Steganography being so impressive, it was a good way to remind them that they had learned a lot, and that the magic of computers and networks had been revealed, only to be replaced with a more fundamental kind of magic. The public doesn’t even know about recursion or steganography, but they do. Perhaps they seem magical to them, too.
This was the week of notation. There was no Processing programming. A couple of students mentioned that they appreciated the change of pace, and given that the goal is not to produce accomplished programmers, it is reasonable to lay off of Processing. And, this is important content.
Narrative on Week’s Goals
The week started with a bang with a guest lecture from CSE professor Zoran Popovic.
Calendar Entries for the Ninth Week
Lec 28 Feb: Zoran’s lecture starts with a quick review of graphics from his lab that are presently used in video game systems. But then he asks the class what problems to work on to make the world better. His list (the students mention them too) includes disease and poverty. He explains that because computers are great at some things and poor at others, and humans tend to have the opposite skills, it makes sense to combine their abilities rather than expect one of them alone to solve such difficult problems. Games, he points out, are an effective setting for the two to collaborate. He proceeds to discuss FoldIt and other games he has in the pipeline.
Lab 1 Mar: Lab 07 is a small CSS exercise to teach the students the styling basics of HTML and the concept of referencing information held in file, i.e. indirect reference. Also, with only one previous HTML assignment, this gives greater experience building Web pages.
Lec 2 Mar: A lecture on meta-data, tagging and XML. The presentation emphasizes the separation of content from processing and that XML can structure data without presupposing how it is to be processed. The three classifications of XML tags – identity, affinity and collection – are introduced; students show that they can recognize how the tags are used.
Assignment 18: This final assignment is suitable to be performed on a student’s personal machine. Indeed, the task – create a personal database using XML and displayed in the form of a diary – should be something that a student can use. The first part was to download a copy of picture display software (simpleviewer,) and notice how XML is used by the authors; using a single XML file to display several forms of the view shows the advantages of separating data from processing. The second part was to modify an XML file that implements a diary, adding five days of personal information. Finally, students are to add new XML tags and the corresponding XSL styling templates to implement them. It’s not a lot of work, but perhaps a little involved, as XML/XSL tends to be.
Lab 3 Mar: This was going to be an exercise to practice XML/XSL interaction [see Lab 8], but that topic is not presented until tomorrow. So students do the Part 1 of Assignment 18. Though it is originally designed to be done on a student’s own computer, it can be done in the lab, too, using publicly available .jpg files.
Lec 4 Mar: This lecture explains how the XML tags can be styled by a browser, based on XSL templates, and introduces the XSL tagging style to achieve it. This can be a very involved topic, but the lecture threads its way through an implementation, ending with suggestions for how the solution would be extended depending on the new types of data that are to be added to the XML file. This diagram seemed to be very effective as a guideline for what we are trying to achieve:
Illustration of How XSL styles XML
At the end Susan presents a series of quotations from the reflection component of the “Teach Scratch To Someone” assignment. This allows her to reinforce the purpose and value of the exercise, which some students were skeptical about.
And How Did It Turn Out?
Zoran’s lecture on Monday was – according to a couple of students – totally inspirational, a point I agree with. The class was engaged throughout the whole lecture. When asked on Wednesday what did they take away, that mentioned how important problems could be solved by human/computer collaboration.
In Tuesday’s lab one student finished in 15 minutes (obviously, someone with experience), but most took the whole hour and, according to Brandon, stumbled some. There was no consistent problem, apparently, and they’ve turned-in the work. As always, I wonder whether the point – indirect reference – every made it into any student’s conscious mind.
Wednesday’s tagging lecture was my first real attempt to teach this material to the beginners. I think it was successful, but as with earlier introductions to database topics, students don’t seem to find it captivating. They were following along, however, because when we got to tag classification part, they all jotted down the definitions and offered answers to my classification questions. Then it was back to zoning.
Thursday’s lab was routine. This evening, I was named “Teacher of the Year” by the campus Hellenic Women’s Association, possibly the first CS person ever to be recognized by that group.
Friday’s XML/XSL lecture came off well. One student who’d been out sick and hadn’t seen most of the prep came by after class to get caught up, and she caught on quickly, despite claiming she’d been lost in lecture. If students find the ability to customize their own meta-data to be interesting and useful, then the data portion of this class will have been a hit. We’ll see how it plays out.
Overall, it was a fun week for me, and also for those students I chatted with directly. The attendance was good all week, too, so my comments on the previous Friday may have made a difference. Although I’m looking forward to rapping it up next week, it would be wonderful to teach this class more computing courses.
This week marked the move into the final series of topics focusing on data and meta-data. With one more lecture that we will have in the future (I have to be at the SIGCSE conference to describe this class on the last day) I would do a relational database introduction to knit this together tightly. As it is, it’ll be loosely knitted, I guess.
Narrative on Week’s Goals
Without a doubt, the highlight of the week was a lecture by Prof. Richard Ladner of CSE on Accessibility. Richard is a pioneer in the area, and gives a lecture that is both practical and inspirational.
Calendar Entries for the Eighth Week
21 Feb: President’s Day national holiday.
Lab 22 Feb: Meeting in a classroom rather than the computer lab, the students hear a guest lecture from Prof. Richard Ladner of CSE. One of his points is that handicapped people, rather than being a “medical problem,” add diversity to our culture; the point of assistive technologies is to allow them to participate as full members of society. The lecture enumerates the evolution of various assistive technologies, and makes the point that technology developed for handicapped people is often generally useful – “curb cuts” used by baby strollers as well as wheelchairs was one non-electronic example. Computers can make the world better!
Lecture 23 Feb: The topics are advanced query formulation, structure of HTML, search engines and page rank. This turns out to be one topic too many, because I quit 10 minutes early so Susan can introduce the next homework assignment. Accordingly, page rank is flushed, despite a very slick example. The HTML part reduces the technology to three slides and an example. The motivation for introducing it (I hadn’t intended to do HTML) is to explain how a crawler works, and to prepare for tomorrows lab on HTML.
Assignment 16: Students are to teach themselves Scratch, spending at least three hours on the activity. They then write a comparison between Scratch and Processing. They prepare a “lesson” for teaching Scratch to someone else, which can take any form from a conventional lesson plan, to a song or animation. Then they give the lesson to someone and reflect on it.
Lab 24 Feb: This lab prepares for the XML discussion later. Students receive a cheat sheet of the most common HTML tags, and using the previous lecture’s 3-Slides-And-An-Example, do a lab in which they develop a Web page.
Lecture 25 Feb: The week ends on a high note as Susan presents her lecture on Debugging. It is a mix of her discussing principles and setting up exercises, and the students working in pairs to debug. She passes out a seven page Processing program (with standard color annotation). Cleverly, the Processing code they are debugging comes from one of the better Pair Programming games, turned in Wednesday. It has a clear problem that is easy to understand – she displays it on the screen – but it is not a trivial oversight. After the class works on debugging it, one of the students who wrote the code comes up and explains the bug and fixes it for the class.
And How Did It Work Out?
We are achieving our more modest pace, without a significant fall-off in content. Curiously – or maybe I mean, predictably – the more moderate pace harms attendance.
Tuesday’s – Ladner gave a great lecture, and it unambiguously makes the point that computers can improve the world. (He didn’t say it, but I would. And I would repeat the famous story about Stevie Wonder getting the first Kurzweil reading machine.) The content is unquestionably worthy of presentation, even if Ladner is not available to deliver it.
Wednesday’s – Though the lecture was “scored” as being one topic too many, I think it would have been fine given the full 50 minutes. That said, I’d change the lecture. The portion devoted to formulating good advanced queries, seemed not to connect with the class. I wonder if it is either (a) known or too obvious, or (b) unclear why they need to know that in a CS Principles class. If the latter, (but, I think it’s the former) I now think they are right. It really isn’t necessary.
As an aside, I had struggled to decide whether to present material (as we do in Fluency) about how to evaluate Web sites in terms of how authoritative the information is. I decided against it. It’s really important, but it’s not really CS Principles. That same line of reasoning should apply to query formulation. At this point, I think this is a crisp example of how Fluency and Principles classes differ. (Security is another topic that highlights the differences.)
In Thursday’s lab the activity to make a Web page went very well. I am extremely enamored with the 3-slides-and-an-example approach to HTML. The students effectively picked it up on their own, which has been a theme I’ve emphasized all term, but with limited – in my view – success until now. I am pretty sure the 3-s-a-a-ex worked (we’ll see when the numbers come in) based on the fact one student who has REALLY struggled all term came for a meeting right after lab. She was enthusiastic because she’d finally gotten lab material straightway rather than struggling, and she’d made her page, and finished before her former pair-partner. Such success can breed confidence, but because this was an open assignment – no specific Web page was required – it probably promotes creativity at some level, too.
Friday’s debugging lecture was very nice. The problem was that only half the class was present. (It was the first sunny day in a while (probably for the year) in Seattle, so playing hooky is not unheard of.) I mentioned it in email to the class, because under the circumstances (no book, rapid deployment, the need to be agile), material is mentioned in class that is needed for assignments and/or labs, but not available in the written documents.
I had not intended to do HTML in this class – it seemed like too much notation – but I really cannot see how to avoid it, given the coming coverage of XML. So, it is an “add on,” but I will definitely keep it. It’s easy, which has always been one reason to do it – and very tangible. Students see this stuff a lot, and if they actually start looking for it, they’ll see it everywhere.
One possibility is to move HTML earlier in the term, possibly after Lightbot and before Processing. This would have the advantage of raising the difficulty gradient a bit more slowly; it seemed almost discontinuous to me this time. This would also better support the “personal Web portfolio” idea of the second lab that is only limping along right now. The students could literally build the page themselves rather than modifying mine, as they did this time. And, we could make reference to HTML at other places in the class, which I recall wanting to do.
Of course, there are downsides. One is that the teaching it to yourself via 3-slides-and-an-example won’t work so well at that point. They are nubies. But, it could be restructured some so that much of the learning could be independent. That would be very good. It is also very far into the future when we return to it. They will remember well enough, I suspect, but maybe not. And, the lovely sequence from “functions” in Lightbot to functions in Processing will be interrupted by the HTML. This may not be much of a risk, because the only person who seemed to appreciate this idea we me!
It was propitious that IBM’s Watson machine was playing Jeopardy this week. I reorganized the lectures so I could introduce the AI material before the competition. Then, on Tuesday we had a small reception with pizza and salad before going to a screening of the second night’s competition. It furthered the “more relaxed” feel of the courses’ second half.
Narrative on Week’s Goals
AI would normally have been taught later in the term, mostly as a “pick up” topic, as it seems somewhat secondary to the big ideas. Moving it was effective.
Lecture 14 Feb: I augment what I think of as a “standard” introductory AI lecture with Watson-related material. Having chatted with non-techies over the weekend and found that most people don’t see it as a big deal, I decide to give an explanation of why chess is easier than understanding a pun.
Lab 15 Feb: It was an opportunity to work on pair programming with assistance available. Most teams had already been checked off, and so they started work. I check off two more in lab, but still, not every pair has been approved.
Lecture 16 Feb: The topic was the Internet, IP, Ethernet and related matters. The goal, like all of the technology lectures, is to remove the “magic” of networking, and show it as a completely practical and understandable process. The analogies – Cerf’s, IP is like sending a novel by postcards, Ethernet is like a conversation at a cocktail party – make these concepts accessible.
Lab 17 Feb: More time for pair programming with Brandon available.
Lecture 18 Feb: The topic is how the Domain Name System translates domain names like spiff.cs.washington.edu to 126.96.36.199. This is also a chance to talk about physical and logical forms of a phenomenon such as computer names. Finally, it is important to discuss the design issues that arise in creating the DNS, such as robustness, fault tolerance, redundancy, and other systems design concepts. I also include “thinking at scale.”
And How Did It Work Out?
Overall, the excitement about Watson was shared by only a couple of students in class. Generally, most saw it as just a publicity stunt.
Monday’s AI lecture was fine, but I think I failed – and the prep material failed – to persuade the class that what Watson was doing was amazing. Chess still seems to be tougher than puns in their minds. The topic of AI is always engaging; they immediately landed on emotions as a stumper topic for the Turing Test. The creativity part of the lecture was less effective than in previous classes I think, possibly because they had struggled enough with Albers that it had become a painful topic. I don’t know.
Tuesday’s pair programming engendered a lot of apparent enjoyment in lab. The teammates appeared to be more “equal” when they were the same sex, probably an obvious observation.
Wednesday’s Internet lecture also held the class’ interest. There were questions about interacting with ISPs unrelated to the lecture. The analogies worked, as usual, and everyone seemed to get them.
On Thursday, another day of pair programming … the excitement has evaporated, and now the hard programming and debugging have consumed the students. In conversation, they are definitely positive about it, though.
Friday’s lecture was my first try at an introductory DNS lecture, and I pronounce it a complete success. I had originally thought that I was belaboring the “problem,” since I seemed to be saying it in three different ways. But in reality, it was probably right: They understood what the problem was, and one student essentially figured out the process based only on the underlying mechanisms. The next slide showed that her guess was correct. Indeed, the setup problem that was going to promote more discussion — how can I log in from Miami to my computer in Seattle — kind of flopped, because the class had already gotten the idea, and why belabor it?
My cartoons of the idealized authoritative name servers – one for a domain of machines and one for a domain of domains – seemed to be easily comprehended.
Diagrams of the two extreme cases for authoritative name servers.
On balance it was a very positive week. The pair programming is getting rave reviews from virtually the whole class (apparently, one pair are dissenters). And the pace is more civilized, too.
But, without a doubt the best part of the week was that I got a lot of face time with the students. First, they had to come in in pairs to discuss their project. This was fun because they only had to explain it, and it was fun to joke around about what they are doing.
Also, they came in one at a time to correct their mid-term tests. (At Susan’s suggestion, they were allowed to work out the solutions to the problems they missed, come in with the correct answers, explain them to me and get (up to) half credit restored.) Though I was initially skeptical, this turned out to be a tremendous benefit in terms of finding out first hand what they understood, and what they didn’t. Also, in a couple of cases where they still couldn’t do a problem (usually the function for figuring total money in dollars from a bunch of coins), I would step through the process with each one. This exercise (which was really valuable) showed me that I need to emphasize still more that thinking of the computation from the code’s point of view is essential. I doubt it can be over-emphasized.
Uncharacteristically for me, CS Principles has covered functions, functional abstraction and creativity heavily, and not mentioned algorithms much at all. It reflects, I think, the big ideas pressure to faithfully handle tough concepts, which for me means taking aim at them at the start and staying on target. Easier topics such as algorithms can come along when the trajectory is established. So, this week we gave a definition of algorithm, did recursion, and addressed correctness.
Narrative on Week’s Goals
The weekly calendar shows that Monday was the midterm exam, and students got Tuesday off, since they have been working so hard.
Calendar Entries for the Sixth Week
Midterm 7 Feb: Being at an ACM Education Council meeting over the weekend, I’d selected this day for the mid-term. The exam was mostly short answer and a few multiple choice questions tossed in. I had allowed each student to bring a single, handwritten sheet of notes to the exam to thwart the anxiety of “memorizing” stuff.
Lab 8 Feb: Class canceled.
Lecture 9 Feb: The topic was Algorithms, and I believe it is now generally less intimidating than it was a decade ago. Students have apparently heard it a lot. I gave the standard Knuthian definition, and then moved on to recursion. My goal was simply to explain it without making it into any sort of big deal. (There had been a request for everyone to return to the Lightbot recursion problems as a refresher.) Standards like fact( ), fib( ), sierpinski( ) are given. The scoping of formal parameters is explained in order to show how recursive functions are executed. Finally as an antidote to the orderliness of sierpinski( ) I show a Processing Reference Library program for recursive random circles. The first three levels are easy to see.
Recursive random circle program from the Processing reference library.
Assignment 14: The assignment is to use a program for a recursive enumeration as the basis for a different recursive enumeration. The purpose is to work from a closely related program as a guideline.
Lab 10 Feb: Time to work on the recursive enumeration with Brandon’s help.
Lecture 11 Feb: The lecture asks the question, how do you know that your program computes what you think it does. This is a “correctness” lecture, and I use sorting for the purpose. The main point is emphasized by noticing the comparison patterns of Exchange sort and Bubble sort; they are different, but each is the basis for arguing that it works as claimed.
With twenty minutes of lecture left, Susan takes over to present the concept of Pair Programming, and to introduce an assignment that uses the methodology. Using the responses from a survey collected in the previous lecture, she assigns pairs based first on matching their abilities, and secondly on finding compatible schedules so the teams could meet.
Assignment 15: Pair Programming. Develop a game using processing. Any game is OK provided it isn’t beyond the team’s programming skills. First the game has to be developed on paper, and treat the following topics: rules, description of play, clear way to win, clear way to lose, and how the game can be restarted without being rerun. The plan must be approved by someone on the teaching staff. The teams can only work on the computation when they are together, and only one of them is allowed to type. Goals include learning how to describe computation to a colleague.
And How Did It Work Out?
Monday’s midterm exam showed that students had acquired a good understanding of factual material, could write a standard Processing program (essentially, a portion of their second lab on Processing), and are still struggling some with details of functions, such as using void when there is a return value. Among the remarkable-to-me results was that all students got all points on the binary addition question, implying that I don’t have to ask that one again. (More analysis of the exam when it’s in.) The single sheet of notes worked well.
Wednesday’s recursion lecture was reportedly engaging by a substantial portion of the class, which was my assessment, too. The goal of presenting recursion without making it so important that it becomes something to panic about seems to have been achieved. It was a waste to explain the formal parameter scoping needed to explain why recursive programs “work”. No one was interested in it. I won’t do it again.
(In this class especially considering that the material is (to me) fascinating, and deep, there is always the issue of when to “quit”. I believe explaining parameter scoping is not the first time I’ve crossed over the line this term, and a postmortem would be indicated to find other instances.)
Thursday’s lab was frustrating for Brandon because the students were supposed to use strange UTF-8 characters (♥) and there are apparently bugs in Processing’s ability to include these in a computation. Most students got it to work, but that complication coupled with the student’s habit of not reading the instructions, kept it from being the “programming by analogy” success I was hoping for.
Friday’s lecture was extremely satisfying. The students followed along well, and I was able to make the “know why your code’s correct” point without the dreadful detail used in, for example, the Fluency with Information Technology book, Ch. 10. The key was to use schematics of the traces of the binary comparisons.
Comparison Patterns for a 5-element Exchange sort (l) and 5-element Bubble Sort (r); time goes down.
I believe these two diagrams effectively made the point that algorithms operate differently, but there is an abstraction for any one of them that can be used to reason why it is does what’s claimed for it, i.e. sort.
OK, so students were following along, and I was making my points. But when Susan took over to do pair programming, the whole behavior of the class changed: they straightened up, paid close attention, answered and asked questions. They became the definition of engaged!
Thanks to her, the week ended on a high note. We entered a new regime with more time for assignments, more discussion, and more variation in what we do. It’s more relaxed. This has been greeted with approval.
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 13th 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?
A major challenge in the AP CS Principles curriculum is teaching Big Idea #1, “Computing is a creative human activity.” It’s number one on the Big Idea list, which seems appropriate because it is one of the best features of the field. Some students are naturally creative, and they hardly need the point explained, but for most of my students, I believe this point is best “taught” by giving them opportunities to be creative, and guidance in how they might proceed. Much of this week was spent devoted to that goal.
Narrative on Week’s Goals
The weekly calendar shows that Monday’s assignment was a week of “unconstrained programming,”
Calendar Entries for the Fourth Week
Lecture 24 Jan: The lecture began by cleaning up a few details about Processing syntax and execution. Then we returned to the Albers in a Click topic to explain why I had assigned it. (It was by now a program of the past, and whatever frustration might have been engendered while programming it was gone now.) Besides being a cool application, it was making the point that computational artifacts can raise questions in other fields, this one being art. (It’s not an art class, so we were not going to answer the questions.) An example was, “If programs can create work similar to Mondrian, Pollack and Albers – famous artists of the 20th century – using random numbers, what role did the actual production of the art by these men play in their work?” “Would they have done different work if they could have experimented this easily?”
After that, the main lecture content was a firm technical foundation for RGB color, including explaining the mystery of why yellow is the combination of Red and Green. Then the task of turning “husky purple” redder became a pretext for introducing binary arithmetic, as we added intensity to Red in several steps.
Assignment 09: The assignment – it was divided into two parts – was to create four programs in Processing that would display something on the screen that would hold a person’s interest for a few moments. Four examples were given with the assignment; see the class examples page, http://www.cs.washington.edu/education/courses/cse120/11wi/classexamples.html. Two programs were to be turned in Wednesday, and two turned in on Friday.
Lab 25 Jan: The lab practiced binary addition, per the preceding lecture. Then, in the free time, students worked on their assignments. This had the benefit that they could ask Brandon for help.
Lecture 26 Jan: The lecture opened with a short description of how to print text on the screen in Processing; (it’s a graphics language, text is harder, figures are easier). Then we moved on to the fetch/execute cycle and the components of a computer. We worked through the standard content, including instruction interpretation. A full example was illustrated.
In the last five minutes, the lecture finished with an explanation of the operation of an nMOS transistor; this was motivated by the ALU evaluation of
AND <operand>, <operand>, <operand>.
I told the class that this was for their own interest and would not be on any test.
Assignment 10: It is a continuation of the last assignment.
Lab 27 Jan: This was time to work on the assignment. All but one student was present and worked steadily.
Lecture 28 Jan: The lecture began by introducing the basics of functions, including parameters and the Processing syntax and semantics. This was followed by a demo in which a timer was developed in several layers (6) of abstraction. The base layer drew the hexagonal element and it built from there. The top level ran the image at the frameRate(10), allowing the time to count “1” with each image refresh.
Timer used In Demonstrating Layered Software Development
Assignment 11: The assignment was to apply the ideas of functional abstraction exhibited in the lecture to the creation of the Sudoku GUI. The solution probably “requires” one less layer of abstraction, but it is plenty challenging for the students.
And How Did It Work?
Nearly all of the students rated the “free programming” assignments of the week as the best part, the most fun and engaging. They appreciated the flexibility of managing their time better according to the After Image survey. I adopted the new-assignment-every-two-days approach to bring the class up to speed with the programming, but now I think we can be much more flexible in the last half of the term.
The results of the “free programming” were quite variable, but most students did something quite ingenious even with their limited knowledge of programming. Several of them tried new things on their own out of the reference materials. Only the few who are really not getting the concepts failed to express themselves through programming.
Monday’s lecture was more relaxed, as planned. It was curious in two ways. First, the miracle of colored light, and the differences it has with our usual experience with pigment seemed to hold the students’ attention, but they didn’t seem to be much interested in it. We then pushed on to do binary addition, and curiously, they were interested in that.
Then, in Tuesday’s lab, Brandon practiced with them on doing addition. Later, in the After Image Survey, someone complained that they only learned about how to do binary arithmetic, but didn’t actually use it. (I thought that was what computers were for!) The bottom line: binary, interesting; light, uninteresting.
Wednesday’s lecture continued the more informal style, which went well. The informal chatter at the start concerned printing on the screen, and everyone seemed attentive; later I heard that several students had tried it successfully. The topic of how a computer works was of interest, and the indirect reference to data through the memory seemed to go across easily. Good. In the “Department of Surprises”: when I finished up with how an nMOS transistor works in silicon – a true miracle of the universe – exactly three people seemed to be interested. The rest of them, having been told that it wouldn’t be on the test – simply packed up their papers and waited for me to quit talking.
Thursday’s lab had students work on their “free programming” assignment. I’d expected Brandon would have to deal with fairly exotic problems as the students’ dreams outpaced their capabilities, but his report was contrary. There were only a modest number of questions, and most students just worked diligently on the assignments.
Friday’s lecture, which I’d looked forward to as a great chance to program in class and guide students through functions went well, but it wasn’t as much fun (for me) as I’d hoped. At the last minute I decided not to actually do the typing real time – the code was already in the slides so we could just go through it – and this meant that we did get all the way through the material. I did show off the app running. My best idea was to create a listing of the code for the students and to distribute it. This meant that students could follow along despite the fact that the displayed program text is necessarily tiny, and about 1/3 of it is too low to view beyond the second row of seats. So, in the end the decision not to develop the code in real time was probably right, but where’s the fun???
When the lecture was over, a student came forward with a question about “formal-actual correspondence,” which is the property that arguments to a function must correspond 1-to-1 to the parameters. I’d left that out. It’s a danger of the first time through, and probably would have come in the patter had I actually done the programming. So, I hurriedly made two slides and revised the posted version of the slides to include that material. I appreciated her question; it saved a lot of confusion.
From the student perspective, it was a great week. They had a chance to program, pretty much unconstrained by anything other than the computer itself. And I got them to see computers as a place where “human intent” can be expressed.
It was a short week because Monday’s holiday (MLK Birthday Celebration), but there was progress in learning the Processing language. The students described themselves a very engaged in learning it, and enjoyed the assignments.
Narrative on Week’s Goals
The content of the week is summarized by the calendar:
Calendar for Week 3
Lab 18 Jan: The lab exercise was to move a colored box across the Processing canvas as a simple exercise in using variables, declarations, assignments and expressions. Most students finished the task within the allotted time; three did not, but they completed it shortly after class.
Lecture 19 Jan: The lecture was a programming demonstration, designed to work with a new language feature (arcs) that required study of the documentation. The point was to illustrate incremental program development, to introduce of the mod (%) operator, and to emphasize programming as a directed process implementing human intent. The task was to program Pacman (yes, the ancient video game) to move across the screen eating pills.
Pacman Lecture Exercise
Assignment 07: Construct the Blinky ghost from the Pacman game, and using variables and expressions make its eyes move; this is preparation for the next assignment that uses mouse motions to control the ghost.
Lab 20 Jan: The lab returned to the myCSP.html Web page that the students posted in their second lab. Now with Processing capable of generating an applet to display in a browser, this lab was devoted to explaining how to modify their portfolio page, transfer the files and link them in to their page.
Lecture 21 Jan: The lecture introduced if-statements and for-statements, but also reviewed the other features of Processing that we’ve had previously in order that all of the material be in one place. There was emphasis on other resources that could be consulted.
Assignment 08: Building on the Blinky ghost code from the last assignment, make the ghost move left or right depending on whether the mouse is left or right of the ghost; make the eyes adjust to the direction of motion, and toggle color (between red and yellow) on mouse clicks.
And How Did It Work?
Student interest in Processing continued to be “strongly engaged”, despite the not-infrequent stumbles in getting it right.
On separate mornings this week two women came in to chat. To my astonishment both made the same two points: The were not technical majors (Communications, I think in both cases) and didn’t expect to like this class – but they do – and further, not being technically inclined, they didn’t expect to do well in the class – but are. This is exactly the end state of this effort, so with any luck we can carry this through and have it apply to everyone.
At the other end of the spectrum, I asked another student to come by to discuss her homework. (One benefit of this study is that we are watching students carefully, and when they don’t deliver, we know immediately.) She seemed not to be investing the time required to actually learn the material in the assignments, and so continued days later not to understand the basics. I explained that it was an accumulating class and that in the future she would have to use material she was studying today. It was a friendly enough conversation, but it contrasted amazingly with the two others.
Tuesday’s lab was very successful. It was an easy assignment, and the students knew what they needed to know to be successful. It was definitely confidence builder.
Wednesday’s lecture engendered some discussion, and in a couple of cases some very clever suggestions – the students are thinking. The mod operator was new and they grasped both the operation and use. However, I felt that the lecture did grub around in very low-level details – antialiasing for instance was mentioned to redraw the image cleanly – that just didn’t need to be covered. In the After Image survey, one student complained that it was a boring lecture, but was out-voted by five others that thought it was engaging. I’m of mixed mind on it.
Thursday’s lab was a hit. Students were happy to get their work out in a publicly available form. This also served to solidify the value of mycsp.html.
Friday’s lecture was the laundry list of facilities that we are using in this month’s programming in order to have it one place. The things that I had already taught were reviewed, to good effect, I think. It definitely took more time than I had planned for. And I got through the rest of the material, but not the last application of mod, which I’d planned to reinforce Wednesday’s lecture.
The “Blinky Assignments” (Wednesday and Friday) were very well received by 80% of the students, though again the After Image included one student thinking it was boring. (Who is this person???) I think the value of this one was that students were pretty much in control of the whole process and though it presented plenty of challenges, they were challenges that they could over come. In office hours students comment about the great feeling of “getting it”!
The students continue to be engaged and to like programming. The After Image Survey continues to reveal that they are most interested in it, as opposed to the “principles part” of the course. Given that the class was advertised as NOT turning them into programmers (and it won’t), they seem very eager to head in that direction.
With the completion of the third week, I have decided that I need to reduce the formality of the class, and make it more chalk-talky. The students like the class; I like the students … let’s try to make it more casual. I’ll start that Monday.
Although it turned out that the first week was completely adequate in my view to excite the students, I stayed with my original plan of emphasizing the breadth of the class. So, they had to program and write an essay in their assignments. In the weekly After Image survey in which students say what they thought of the class, apparently a few thought this was unfair – why isn’t it all programming, they asked?!
Narrative on Week’s Goals
The week’s plan, as described on the class Web site’s calendar page, is:
Week 2 Calendar Entries
The overall goals were a continuation of the first week’s, namely to show an interesting, diverse and substantive class. The first week had built a cohesive group of students; the second week solidified it further. Specifically,
Lecture 10 Jan: A Social Contract The lecture mostly focuses on privacy and ways online behavior – chiefly invasion of privacy – is harmful. It opens with the word “offensensitivity” — a word invented in the Bloom County cartoon, referring to being overly sensitive to offense — and covers how it applies to online discussion groups. (No one in class had ever heard of Bloom County.) Classic Web memes – Star Wars Kid, Numa Numa Guy, and others – led to the definition of privacy and an analysis of online behavior, ending with five things to avoid posting on social network pages.
Assignment 04: Write an essay on the topic, “Is it ever right to post surreptitiously acquired digital content?” where “surreptitiously acquired” was defined to mean gotten without the creator’s knowledge. The essay was to be two pages minimum and received a due-day extension.
Lab 11 Jan: The lab, continuing the binary theme of the previous Friday, introduced counting in binary, number representation, counting in hexadecimal and converting back and forth between them (and decimal).
Lecture 12 Jan: This was the first Processing lecture. The focus was to familiarize students with the Processing language, and to demonstrate writing a few simple programs. These are available on the Class Examples Web page: http://www.cs.washington.edu/education/courses/cse120/11wi/classexamples.html.
Assignment 05: The students were given the code for the cute robot from Reas and Fry’s Getting Started with Processing, and asked to color it in their own style – coloring it was part of the previous lecture – and then make it move across the screen. This was simply to give practice using the system’s IDE.
Lab 13 Jan: This lab was devoted entirely to helping the students with the details of programming in Processing. Both Brandon and Susan attended to help students.
Lecture 14 Jan: Having represented numbers in binary on Tuesday, this lecture was devoted to representing letters in binary. It covered ASCII, UTF-8 and alternative forms of communication. It also treated meta-data briefly, making the point that meta-data uses the same character encoding as the content characters, but was identified by reserved characters, namely < >.
Assignment 06: Students were asked to scan paintings by Piet Mondrian, and then play with a “Mondrian In A Click” site. Next they were to scan paintings by Jackson Pollack, and then play with a “Pollack In A Click” site. Finally, they were to scan paintings by Josef Albers, and then program an “Albers In A Click” site. See the Class Examples Web page.
Screen Shot of Albers In A Click Solution
Assignment 06.1 Extra Credit: To give more practice using the IDE, students were asked to fill in a closed region with space-filling color.
Email 15 Jan: Students were sent a brief email message in binary based on the ASCII encoding of Friday’s lecture.
And How Did It Work?
Again, it was a good week. The class is very cohesive at this point; attendance essentially perfect and students tell me in advance of their absences.
Monday’s lecture on privacy was somewhat surprising in that when asked about various Web memes, only about half of the class was familiar with them. One has the feeling that they are universally known, but apparently not. The discussion was lighter than what one might have expected on such a familiar topic; privacy seemed not to be a burning issue.
Tuesday’s lab ended up stressing conversion between binary and decimal, and less on conversion between binary and hexadecimal, the emphasis that I would prefer. The dynamics in every class are different.
Wednesday’s lecture on Processing gripped the class. They were interested from the start, and stayed interested. There were some questions, but mostly they paid close attention to what I did. I believe they quickly acquired the operational details of setting up a program, highlighted keywords, entering code, testing it, etc. Less effective – naturally – was their acquisition of details of the commands. Another benefit of the early treatment of functions in connection with Lightbot is that there was a general familiarity with appending parentheses to everything. It’s a fun language and they got that right away.
First Processing Assignment: (a) full credit, correct [FN]; (b) on beyond: beam follows cursor, moves right, or left when mouse pressed [RDH].
Thursday’s lab largely confirmed the quick acquisition of Processing basics. Except for a couple of students, everyone completed Assignment 05 by the end of the lab, and were successful. It wasn’t a monumental program, but they’d definitely personalized it. One student pushed well beyond the assignment to add several clever embellishments.
Friday’s lecture held student interest well, though compared to the last two Wednesdays (functional abstraction and Processing) it wasn’t as captivating. They did understand the content based on a few students replying to my weekend binary email with return binary email.
Not all students were successful with the “Albers In A Click” homework. To its credit it is easy to see what is intended. However, as often happens with early programming assignments, students needed to understand several concepts – variables, declarations, random numbers, colors – to be successful at the assignment. I estimate that half did, and most of the rest got some random colors, but didn’t actually get the logic to assign the colors properly. Because it is nearly impossible to gradually introduce programming concepts AND produce interesting assignments right along, based only on the few concepts available, I am still undecided about whether this assignment stays in the curriculum or goes.
The class is rolling and the students seem to be enjoying it. Reportedly, the After Image Survey revealed that the students really enjoyed the Processing material, both class and lab. The fact that it is a fun language has more to do with their liking it than the quality of the classes, I’m sure. Still, you learn more when you like what you’re doing, so I am optimistic that we’ll be able to cover a lot more content as a result. Although the other pilots have chosen to use either Alice or Scratch to teach programming as a “fun” activity, I will continue to advocate for Processing. I am certain that my students see Processing as fun; I conjecture none of them sees it as childish.
How will next week go when the programming gets more challenging?