Computer Science 160
Computer Programming for Non-Majors
Spring, 2013

Dr. Stephen Bloch
office 203 Post Hall
phone 877-4483
Web page
Class Web page
office hours MWF 12:00-1:00, T 10:00-3:00..

Course Description

Develop a feel for what programming is like, the process of program development, and major concepts of programming: variables, datatypes, functions, parameters, conditionals, compound datatypes like structures, lists, and arrays, and repeating constructs such as loops and recursion. No programming experience is required. (Learning Goals:Q; Distribution Reqs:FS)

1  Overview

Computers do many of the same things people do, only faster, more accurately, and without getting bored. So the task of programming a computer is essentially the task of figuring out exactly how you would solve a particular problem, and then explaining it to the computer. Unfortunately, computers are literal-minded and completely without intuition, so your explanation must be much more precise and unambiguous than if you were explaining things to a human being. This course, therefore, is about how to analyze a problem, figure out precisely and unambiguously how to solve it, and present this explanation to a computer.


2  Who Should Take This Course?

This course is intended primarily for people who have not previously studied computer programming. If you have previously studied computer programming, you'll still learn things in this course, but you might consider taking a more intensive course like CSC 171 or 172.

CS, CMIS, and Math majors are allowed to take this course, but it doesn't count towards those majors. It does count towards the “Formal Science” and “Quantitative Reasoning” general-education requirements. If you've never studied programming before and are considering one of those majors, you might want to take 160 anyway as a "warm-up", developing good habits before taking CSC 171; you'll learn a lot, including some things that aren't covered in 171. If you're curious about how computers work, what programming is like, and how programmers think, this is a good course to take. If you have no interest in writing programs of your own, but simply want to use Web browsers and search engines, spreadsheets, databases, word processors, etc. and perhaps write your own Web pages, you should take CSC 170 instead.

3  Prerequisites

This course has no prerequisites. Students are not expected to know anything about programming, although students who have done some programming may still benefit from the course; consult the professor. In any case, you should know how to use e-mail and a Web browser.

Although the course has no prerequisites, and is considered suitable for General Education distribution requirements, it is nonetheless hard work. Lectures will not cover everything you need in order to complete the homework assignments; you need to read the textbook too. (And I wrote the textbook, so I know whether you've read it!) There will be nine or ten homework assignments, most of which will require hours of programming, either in a computer lab or at your home computer. According to New York State guidelines, a 3-credit course should take you about 9 hours/week: 3 hours in the classroom and 6 hours of reading, study, and homework. If you can't commit that much time in between your other courses, you should reconsider taking this course.

4  What will you learn?


4.1  "Good" Programs


4.2  Kinds of Knowledge


  1. How to use the computers and the software on them


4.3  Language and design recipes

Programming a computer requires that, to some extent, you learn the computer's language. Computers "understand" a lot of different languages, and the choice of language affects how you approach programming. I've taught beginning programming in a number of different languages -- Pascal, C++, Java -- but to my mind most of them require spending too much class time on level-1 and level-2 knowledge, with not enough time left for levels 3 and 4. I prefer to teach a first course in a simple, consistent language designed for beginning programmers, and switch to more complicated languages like Java or C++ for the next semester after students have a firm understanding of the concepts.

So this semester we'll work in “Beginning Student Language”, based on an industrial-strength language named Scheme but modified for beginning programming students. (Depending on how the semester goes, we may get to Intermediate or Advanced Student Language by the end of the semester.)


5  Texts

I've taught this course for a number of years using the textbook How to Design Programs, by Felleisen, Findler, Flatt, and Krishnamurthi (who also wrote the programming platform we'll use, DrRacket). This book is available on the Web at, and you're welcome to use it as supplementary reading (although it introduces some topics in a different order, e.g. numbers and arithmetic before graphics and animation). That version isn't finished, but the parts we'll get to (roughly chapters 1 through 4) are. The complete first (2001) edition of How to Design Programs is also available on the Web at

In the years between How to Design Programs first and second editions, we developed a lot of new ideas about how to teach this material, and Dr. Felleisen suggested that I write my own textbook. Picturing Programs is based on How to Design Programs but different in several ways: less emphasis on numbers and arithmetic, more emphasis on animated graphics, and an overall slower pace. It's quite inexpensive, as CS textbooks go, but I've put the whole book on the web.

Picturing Programs was published in summer 2010, but I'm only human, and I make mistakes (which I track on the "Errata" section of the textbook web site). When you find mistakes or confusing passages in the book, please tell me! It may be worth extra credit....


6  Support

This term we will be using Piazza for class discussion. The system is highly catered to getting you help fast and efficiently from classmates, the TA, and myself. Rather than emailing questions to the teaching staff, I encourage you to post your questions on Piazza (anonymously if you wish); you may find that one of your classmates answers the question before a tutor or I even see it. If you have any problems or feedback for the developers, email

7  Grading

Most of your grade in this course is based on programming homework assignments, many of which depend on previous ones. If you haven't “got” homework 2, you won't be able to do homework 3, which means you won't be able to do homework 3, and so on. The moral of the story is don't get behind! As soon as you realize you're having trouble, ask for help immediately, whether from Piazza, the professor, or the tutor.

I expect to give nine or ten homework assignments, each due a week or two after it is assigned. Each homework assignment will be worth about 5-7% of your semester grade. Most assignments are to be written in two-person teams (see Pair Programming, below). In order to get your grades back more quickly, I may not grade all the parts of a given assignment; the un-graded parts are practice.

Most assignments are to be turned in by email, and will be considered late if the time stamp on the email is after midnight on the assigned due date. Homework assignments will be accepted late, with a penalty of 25\% per 24 hours or portion thereof after they're due. An hour late is 25\% off, 25 hours late is 50\% off, \emph{etc.} If you've got the choice between turning in an incomplete program today and a better one tomorrow, turn it in today unless you think you'll improve it by more than 25%. Any homework assignment turned in more than four days late will get a zero (but you should still do it, as the following assignment may depend on it). Any homework assignment turned in after May 8 (the last day of class) will get a zero. (This is so I have, perhaps, time to grade them before the final exam.)



8  Program standards


Every program must be accompanied by test cases, so I can see how it actually works. Programs with inadequate or poorly-chosen test cases will lose points (we'll discuss how to choose good test cases); programs turned in with no test cases at all will lose lots of points.




9  Pair Programming



10  Ethics





11  Schedule

This class meets every Monday and Wednesday from 2:25-3:40 PM in Swirbul 101.


Lectures can be really boring, and I'd like to avoid them wherever possible. Especially since I wrote the textbook: most of the things I would want to say in a “lecture” are already in the textbook, so if you've read the relevant section of the book, you don't need a lecture. In my ideal world, you would come to class having already read the chapter, and our in-person meetings would be asking and answering questions and figuring out how to solve problems. That sounds like a lot more fun than lectures. Please read ahead!

