CSE120 Computer Science Principles

 

Course Materials Distribution

   
 
This page contains the nearly complete set of resources used to teach CSE120 Computer Science Principles (Wi 11). These are available (see specifics below) to instructors at not-for-profit educational institutions for course development. To assist in their adoption, several brief commentaries are included describing course high points, mistakes and ideas for further improvements.
  

All men having PowerPoint ought to be distrusted to a certain degree. - James Madison
-- Justin Hunter in Famous Quotes that Make Just as Much Sense
When You Substitute PowerPoint for Power

Topic List

  • The "Experiment"
  • Copyright
  • Resources
  • Catalog Information
  • Top Level View of the Course
  • Comments -- What worked, what bombed and what you need to know
  • Final Thoughts

The "Experiment"

Computer Science Principles was a pilot course offered in Winter 2011 as part of the AP Computer Science Principles Project. The goal was to create a curriculum for a new high school Advanced Placement course that is appropriate for general students. Check these links for further information on the overall effort.

Copyright

Copyright Status of Previously Existing Content: The materials were developed for and only used for classroom instruction in Winter Quarter 2011 at the University of Washington under the educational provision of the fair-use exclusion. No effort has been made to establish the copyright status of any of the works used; teachers should refer to the primary source for a copy to use in their classrooms.

Copyright Status of the newly Created Content Unless otherwise noted all content was created by Lawrence Snyder and is copyrighted. Permission is hereby granted to use the content for instructional purposes at not-for-profit educational institutions provided the notice "(c) Lawrence Snyder 2009-2011 All Rights Reserved - Used by Permission" accompanies the material. Other uses require written permission.

Resources

The content for the course has been grouped in order to expedite its acqusition. Other combinations can be prepared -- send email.

File Formats Because campus Tech Support policies often prevent downloading files with certain file extensions (for example .zip), the compressed files are provided without extension. Recipients will have to rename the files to add file extensions for 'double click open'. The naming convention is
      filenameDOText
which should be renamed to filename.ext.

Catalog Information

  • Course Number CSE 120
  • Course Title: Computer Science Principles
  • Offering [pilot]: Winter Quarter (10 weeks), 2011
  • Lectures [50 minutes]: Monday, Wednesday, Friday 12:30-1:20, LOW 216
  • Labs [closed, 50 minutes]: Tuesday, Thursday 12:30-1:20; MGH 044
  • Credit Hours: 5
  • Fulfills Requirements: Quantitative and Symbolic Reasoning
  • Pre-requistes: None
  • Textbooks:
    • Getting Started with Processing by Casey Reas and Ben Fry, O'Reilly 2010
    • Blown To Bits: Your Life, Liberty and Happiness After The Digital Explosion by Hal Abelson, Ken Leeden and Harry Lewis, 2010; find it at online booksellers. Online Edition
  • Description: Fundamentals of computer science essential for educated people living in the 21st C, taught with two concurrent themes. Creativity Theme topics: Computing as a creative activity, processing of data creates knowledge, abstraction, levels of abstraction, managing complexity, , computational thinking, programming (in Processing language) debugging. Principles Theme topics: Data and information, algorithms, basic ideas behind technologies including computers, networks, search engines, and multimedia. Social uses and abuses of information, and the foundations of privacy.

Top Level View of Course

These are properties of the course that I tried (or didn't try) to achieve.

  • The students were purposely chosen not to include anyone who had taken a CS course. It was composed of half men and half women, was diverse, and was mostly freshmen and sophmores; about half of the class intended technical (science or engineering) majors.
  • I tried for an "entering freshmen" level of difficulty; it came out slightly higher, I think.
  • I intended to have a small assignment with each lecture; small means "can be done in 2 hours by most students," which works out to 1 hour of homework per day. Students were told at the start that they would be expected to spend an hour a day in front of a computer working on this class. I didn't always achieve "small" and the pace became relentless for both me and the students. Further, larger projects, which we moved to later in the term, are also a key part of the curriculum. I believe that this approach helped the class learn Processing fast, and the only change would be to achieve "small".
  • I literally tried to implement the "two threads" -- concepts and capabilities -- but it was not wholly successful. Students thought we were jumping around during the first few weeks. I ultimately settled into a pattern of some of each in each lecture.
  • Students work harder in this class than most of them are accustomed to doing, but gauging the difficulty of the problems will generally create a reward worthy of the effort.
  • A universal and consistent complaint is that the assignments were too long, that is, too much text. It is a fact in computer science courses that assignments are long. They are long because usually you are asking them to program something, and it's necessary to say explicitly what happens in all of the various cases.
  • A universal and consistent consequence of long assignments is that students don't read them. Nothing seems to work to get them to read, including pointing out that it almost always saves time.

Comments -- What Worked, What Bombed, What You Need To Know

Here is a distilled commentary on the course, giving my thoughts on how it went, and where to find more information on topics. Note that the development blog written while I was teaching the class has more specifics

The Calendar gives an overview of the sequencing; all items below are presented in calendar order and retain calendar numbering.

If you do not know the Processing language, either use the online tutorials, which are excellent, or follow the Reas and Fry book, which is also excellent. If you already program, then you are probably ready to teach once you've written a dozen programs, which in this language is extremely easy and fun.

References such as FIT4:224-232 refer to parts of Fluency with Information Technology, 4th Ed., Addison Wesley, 2010, which describe the nature of my thinking on a topic.

  • Week 1

    • Lecture 01: Standard 1st day of class stuff. Encourage students to use a modern browser such as Firefox or Chrome; it will matter later.
    • Assignment 01: Play with Lightbot 2.0 and notice the basic ideas of programming. All that is required is to reflect on the effort. These make interesting reading, because it is possible to see the nacent programming characteristic of persistence.

    • Lab 01: In the first 15 minutes, students write an essay on the principles they hold and why they are important to them; see the Week 1 Blog entry for further explanation. Following the essay, students were introduced to the campus file servers and how to use FTP to access them.

    • Lecture 02: Lightbot introduces a nice list of computing concepts from "commanding" to "program counter or instruction pointer." Because it also introduces functions, it is possible to start on Functional Abstraction, which I'm taking casually to mean packaging operations into functions. (We return to functions repeatedly.) Today, all that is necessary is getting down with the topics summarized in the last slide.
    • Assignment 02: The point of this assignment is simply to shift from a icon-based programming setting to a symbolic programming setting in anticipation of programming in Processing. It is a non-trivial intellectual transistion for students.

    • Lab 02: Set Up A Web Page. This lab is to make the point that in computing the instructions to the computer have to make sense, and you may know enough to figure out what is going on even if you don't think its possible. Students practice FTP, and they modify a Web page using a text editor. We had technical difficulties with student accounts, but for those whose accounts worked properly, the lab seemed successful.

    • Lecture 03: The march of game changing technologies. The discussion of digitization and the representation of bits via a PandA encoding FIT4:224-232 are a key take home. Transistors and integration FIT4:267-274 are unquestionably the next most import "game changer." Computers, Internet and WWW are covered more later.
    • Assignment 03: Continuing the transistion to symbolic programming. My TA questioned whether the students knew that the "moon walk" was, so an explanation may be useful.

    Starting with Lightbot 2.0 was very successful -- really a perfect way to introduce computation. In lecture 02 I will lighten up a little on Function Abstraction next time, emphasizing instead the basic ideas of execution, and the value of having functions to simplify programming. Also, in lab 02 practiced FTP and students were supposed to post a canned Web page to be used as a portfolio; I now think the Web portfolio is premature; there's another chance later. Moving files with FTP is a tough topic, and worth this extra practice.
  • Week 2

    • Lecture 04: Computers in a social setting. Most of us are completely familiar with the issues. A privacy primer is at FIT4:374-383 . Current information is available at the Electronic Frountier Foundation.
    • Assignment 04: Write an essay about posting private information on the Web.

    • Lab: Basic discussion of hexadecimal (FIT4:231-233) and binary representation (FIT4:302-309 ).

    • Lecture 05: The first introducation to Processing. The point of this lecture is to walk the class through Processing ... it could be a lab, but I think seeing it before (privately) trying it is actually better. The lecture demos the Snow Angel to see how to create, save and run a program, and it demos coloring the Reas-Fry Robot to show how to look at the code and figure out what it's doing, admittedly with comments available. These simply provide a context for the patter so they see what's happening, and can ask questions.
    • Assignment 05: Color the Reas-Fry Robot and make it move. This assignment attempted to use a survey to walk the students through the animation of the robot, but it was not very successful. It might be better to divide the assignment into the coloring activity before a lecture on variables, declarations and expressions, and then the animation afterward.

    • Lab: Processing practice; help mostly with Assignment 5.

    • Lecture 06: The lecture mostly concerns bytes of information; FIT4:233-241 . I believe this to be information better read than lectured on, but w/o a textbook, there's little choice.
    • Assignment 06: The "Albers In A Click" program seemed really fun to me, but it turned out to present too steep a learning gradient. Assigning it over a weekend without a lab didn't help. As typical, students do not read assignments as long as this, but start doing stuff immediately and confuse the daylights out of themselves. Assignment 06 will be easier next time, trying to lower the learning gradient. I like the assignment very much, and plan to figure out how to make it more reasonable.
    • Assignment 06x: An extra credit assignment designed to encourage students to sit in front of the Processing IDE and use it for a sustained period to get comfortable with it. Since the main assignment was so hard, this seemed like "piling on" to some.

    Another good week. Lecture-wise, lecture 06 can be revised to dump the "diving bell" stuff at the start, which didn't seem to matter, and do a little Processing chat on variables and types, especially char. Look at its binary representation. The biggest problem was assignment 06 Albers In A Click, it was just too much harder than assignment 05. We need to lower the gradient, probably by pushing this assignment one slot, working more on "click interaction" and using variables to support it. I like the idea of an extra credit assignment to give students more interaction with Processing, but 06x was only average.
  • Week 3

    • No Class

    • Lab 03: The task is to program a simple animation. The assignment was designed to solidify the students' understanding of several recent topics. It was also designed to motivate them to read the assignment through. It was successful.

    • Lecture 07: Pacman in Processing. This is another "demo lecture" with the goal to explain more about Processing and connect to the Reas/Fry textbook by drawing the unfamiliar image of an arc. No specific preparation is required beyond familiarity with the computations, which are all displayed.
    • Assignment 07: The task is to draw Binky, the ghost from Pacman. (I don't know why Pacman was on my mind!) The goals of the assignment are to get more time working in the Processing IDE, following directions, and abstracting the positions for the eyes, a topic we returned to in lecture.

    • Lab 04: The lab reprises the FTP lab (lab 02) and assists students in setting up their 'mycsp.html' Web page portfolio. Knowledge of local Web service is required, in addition to familiarity with linking to Processing's Web applet. This should probably be revised to make the point that you can look at the code (HTML in this case) that you don't really understand and with a little thinking figure out what is going on.

    • Lecture 08: Pacman in Processing, another "demo lecture" with the goal to explain more about Processing and connect to the textbook by drawing the unfamiliar image of an arc. No specific preparation is required beyond familiarity with the computations, which are all displayed.
    • Assignment 08: Animating Binky turned out to be fun for most students, but because of the "fire hose" of new concepts sprayed at them in the last week, students who were not staying current were totally lost. There were plenty of questions at office hours. I would caution students on this possibility in the future.

    Processing has been a much easier language for students to acquire than any I've taught before. A holiday (MLKing's birthday) caused us to miss a lecture. An important point of lecture 07, that students should consult the book when they have programming issues, was lost in the complexity of Pacman. Next time, pick a different problem with less complexity, but that still covers mod. I might include an auxiliary function just as prep for later discussions.
  • Week 4

    • Lecture 09: I started with a casual discussion of how computation can raise interersting questions in other areas. We returned to the assignment 06 art work, and discussed the role of the actual art (here mechanically approximated rather than created with paint) in an artist's conceptual development -- it's not an art class, so we didn't do anything more than raise the points. We pushed on to discuss the phenomenon of color FIT4:8-9, binary representation and binary arithmetic FIT4:302-312 .
    • Assignment 09: Because of the relentless pace of having an assignment due every two days (it worked great, but when things didn't go smoothly, it took its toll), and because creativity is one of the Big Ideas, this week long assignment was called "free programming." Students could do anything they wanted as long as it was interactive. The results were tremendous, not because they were so sophisticated, but because the students had 100% control to "implement human intent."

    • Lab: Practice binary addition. This (or the students earlier education) worked; everyone got the binary addition question on the midterm right.

    • Lecture 10: This lecture was to erase the magic of computing, but explaining how a piece of silicon can "do" instructions. We did computer organization FIT4:248-262. Next comes the switching capability of a transistor based on the field effect FIT4:270-272. When that was done, I gave a two slide introduction to how the actual switching works, FIT4:267-272, but I said it "wouldn't be on the test." Despite being perhaps one of the most amazing phenomena in nature, no one appeared to pay attention!
    • Assignment 10: A continuation of Assignment 09

    • Lab: Get help with the lab instructor for those things your creativity thought up, but you can't yet program. Most students just worked on their task without needing much help; I think this is because their complete control over the assignment allowed them to "redefine success" when they didn't know how to do something.

    • Lecture 11: Functions and Layering. The lecture builds functions, and during the patter creates a scoreboard counter. At the end, the "functional layers" are reviewed. Big emphasis on one-step-at-a-time programming. No specific preparation is needed beyond familiarity with Processing and the specific examples used.
    • Assignment 11: Create a Sudoku form using the same ideas that were presented in the lecture, that is, function composition. This was a mixed success: Students who were keeping up got the idea (at least I'm aware of some) and those who had struggling got lost in the details, missing the function composition point altogether.

    I would add a fetch/execute cycle animation to lecture 10, and forget telling about how field effect transistors work, despite the phenomenon being a wonder of the universe. The biggest change would be to take lecture 11 and split it in half. Rather than rocketing through the programming, I'd build up the digits, and then step carefully through the structureal features of functions, how the parameters work, how the calls work, and how the creation of a function creates a "thing", namely functional abstraction. Then in the next lecture, I would review, finish the scoreboard clock, and then discuss software development, compilers, ianguages, and how we just illustrated that. Of course, this would require the assignment to be delayed, but it might well be more successful by so doing. (See next lecture.)
  • Week 5

    • Lecture 12: I had failed to present one aspect of parameters last time, which had created considerable havoc with the assignment. The lecture began with recovering from that mistake; this would be good material to include in the first lecture when lecture 11 is split. The "concept" part of the class covers bits are universal. Slides 17 and 18 are the punchline; FIT4:323-324. This was totally anticlimactic from the students point of view. That it is an amazing fact of nature just didn't seem to matter. <sign>
    • Assignment 12: The palendrome assignment had as its first goal to introduce the way text is handled in Processing -- it's more involved than in most languages. Further, I was headed for assignment 13 and needed to cover multiphase execution -- a term I wish I had explicitly introduced. They got the text part; the multiphase was a struggle for perhaps half of the students. Making this into a two part assignment -- text, then multiphases -- would solve the problem, I believe.

    • Lab 05: The goal is to practice writing value returning functions. When the effort is complete then the students check the diagram to see how function execution is suspended to make an embedded call.

    • Lecture 13: The universality of computers -- any computer is equivalent to any other computer, with some tiny technical caveats that really are of no concern except to theorists. We also do complexity, along the lines of FIT4:699-707. Students were intrigued by NP-Completeness. I also got mileage out of the two abstractions of sorting based on the comparison arrangement -- it was yet another use of the idea of "abstration."
    • Assignment 13: An unfortunate numbering coincidence! This assignment was too difficult -- I will use it again, but it needs to be broken apart, given more time, or otherwise placed within reach of the average students. (The good ones got it, but that isn't my goal.) The assignment uses text, it uses multiphase, and it introduces the idea of compiling. Here's why to do it: On the first day the students were users of a game, Lightbot 2.0; today they are implementors of a game that is -- computationally, at least -- equivalent; sure the graphics are lame, but fixing that is no object. That's not bad progress for 5 weeks! (I'll take 6 next time.)

    • Lab: Work on assignment 13.

    • Lecture 14: Review of what we've learned in the first half in preparation for the midterm. I had to be out of town Monday, which defined the MT date, but it is a good place to break.
    • No assignment:

    This was a very tough week. We began with the "parameter problem" from the previous week. Then the two assignments were killers, requiring the students to invest significant time, right at midterms. As explained these problems require adjustment. I am pretty confident in them conceptually, but they need to be "dished out" at a more civilized rate. One strategy would be to move assignment 13 to the next week, following the MT interruption. It will still achieve the "wow look at what we've learned" aspect.
  • Week 6

    • Midterm Exam: In class, on paper, 50 minutes, one sheet of notes. Everyone got the binary addition question!

    • Lab: Lab canceled

    • Lecture 15: The topic is recursion, which is not technically a requirement of the AP CSP plan. Students have no problem with a function calling itself (thanks, Lightbot), but the parameter binding is confusing. (But, it is everywhere.) Dealing with that was part of the lecture. The choice of the valentine example was simply to do something "heart related," but I don't think it worked and would dump it.
    • Assignment 14: (Note: Numbering conforms to the course's published calendar.) This is a poor assignment, I will replace it with some other recursive computation. The problem is finding one that is motivating and doable.

    • Lab: Writing a recursive programs to solve the assignment

    • Lecture 16: A short lecture on algorithmic correctness, and abstracting the properties of a program. This reused the sorting patterns from lecture 13. The last twenty minutes were Susan Evans, my HS teacher colleague, introducing pair programming and the pair programming assignment.
    • Assignment 15: Another creativity assignment, as the students are asked to invent a game and implement it using pair programming. I deem this assignment very successful, both in the creativity dimension, and in the student learning dimension. Pair programming always has risks -- the "other person" is a problem -- but we had only two, and the number of successes was large! Students appreciate the greater amount of time to work on it. Her Pong example, as she pointed out, was lame, making it pedagogically useful!

    Despite the previous week's difficulties and the midterm, the class stayed with me. The midterm was a boost for most students, but as usual they made "dumb mistakes." So, at Susan's suggestion, I let any student reanswer missed questions, and then come by my office and explain the answer; if it was right and they knew why, they got half of their missed points restored. Many students took the chance, and it was a tremendous teaching opportunity for me -- worth distorting the results of the test.
    A depressing observation for an Emeritus Professor is to watch a 20-something take over your class, and notice how the students light up. <sign>
  • Week 7

    • Lecture 17: The AI lecture wasn't scheduled for this day -- and I'd return it to later in the class in the future. But Watson was getting tremendous press with its anticipated appearence on Jeopardy tonight. We needed to handle AI today. The lecture is waaay too long; the requisite material is discussed at length at FIT4:689-698,
    • Assignment: Continue assignment 15:

    • Lab: Pair Programming.
      In the evening there was a "big screen" viewing in the CS department of Watson crushing the human competition, and my class had a pizza and salad reception before hand.

    • Lecture 18: This lecture is intended to remove the apparent magic of networking, explaining basics of the technology; one source of information is FIT4:62-74. I don't think the students knew this material, but there were also very few surprises.
    • Assignment: Continue assignment 15:

    • Lab: Pair Programming. Spending lab time for pair programming really helps the obvious scheduling challenges that they "only program when they are together" rule brings.

    • Lecture 19: An AP CS Principle learning objective is to explain large systems design issues. Whether this topic survives the coming revisions is unknown. This lecture on how the Domanin Name System works (check Wikipedia for a longish explanation) covers that topic, but it was so successful (and I think so fundamental) I'd keep it in the course even if it doesn't survive. Students were amazed by it, and followed the material closely.
    • Assignment: Continue assignment 15:

    This was a fun week, and despite the fact that the students were immersed in Processing programming, the topic was now old news. They could implement human intent using the language with decent success, and were! Goal accomplished. The I'net material this week signaled a shift in direction that would end up focused on data.
  • Week 8

    • No Class

    • Lab: Guest Lecture -- Richard Ladner of UW CSE on accessibility.

    • Lecture 20: The operation of a search engine is essential data for CS Principles. Because I will need students to know some basics of HTML later, I used the crawling discussion to introduce in three slides the high points of HTML; FIT4:87-106. I included a cheatsheet for the language, too. This was totally successful. Students may have been exposed to it before, but some who I know were not, caught on very fast. It was a very valuable (and unintended) confidence builder. At the end of class, Susan introduced the next assignment.
    • Assignment 16: Students are asked to teach a programming concept on the premise that you know something well when you can teach it. They had to learn Scratch, as the language to teach. The assignment took some flack from several students, because the students saw it as a childish language, and definitely a waste of their time.

    • Lab 06: This is an HTML assignment to reinforce the ideas from the previous lecture. All but two students finished in less than 50 minutes, and those two were essentially done.

    • Lecture 22: Susan gave a lecture on debugging using the Scratch setting. She thought it wasn't as crisp at getting the principles (FIT4:201-204) across as she had wanted,. She ingeniously and successfully had the students work on a debugging exercise. It was reasonably subtle and drawn from one of the pair programming games; after students worked on it, she had one of the partners (the other was sick that day) come up and tell how they figured out what the bug was. It was a good teaching tactic.
    • Assignment: Continue assignment 16:

    A holiday shortened the week, but it was successful. The class is definitely running smoothly. The pair programming developed some friendships, and our sharing of the teaching responsibilities and the debugging exercise added cohesiveness.
  • Week 9

    • Lecture: Guest Lecture -- Zoran Popovic on games to solve the worlds problems
    • Assignment: Continue assignment 16:

    • Lab 07: Gambling on the success of the self-taught HTML from the previous lab, I tried the self-taught Cascading Style Sheets (CSS); FIT4:111-118. This also worked out just fine for most of the students.

    • Lecture 24: The meta-data lecture was material I had not taught in this form before;. The result was too much; further, the point that "XML is everywhere" failed because the "photo roll over" site was down, and students got lost in the SVG explanation. Still, they immediately got the three rules for XML FIT4:474-480 and could apply them; I think this is the first time I am aware of when the classification helped (in the assignment). The lecture could be shortened by killing the SVG stuff.
    • Assignment 17: (Note, this is also called Assignment 18 in the blog.) This is the XML/XSL personal database assignment, My Own Database, or MOD; a similar database is at FIT4:524-537. Given how abstract this assigment is, students did well on it; there were few questions (all revolving around linking to Vimeo).

    • Lab: I had intended this to be the lab 08 content, but as has happened before, I got the sequencing messed up. So students did the first part of assignment 17, which was supposed to be done at home on their own computer.

    • Lecture 25: The XML/XSL lecture, which puts all of the meta-data discussion into one package; FIT4:514-524. It was a successful lecture; students knew they were going to use the information, and I think they paid close attention. I think slide 5 was a great way to present the material, and critically important to the students' success.
    • Assignment: Continue assignment 17:


    Zoran's lecture Monday was a huge hit. He asked students what were the big problems facing mankind, and they offered poverty, disease, energy, and the like. He then proceeded to argue why these problems could be addressed using games. He started with the Fold-It application from his lab, but then proceeded to describe other kinds of games that they or other groups are working on to solve the big problems. The students were inspired! Though I felt that the material this week was very rough -- this was the first time to lecture on any of it -- and the whole week needs to be rethought with an eye towards making it smoother.
  • Week 10

    • Lecture 26: I did this lecture on steganorgraphy just because I wanted to -- it's a good way to remind students about Processing, pixels, data encoding, etc., but it is also truly amazing. (Thanks to Owen Astrachan who suggested it.) The lecture is self contained and pretty self evident (I don't know one place where this information might be found.) After hiding one picture in another it is quite amazing to see it reconstituted. Next time, I'm going to have the host picture "melt away."
    • Assignment: Continue assignment 17:
    • Assignment 17x: The third and last extra credit assignment.

    • Lab 08: An exercise that illustrated the relationship between XML and XSL. This seemed not to be a point of confusion, either because of the explanation in lecture 25 or this exercise.

    • Lecture: I passed out notes on what I thought the take aways were from the lectures and assignments. Students dutifuly added notes as we discussed the material, but as typical, there were few questions. It's a REVIEW!
    • Assignment: Continue assignment 17:

    • Lab: Help with assignment 17.

    • Party Hats and Celebration: Class canceled, because at the time we would normally meet, I was in Dallas at the SIGCSE conference discussing this class that I wasn't teaching!
    • Assignment: Celebrate!

    Steganography rocks! In the foregoing notes, I have suggested places to split lectures or add material. Because of the traveling and holidays this quarter, I am confident that even a straightforward application of the recommendations will not unduly extend the class. This is especially true if the content of the invited lectures is handled somewhat more superficially.

Final Thoughts

This class was a huge amount of fun to teach, and I look forward to doing it again. As you prepare for or teach Computer Science Principles do not hesitate to ask questions (snyder AT cs DOT washington DOT edu). Good luck!!

  
     Contact: snyder at cs dot washington dot edu