Course Syllabus

CMPSC 16: Problem Solving with Computers I

FALL 2012

Lectures: MW 9:30 - 10:45

Location: SH 1431

Class Website: http://cs.ucsb.edu/~cs16


Lectures    Labs    Homework    Programs    Projects    MidTerm    Final

Course Description

Fundamental building blocks for solving problems using computers. Topics include basic computer organization and programming constructs: memory, CPU, binary arithmetic, variables, expressions, statements, conditionals, iteration, functions, parameters, recursion, primitive and composite data types, and basic operating system and debugging tools. 4 units.

Official Prerequisites/Restrictions (from the Catalog)

Course Textbook:

Engineering Problem Solving with C (3rd edition) by Delores M. Etter, Pearson Prentice Hall

Class Attendance

Class attendance in Lectures and Discussions is mandatory: you are responsible for everything that goes on in class. Prepare in advance for class by reading and studying the assigned text, and by making sure you understand the previous lectures.
Weekly one hour laboratory sections, led by the TA, will focus on small programming exercises that reinforce the material presented during lectures. It is required that students attend these sessions; you are responsible for the material presented in these sessions.

Computing Facilities

You may use the CSIL (Computer Science Instructional Lab) computers, or any other machine you prefer. All programming will be in the programming language C.

Assignments and Grading

Grades will be based on Laboratory Assignments, Homeworks, Midterm Exam(s), Programming Assignments, and the Final Exam.
Unless otherwise instructed, all programming assignments must be submitted by 11:59pm on the due date. Late assignments will not be accepted. Turn in what you have done by the due date and time.
You are encouraged to discuss homework assignments with classmates at a general level. However, you may not share answers/code or collaborate on solutions unless otherwise directed to do so. All work turned in must be completely your own, including programming assignments. (See the Policy on Academic Integrity, below.)
There will be no makeup exams.

Policy on Academic Integrity

Please read this section carefully. The university, the department, and this instructor all take the issue of academic integrity very seriously. A university requires an atmosphere of mutual trust and respect. While collaboration is an integral part of many scholarly activities, it is not always appropriate in a course, and it is never appropriate unless due credit is given to all participants in the collaboration. This goes for both ideas and programming or other work.
Here are some examples:
For some views on academic integrity at UCSB see:
Summary: Academic integrity is absolutely required - dishonesty (cheating, plagiarism, etc.) benefits no one and hurts everyone. If you are not sure whether or not something is appropriate, please ask the instructor or TA.

Students with Disabilities

If you are a student with a disability and would like to discuss special academic accommodations, please contact the instructor. In addition, students with temporary or permanent disabilities are referred to the Disabled Students Program (DSP) at UCSB. DSP will arrange for special services when appropriate (e.g., facilitation of access, note takers, readers, sign language interpreters). Please note that it is the student's responsibility to communicate his or her special needs to the instructor, along with a letter of verification from DSP.

Instructor: Divy Agrawal, agrawal AT cs.ucsb.edu

Office hours: MW 11:00 - 12:00, 3117 HFH, and by appointment.

Teaching Assistants:

Discussion Sections:

CMPSC 16 Course Outline (subject to change):

Date Topic Related Reading Assignment
M: 10/01/2012 Problem Solving via Programming; Overview of Hardware & Software Organization Chapter 1  
W: 10/03/2012 Basic C Program Structure; Basic Data Types; I/O Statements Chapters 1 & 2  
M: 10/08/2012 Program Control: Conditional Statements Chapters 3 & 4  
W: 10/10/2012 Program structure: Return Statements; Simple Functions Chapters 3 & 4  
M: 10/15/2012 Program Control: Loop Statements Chapters 3 & 4  
W: 10/17/2012 Input/Output from Data Files Chapters 3 & 4  
M: 10/22/2012 Modular Programming Chapters 3 & 4  
W: 10/24/2012 Midterm Examination I  
M: 10/29/2012 Modular Programming and Pointers Chapter 4  
W: 10/31/2012 Array Data Type Chapter 5  
M: 11/05/2012 Multi-dimensional Array Chapter 5
W: 11/07/2012 Searching and Sorting Chapter 5,6,7
M: 11/12/2012 No Class: Veteran's Day
W: 11/14/2012 Multidimensional Arrays, Strings, and Composite Data Types Chapter 5,6,7
M: 11/19/2012 Pointers and Address in C Chapter 5,6,7  
W: 11/21/2012 Strings Data Types Chapter 5,6,7
M: 11/26/2012 Midterm Exam II  
W: 11/28/2012 Algorithms: Searching  
M: 12/03/2012 Algorithms: Sorting  
W: 12/05/2012 Efficiency of Algorithms Chapter 9

Below is Advise From Phil Conrad

What this course is about

CMPSC 16 is an intermediate course in programming, focusing on problem solving, and fundamentals of software development.

What this course provides is a solid grounding in problem solving, and basic concepts of programming in C, so that you are well prepared to take CS24 and CS40 (which are the next CS courses in the curriculum.)

The course "provides an opportunity", because you will get a solid grounding in problem solving and C programming only if you put a lot of time and effort into this course. That is true no matter how much thought and attention the instructor puts in his/her lectures, assignments, and exams.

Are you ready for CMPSC 16?

CMPSC 16 should not be your first programming course!

This course assumes you have already done some programming.

No prior knowledge of any particular programming language is required. We will use the C programming language in this course to teach problem solving, however, we do not require any prior knowledge of C.

However, we do assume you are already a beginning programmer in some language such as Python, Java, C, C++, C#, Visual Basic, JavaScript or ActionScript. You should have already taken a course in programming prior to enrolling in CMPSC 16-either in high school, and a previous college or university, or perhaps ENGR3, CMPSC5 or CMPSC8 here at UCSB.

You should already be comfortable with concepts such as:

If you are not comfortable with all those things, you should drop CMPSC 16 from your schedule and try to enroll in CMPSC 8 instead.

If you did not earn at least a C in CMPSC 8, you should strongly consider repeating CMPSC 8 before taking CMPSC 16.

If you got a D or worse in CMPSC 8, you should NOT take CMPSC 16 without first repeating CMPSC 8.

Note: prior experience with web pages and HTML is NOT enough background to be successful in this course.

If you don't have the proper background for CMPSC 16, please don't enroll just because:

If you really should be in CMPSC 8 but are having scheduling issues, please see Benji Dunson, the undergraduate advisor for CS, who is available during normal business hours in the CS office, on the 2nd floor of Harold Frank Hall. He can help with authorization to enroll ("add codes"), and other similar problems.

Learning to program: 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 the type of problem solving involved in programming. Programming is not a serious of facts to be memorized-you cannot "cram" for a computer science exam. You must practice, practice, practice.

This course may have a heavy workload

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 solid problem solver, and preparing you for CS24.

What you need to learn

So, what is it that you need to know to be ready for CS24?

At the very least, mastery of basic computer organization and programming constructs:

Finally, here is a list of some things you need to begin to appreciate that are more subtle, but perhaps even more important in the long run:

Here's a bit more detail about these aspects of the course:

Problem Solving

Problem solving is something that is difficult to "pin down". We can't give you a step by step process for doing it-if we could, it wouldn't be problem solving! It is that part of developing software that involves seeing how to combine all the pieces you've learned about in a new way in order to make a piece of software work.

It is something that can't be learned from a lecture or a book though it can be learned! The only way for you to learn it is for use your instructors and TA to offer you many opportunities to try doing it. You'll make mistakes, and then have flashes of insight, and learn from those. Eventually, both your skill and self-confidence will increase.

Team and Communication Skills

In terms of "the real world"----i.e. what employers want us here at UCSB to "do better at"---these are the things they almost always bring up. Companies that hire programmers don't complain that UCSB grads lack technical skills, but they do wish they were better at these things:

These last four points are often difficult to convey in a 10 week class at the introductory/intermediate level, but we are going to do our best to try!