Syllabus, CMPTGCS 20, Spring 2018

Basic Facts

This course is a CCS version of the College of Engineering course CMPSC 8. Here is the description of that course:

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.

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

Coding is 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 a 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 series of facts to be memorized—you cannot "cram" for a computer science exam. You must practice, practice, practice.

 

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 CMPSC 16 (aka 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

Final Course Units

To learning Computer Science and Python Programming, you need to do CS and Programming.

I will be offering opportunity to build learning and demonstrate learning throughout the quarter, in the form of

To earn full course units (4), you need to demonstrate your mastery of the learning objectives by succesfully completing all (or the the vast majority) of at least the programming assignments.

Fewer than 4 units may be awarded for students that have spotty attendance, or fail to complete

Completion of the homework assignents is optional—if you find it helpful, please do them. If they are busy work to you, then skip them.

Extra units may be awarded (5 or 6) for completing all course requirements, and going above and beyond those through independent work.

Accommodations for disabilities

Students with disabilities may request academic accommodations for exams online through the UCSB Disabled Students Program at http://dsp.sa.ucsb.edu/. Please make your requests for exam accommodations through the online system as early in the quarter as possible to ensure proper arrangement.

Managing stress

Personal concerns such as stress, anxiety, relationships, depression, cultural differences, can interfere with the ability of students to succeed and thrive. For helpful resources, please contact UCSB Counseling & Psychological Services (CAPS) at 805-893-4411 or visit http://caps.sa.ucsb.edu/ .

Responsible scholarship

Honesty and integrity in all academic work is essential for a valuable educational experience. The Office of Judicial Affairs has policies, tips, and resources for proper citation use, recognizing actions considered to be cheating or other forms of academic theft, and students’ responsibilities, available on their website at: http://judicialaffairs.sa.ucsb.edu. Students are responsible for educating themselves on the policies and to abide by them.

Furthermore, for general academic support, students are encouraged to visit Campus Learning Assistance Services (CLAS) early and often. CLAS offers instructional groups, drop-in tutoring, writing and ESL services, skills workshops and one-on-one consultations. CLAS is located on the third floor of the Student Resource Building, or visit http://clas.sa.ucsb.edu

Python cartoon

(Image credit: Randall Munro http://xkcd.com/353/)

Standard Disclaimer

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

(end of syllabus)