Instructor: Dr. Phill Conrad, Lecturer (PSOE), Dept. of Computer Science (Joint Appointment, Coll. of Creative Studies).
TAs: Youngjoon Choi, Wendy Chun
Website: http://www.cs.ucsb.edu/~pconrad/cs8
Course Meetings: Session: 09/23/2010-12/11/2010 (link to UCSB Academic Calendar)
Lecture:
TR, 2-3:15pm North Hall 1006 (how to find NH1006)
Discussion (lab):
ESB 1003 (Cooper Lab), Fri 9-9:50am, 10-10:50am, 11-11:50am, noon-12:50pm
Instructor Email pconrad@cs.ucsb.edu
TA Email: chun0216@cs.ucsb.edu, ychoi01@cs.ucsb.edu

Office Hours for both the instructor and TA can be found by consulting the following Google Calendar:
http://www.cs.ucsb.edu/~pconrad/officehours

Prof. Conrad and your TA are also available by appointment—use email to request an appointment.
Include "CS8" in your subject line, and indicate your available times.

Catalog Description Prerequisites Textbook
Introduction to computer program development for students with little to no programming experience. Basic programming concepts, variables and expressions, data and control structures, algorithms, debugging, program design, and documentation. None: but we do expect familiarity with basic concepts from high school algebra, geometry and trigonometry—we'll review those as needed.

Title: Python Programming in Context
Authors: Bradley N. Miller, and David L. Ranum
Publisher: Jones and Bartlett, 2009.        
ISBN-10: 0-7637-4602-5    ISBN-13: 978-0-7637-4602-5
http://www.cs.ucsb.edu/~pconrad/cs8/10F/textbook/

A Few Course Policies In Brief (more detail later on this syllabus)

Grading

40% Assignments/Quizzes/Homework + 40% Midterm Exams (2 at 20% each) + 20% Final Examination

Quizzes may occur at anytime, announced or unannounced. Missed quizzes may not be made up.
Thus attendance is required, and reading the assigned readings is required.

To determine your final letter grade, I will calculate two numbers:

Weighted course average
40% Assignments Labs/Worksheets/Homework/Projects
+ 60% Exams (2 midterms and final, 20% each)
Weighted exam average Average score of two midterms and final (weighted equally)

I will then use the following table. This is a conventional 10 point scale with +, - with the lower three and upper three points of each range representing plus/minus. It also enforces a policy that your final course grade can be no more than one letter grade higher than your exam average.

to earn
this letter grade
weighted course average
must be at least
AND, weighted exam average
must be at least
to earn
this letter grade
weighted course average
must be at least
AND weighted exam average
must be at least
A 93 83 C 73 63
A- 90 80 C- 70 60
B+ 87 77 D+ 67 57
B 83 73 D 63 53
B- 80 70 D- 60 50
C+ 77 67 F weighted course average below 60 OR weighted exam average below 50

Curving: The grade scale above represents the minimum letter grade you will be assigned—at the instructor's discretion, the grading scale may be altered in the students' favor if this will be better reflect the students' mastery of the material. Thus, if there is a "curve", it will be applied at the end, not to individual assignments.

A+ grades: These may be awarded to the very best performing students in the class—but the cutoff for A+ grades will be determined at the end of the course at the discretion of the instructor (there is no pre-determined cutoff---an average of 97 or more doesn't guarantee you an A+ grade.)

What this course is about

This course is an introduction to Computer Science, and programming.

Computer Science is the study of abstractions and algorithms.

You probably use abstractions and algorithms every day—for example:

Algorithms have to be both designed, and "coded" so the computer can carry them out

In the case of using an index, this is probably an algorithm you may have learned in grade school, and it has been so long since you learned it, that now you don't even think about it—you just do it. Finding a space in a parking lot—and knowing when to give up and look elsewhere—is "just common sense"; this probably isn't something you were ever "taught", or even have to think very much about. You just do it.

Computers don't currently have this capability—i.e. the capability to "pick up things by common sense"—and it seems unlikely that they will within our lifetime—unless there are major breakthroughs in the field of Artificial Intelligence. Such breakthroughs have been predicted for a while, but they haven't happened yet. (Maybe you'll be the one to figure out how to achieve this!)

So, for the time being at least, it falls to humans to design algorithms that computers can use to solve problems. In many cases, these algorithms are "just common sense"—the computer equivalent of looking for an empty parking space in a parking lot (and knowing when to give up). Algorithms like this are easy to design. Many of the algorithms we'll see in this course are like that.

In other cases, the algorithms are very complex, or very subtle, and coming up with them is a deep intellectual challenge. Furthermore, the impact of a better algorithm on society can be very large. For example, new algorithms in the field of computational science—modeling chemical and biological reactions with computer simulations—can lead to breakthroughs such as new drugs to fight disease, or renewable sources of energy.

And often, what goes along with finding a good algorithm is finding a good abstraction of the real world concepts we are interested in: cells, molecules, oil fields, words, sentences, students, courses, GPAs, etc. Algorithms and abstractions really go hand-in-hand.

Coding, or Writing Software, or Programming: expressing algorithms in a programming language

Human languages such as English and Spanish are not very well suited for expressing algorithms—at least not for expressing them to a computer (they have their problems for communicating with humans too!). So, special languages are used. In this course, we'll learn the Python programming language. We choose Python rather than Java or C++ because:

This course provides you with the opportunity to become a pretty good beginning programmer, and be well prepared for an intermediate programming course such as CS16 (the first course that counts towards the CS major at UCSB, and which requires at least one quarter of prior programming experience.)

I say that the course "provides an opportunity," because you will only become an good beginning-level programmer if you put a lot of time and effort into this course—that is true no matter how much thought and attention I put in my lectures, assignments, and exams.

The swimming/guitar/painting analogy

You cannot learn to swim, play guitar, or paint from a textbook or a lecture. You can only:

The same is true of programming. Programming is not a serious of facts to be memorized—you cannot "cram" for a computer science exam. You must practice, practice, practice.

You may find the workload heavy

As a result, the workload in this course may feel heavy. It may even feel unreasonable compared to your other courses.

However, I assure you that it is not unreasonable, given the goal of making you an skilled beginning programmer.
Programming is a skill, and the only way to get good at it is lots and lots of practice, which takes lots and lots of time.

The usual "folklore" rule of thumb is 8–12 hours per week for a normal college class*. That means you should expect, at a minimum to put in 5–9 hours per week on this course, on top of the 3 hours 20 minutes you spend in lecture and lab each week. To put it another way, I really should be giving you between 2 and 4 hours of homework between every lecture**.

*see CliffsNotes.com. How much outside class study time is recommended for every hour of class time for college freshmen? 26 May 2009 <http://www.cliffsnotes.com/WileyCDA/Section/id-305397,articleId-7601.html>

**I probably won't succeed in giving you that much work to do, but I really should, because that's the only way you'll learn what this course is supposed to teach! So, I'll do my best. If the work load is less than that, I apologize in advance for disappointing you. :-) .

How this course works

There are five components to this course, each of which has a special job to do:

Everything is Cumulative—that's just how CS is.

Finally—note that just as in a math class, everything we do builds on all the work that came before. So, everything is cumulative—so, you can't afford to miss any classes unless absolutely necessary. Miss two classes in a TR 10-week course, and you've already skipped exactly 10% of the course—it wouldn't be surprising if your performance (i.e. final grade) in the course dipped by a similar amount.

What you need to learn to become
a skilled beginning level programmer.

So, what is it that you need to know to be a skilled beginning-level programmer in Python? Here's the list of what you'll need to be ready for CS16 (the next programming course):

  • Problem solving
    • breaking down a problem into a sequence of steps
    • abstracting specific problems into general ones
      and finding general solutions
  • Memory concepts
    • variables, primitive vs. reference variables, name, type, value
    • assignment statements
    • scope of variables
  • Control structures
    • for loops, if/else, while loops
  • Lists in Python (similar to arrays in other languages)
    • index vs. value, finding sum, min, max, average, count of elements matching some condition, making a new list of elements containing only those that match some condition
  • Functions
    • function call vs. function definition
    • formal vs. actual parameters (arguments)
  • Testing
    • How to test your code
  • Input/output concepts
    • Writing to the terminal
    • Reading from the keyboard
    • Reading and writing to files
    • Neatly formatting output
  • Program style
    • How to write code that other people can read and understand

Policies

Attendance

This course moves quickly. So attendance is very important. We'll sometimes cover two or even three chapters in a given week. We need to go at that pace, because during the last week of the quarter, you can't really start anything new, because there isn't time to put it into practice with programming assignments. If you don't put it into practice, you aren't very likely to learn it in any way that is going to stick with you, so there isn't much point in just "going through the motions".

As a result, there will be something you have to turn in at almost every class. In this way, attendance is taken, and required. These things you have to turn in will be a combination of in-class activities, and homework completed outside of class, but handed in on paper during class.

Missing in-class activities.

If you miss a class, you miss the opportunity for the points on that in-class assignment, or homework that was due. Period.

There is no makeup, except for:

To make up an assignment from a "sick-day/personal-day", you must email me within 48 hours of the absence, to make an appointment to make up the assignment during the next scheduled office hours following your absence (or at an appointment time to be negotiated, if you have a conflict with those hours.) This make up must happen within one week of the absence, or 24 hours before the final exam, which ever is earlier.

In rare cases, if there is a documented family emergency, documented extended illness, documented required court appearance, or other situation beyond the students' control (with documentation) the instructor may grant additional make up days entirely at the instructor's discretion—but this is not a guarantee or a right.

UCSB Policy on Academic Honesty

It is expected that students attending the University of California understand and subscribe to the ideal of academic integrity, and are willing to bear individual responsibility for their work. Any work (written or otherwise) submitted to fulfill an academic requirement must represent a student’s original work. Any act of academic dishonesty, such as cheating or plagiarism, will subject a person to University disciplinary action. Using or attempting to use materials, information, study aids, or commercial “research” services not authorized by the instructor of the course constitutes cheating. Representing the words, ideas, or concepts of another person without appropriate attribution is plagiarism. Whenever another person’s written work is utilized, whether it be a single phrase or longer, quotation marks must be used and sources cited. Paraphrasing another’s work, i.e., borrowing the ideas or concepts and putting them into one’s “own” words, must also be acknowledged. Although a person’s state of mind and intention will be considered in determining the University response to an act of academic dishonesty, this in no way lessens the responsibility of the student.

(Section A.2 from: http://www.sa.ucsb.edu/Regulations/student_conduct.aspx, Student Conduct, General Standards of Conduct)

About pair programming

Most of the programming work in this course will be done using a style of programming known as "pair programming". This is where two people (in rare cases, three) work together at the same terminal to solve a programming problem.

It is similar, in some ways, to having a "lab partner" in a Biology, Chemistry or Physics course.

For the assignments where pair programming is used, it is required, not optional. Here's why:

To learn more about pair programming, watch the following video (it takes less than 10 minutes).
http://agile.csc.ncsu.edu/pairlearning/educators.php

About Collaboration

As mentioned above, one of the things we really want to convey in this course is that real-world software development is very seldom an 'individual sport'—is it much more often a 'team sport'. Companies want to hire CS and CE graduates that know how to collaborate with others on producing software.

In the CS Department at UCSB, we understand the value of this. However, it puts us in a tricky position.

On the one hand, we want to encourage working together in ways that help you develop your skills and teamwork, and help you understand that programming can be a social, collaborative, creative activity—not something done only by loner nerds in cubicles. The sooner you start with activities such as pair programming, code reviews, and other collaborative software development activities, the more skill you'll develop, and the sooner you'll be ready for the real world. Plus, for many people, working together with others is a lot more enjoyable and fun than being a loner.

On the other hand, we need to avoid any situations where freeloaders are "coasting" through courses by leaning too much on others—never developing independent skills as programmers. This situation creates huge problems. Mostly it is damaging to the freeloaders themselves, who eventually crash and burn, perhaps far too late to choose another career path without significant difficulty. However, it also creates problems for everyone else—some hardworking students become demoralized by the unfairness of it all, and the value of a UCSB education is diminished by the freeloaders' lack of accomplishment.

Thus, we must strike a balance.

Our emphasis on collaboration means:

However:

The bottom line:

A final note: the emphasis on collaboration in this course does not necessarily extend to other CS courses you may take in the future.

Other frequently asked questions

Do we need to bring our textbook to lecture? To lab?

It is generally not necessary to bring the textbook to lectures for CS8. It may be helpful to bring the book to lab though, as it may be a useful reference for working on programming assignments.

Though I say it is not necessary to bring your textbook to lecture, here are two specific cases, though, where it might be helpful:

Do we need to bring laptops to class?

You do not need to bring a laptop to class.

Are we permitted to use laptops during lecture?

Some instructors are bothered by students having laptops in class—and I can definitely understand this, especially in cases where students are not actually using the laptops to take notes, or try out code, but instead to read email or Facebook, play games, etc. That latter use can be a real distraction to others sitting behind that student, not to mention the distraction to the laptop user herself/himself.

I recognize the value that having a laptop in class can offer to the student that is using it for legitimate purposes related to the class, so I'm not going to start the quarter with a no-laptops policy. However, if I find that this isn't working out, I reserve the right to change the policy and implement a ban on laptops in lecture (where the only exception would be someone with a medically certified disability that needs the laptop for ADA-compliance.)

So, you don't want to be "that guy" or "that gal" that spoils it for everyone else. If you use a laptop, use it for legit purposes during class time.

What about laptops in lab?

Sometimes students want to use their laptops in lab instead of using the Linux computers provided. I would like to strongly discourage this for a variety of reasons:

This isn't an absolute prohibition. If the Linux machines are having software or hardware problems, or there is a problem with your account—these things happen rarely, but they do happen sometimes—then, sure, go ahead and use the laptop during lab. But otherwise, please stick with the machines provided.

Do we need to download anything to our laptops or computers at home/in the dorm?

If you are using Windows, you definitely will want to download two programs: PuTTY and XMing. These programs allow you to access the Linux environment on the CoE computers from your Windows machine. (Mac and Linux users usually have tools to do that already installed as part of the operating system called "ssh" and "X11".)

You may also want to install Python on your system, but be sure you get the right version.

At the time I'm writing this syllabus, version 3.1.2 is the best one to download. That may change by the time you read this.

My suggestion—wait until we've talked more about this in lecture before starting to install things.

Disclaimer

This syllabus is as accurate as possible, but is subject to change at the instructor's discretion, within the bounds of UC policy.

XKCD Comic 353 (Python)
(Image credit: http://xkcd.com/353/, used by permission)