CS 105 | SCS | UW

Revised Mar 28, 2017

CS 105: Introduction to Computer Programming 1


General description

This course introduces practical computer programming to students who don't have previous programming experience. Students learn programming concepts by creating interactive visualizations, simple games, and image processing effects. They also explore fundamental imperative programming language concepts, such as variables, conditionals, loops, functions, events, and arrays. Students learn general skills, such as coding style, modular design, testing, and debugging. In addition, they explore media computation topics, such as two-dimensional graphics drawing, human input, animation, and image processing.

Logistics

Audience

  • Students in the Global Business and Digital Arts (GBDA) program
  • Fine Arts - Studio majors taking the Digital Art Specialization
  • Students interested in learning how to program

Normally available

  • Fall

Related courses

  • Successors: CS 106
  • Conflicts: CS 115, CS 135, CS 145, CS 137, and other courses in introductory computer science

For official details, see the UW calendar.

Software/hardware used

Typical reference(s)

  • Daniel Shiffman, Learning Processing (second edition), Morgan Kaufmann

Required Preparation

At the start of the course, students should be able demonstrate a basic understanding of mathematical concepts. No programming background is expected.

Learning objectives

At the end of the course, students should be able to

  • Write interactive programs that draw shapes and respond to mouse and keyboard input using the Processing programming language
  • Understand and apply concepts, such as variables, conditionals, loops, functions, and arrays
  • Read simple pieces of code to explain their function, trace code execution, and identify related errors

Typical syllabus

Introduction (3 hours)

  • What is an algorithm? What is code?
  • Code syntax and syntax errors

Drawing and attributes (3 hours)

  • Two-dimensional coordinates, drawing functions, commenting practices, the concept of sequential control flow
  • Drawing attributes and the concept of program state
  • Colour representation and hexadecimal numbers

Interaction and variables (3 hours)

  • Draw loop and the concept of program events
  • Variable declaration and initialization, variable types, and the concept of computer memory

Conditionals (3 hours)

  • Boolean logic and relational expressions
  • If-then-else statements
  • Numeric representation and binary numbers
  • Bounds detection for hit testing

Loops (6 hours)

  • While loop and for loop
  • Variable scope
  • Remapping variables
  • Nested loops

Functions (3 hours)

  • Writing custom functions, function parameters, return values
  • Variable shadowing

Arrays (4.5 hours)

  • Arrays, array elements, indexing
  • Array operation idiom

Objects and program design (4.5 hours)

  • Using classes and objects for program encapsulation
  • Modularity, testing, and debugging

Images, video, and libraries (6 hours)

  • Loading and displaying images, image pixels
  • Image processing and computational complexity
  • Video capture and processing
  • Using libraries, e.g., loading and playing sounds