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
Normally available
Related courses
For official details, see the UW calendar.
Software/hardware used
Typical reference(s)
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
Typical syllabus
Introduction (3 hours)
Drawing and attributes (3 hours)
Interaction and variables (3 hours)
Conditionals (3 hours)
Loops (6 hours)
Functions (3 hours)
Arrays (4.5 hours)
Objects and program design (4.5 hours)
Images, video, and libraries (6 hours)
General description
This course, together with its predecessor CS 105, offers a comprehensive introduction to practical computer programming to students who don’t have previous programming experience. While the main theme of CS 105 is to develop basic skills in imperative programming (variable declarations, control flow, defining functions, basic object-oriented programming), in CS 106 we explore more general applications of programming in contexts of interest to visual artists and designers.
Logistics
Audience
Normally available
Related courses
For official details, see the UW calendar.
Software/hardware used
Typical reference(s)
Required preparation
At the start of the course, students should be able to
Learning objectives
At the end of the course, students should be able to
Typical syllabus
Processing recap (3 hours)
Arrays (3 hours)
Strings (3 hours)
Input and output (3 hours)
Advanced shapes (3 hours)
User interfaces (3 hours)
Geometric context (3 hours)
Recursion and fractals (3 hours)
Randomness and noise (3 hours)
Text processing (3 hours)
Structured data processing (3 hours)
General description
Logistics
Audience
Normally available
Related courses
For official details, see the UW calendar.
Software/hardware used
Typical reference(s)
Required preparation
At the start of the course, students should be able to
No programming background is assumed.
Learning objectives
At the end of the course, students should be able to
Typical syllabus
An introduction to functional progamming (24 hours)
Data abstraction (7.5 hours)
Functional abstraction (4.5 hours)
General description
Logistics
Audience
Normally available
Related courses
For official details, see the UW calendar.
Software/hardware used
Typical reference(s)
Required preparation
At the start of the course, students should be able to
Learning objectives
At the end of the course, students should be able to
Typical syllabus
Introduction to imperative programming (15 hours)
More advanced concepts from imperative programming (15 hours)
Issues in Computer Science (6 hours)
This course covers the principles of program design and the fundamentals of computation through functional evaluation.
CS 135 is for students who would prefer a more conceptual treatment of introductory computer science in a simple language that is educationally effective but not commercially relevant. While the course is designed to be taken by those with no prior programming experience, students with prior experience will also find it relevant, due to its unusual focus. It is suitable for both CS majors and non-majors.
Antirequisites: CS 115, 121, 122, 123, 125, 131, 132, 133, 134, 137, 138, 145, CHE 121, CIVE 121, ECE 150, GENE 121, PHYS 139, SYDE 121
Successor: CS 136.
Used in course: Programs are written in subsets of the language Scheme. Student labs are equipped with the DrRacket integrated development environment running on networked personal computers. Versions for Windows, Mac OS, Unix/X and Linux are freely downloadable for use on computers owned by students.
How To Design Programs by Felleisen, Findler, Flatt, and Krishnamurthi, MIT Press, 2003. This book is available in its entirety on the Web, though students are encouraged to purchase a physical copy.
I-Clicker RF Response Remote (Required) .
Three hours of lecture per week, plus a tutorial. Available in Fall and Winter.
Numbers, arithmetic, function definition and composition, design recipes, conditional expressions, symbols.
Structure definitions, constructors, selectors, data definitions, type predicates, functions for mixed data.
Vocabulary and grammar of the beginning student language.
Definition of lists, designing functions to process and produce lists, recursive definition of natural numbers, recursive data definitions.
Multi-clausal recursive data definitions, trees, mutually referential data definitions, design methods for complex data, iterative refinement, multiplexing.
Encapsulation, block structure, binding, functional abstraction, filters, polymorphism, generic functions, parametric data definitions, functions as data, functions that produce functions, anonymous functions, abstract list and tree functions (definition and use).
Generative versus structural recursion, backtracking algorithms, accumulators and accumulative recursion.
Babbage, Hilbert, Godel, Church, Turing. Early development of electronic computers and programming languages. History of concepts covered in this course.
This course examines elementary data structures and algorithms using the functional and imperative paradigms of computation, and discusses issues surrounding the effective use of programming languages in “real-world” environments.
CS 136 is for Mathematics students who have taken CS 135.
Prerequisites: Full-time degree registration in the Faculty of Mathematics; CS 116 or at least 60% in CS 135 or CS 145 taken fall 2011 or later.
Antirequisites: CS 134, 137, 138, 145 taken fall 2010 or earlier.
Programs are to be written in Scheme and C. Student labs are equipped with the DrScheme integrated development environment running on networked personal computers. Versions for Windows, Mac OS, Unix/X and Linux are freely downloadable for use on computers owned by students. C programs will be compiled using Clang/LLVM in the RunC environment. gedit is recommended for use as an editor.
C Programming: A Modern Approach, 2nd edition by K.N. King (W.W. Norton & Company).
How To Design Programs by Felleisen, Findler, Flatt, and Krishnamurthi, MIT Press, 2001. This book is available in its entirety on the Web, though students are encouraged to purchase a physical copy.
Lecture slides will be made available online.
Three hours of lecture per week, plus a one-hour tutorial.
Mutation of identifier-value bindings in Scheme. Sequencing of statements. Basic I/O in Scheme. State encapsulation (primitive objects). Semantics of structure and list mutation in Scheme. Box-and-pointer diagrams.
The memory model. Variable declaration, assignment and infix expressions in C. Basic I/O in C. Compilation. Pointers, addresses, garbage collection, and memory reuse in Scheme. Modelling functions, procedures, and recursion in C. The limits of recursion in C. Loop constructs.
O-notation. Analysis of simple programs in Scheme and C. Logarithmic-time list operations. Vectors/arrays in Scheme and C and their uses. Linear and binary search. Hash tables and their uses. Pointers and strings in C.
Structures in C. Memory allocation and deallocation. Lists and queues in C. Safety and usability issues.
Information hiding in Scheme. A module system. Libraries. Definition and implementation of ADTs. Separate compilation in C. Overview of approaches to abstraction and code reuse in other languages (Java, C++, ML, Haskell).
History of concepts covered in this course.
This course introduces software engineering students to elementary data structures, and to the functional programming paradigm.
Level 1A Software Engineering undergraduates. It is assumed that students have experience developing well-structured, modular programs.
Antirequisites: CS 115, 135, 136, 145, CHE 121, CIVE 121, ECE 150, GENE 121, PHYS 239, SYDE 121
Successor: CS 138.
Used in course: An integrated development environment (IDE) for C++ (such as xCode for Mac OS X).
C Programming: A Modern Approach 2nd ed. Author: K.N. King
Three hours of lecture per week, plus a two-hour lab and a one-hour tutorial. Normally available in Fall only.
Review of hardware and software, problem solving and programming, including declarations, selection and looping constructs, I/O.
Functions. Scoping. Parameter passing, by value and by reference. Top-down design. Programming with stubs.
Arrays. Structures. Arrays of structures. Multidimensional arrays. Appropriate choice of data structures. String processing and tokenization.
Introduction to recursive procedures and functions.
Introduction to O-notation, space and time efficiency, and complexity.
Algorithm design and efficiency, through discussion of of elementary sorting algorithms (insertion sort, selection sort) and advanced sorting algorithms (mergesort, quicksort, heapsort).
Introduction to pointers, memory allocation and deallocation, singly and doubly-linked lists.
Babbage, Hilbert, Godel, Church, Turing. Early development of electronic computers and programming languages. History of concepts covered in this course.
CS 138 Introduction to Data Abstraction and Implementation
Objectives
This course introduces Software Engineering students to elementary data structures and their implementation, and to the object-oriented programming paradigm.
Intended Audience
Software Engineering undergraduates who have taken SE 1A. It is assumed that students have experience programming in an imperative language such as C or C++.
Related Courses
Prerequisite: CS 137
Antirequisites: CS 116, 135, 136, 145, 146
Successor: CS 241.
Hardware and Software
Used in course:
References
Schedule
Three hours of lecture per week, plus a one-hour tutorial. Normally available in Winter only.
Outline
Introduction (3 hours)
Operating system and Unix concepts, programming language concepts.
Introduction to C++ concepts (3 hours)
C++ basics, basic types, IO, use of simply library elements (string, vector).
ADT and their implementations as linked structures (12 hours)
The stack, queue, and priority and queue ADTS; the linked list, sorted linked list; Trees, binary trees, binary search trees; the C/C++ memory model: pointers vs references, stack vs freestore; implementing and travesing linked structures; recursion and stack frams; recursive vs iterative solution to ADTs; space and time complexity of solutions; simple testing and debugging strategies.
Object-based computing (9 hours)
Interface vs implementation; class definitions, instantiation, object construction and destruction; object vs pointers to objects; interface design and abstraction, responsibility allocation; the adapter design pattern.
Introduction to object-oriented programming (9 hours)
Introduction to inheritance and its implementation in C++; introduction to generics, type parameterization, and C++ templates; the template method design pattern; use of generic data containers and the Standard Template Library; design heuristic and strategies for object-oriented programming.
CS 146: Elementary Algorithm Design and Data Abstraction (advanced version)
(Emphasized text represents additional material not found in CS 136.)
Goals
Logistics
Intended for 1B students in the Faculty of Mathematics. Normally available Winter.
Related courses (see calendar for official details)
Predecessors: CS 145 with a grade of at least 75%.
Successors: CS 246, CS 245, CS 251.
Conflicts: CS 116, 136, 137, 138, 145 taken fall 2010 or earlier.
Software used: Racket (dialect of Scheme), Unix-like development environment (Linux, OS X, Cygwin), C compiler.
Typical Reference(s)
C Programming: A Modern Approach (second edition) by K.N. King (W.W. Norton & Company).
The C Programming Language (second edition) by B. Kernighan and D. Ritchie (Prentice-Hall).
Required preparation
A mark of 75% or greater in CS 145. Students who complete CS 145 with a mark of less than 75% may apply for instructor consent to take CS 146. Students who complete CS 135 with an outstanding record may also apply for instructor consent. Prior experience in imperative programming (in particular using C or C++) will be considered in such requests, but will not be the main criterion; aptitude is still of primary importance.
Learning objectives
At the end of the course, students should have the ability to:
Typical syllabus
Introduction to C and elementary mutation in Scheme
Command-line interfaces. The memory model. Variable declaration, assignment and infix expressions in C. Basic I/O in C. Compilation. Mutation of identifier-value bindings in Scheme. Modelling functions, procedures, and recursion in C. Loop constructs. Algorithm analysis in C. File I/O in C and Scheme. Program organization and testing methods.
Memory management
Structures in C. Memory allocation and deallocation. Mutable structures, sharing, and garbage collection in Scheme. Space analysis in C and Scheme.
Mutable ADTs
Mutable lists, queues, deques, and trees in C. Time-space tradeoffs among mutable and immutable ADT implementations.
Low-level abstractions
Pointer arithmetic in C. Arrays in C and vectors in Scheme. Search, sorting, and graph algorithms revisited. Strings in C. Elementary hashing. Bitwise operations. Processing binary data. Libraries in C and Scheme.
Implementing high-level abstractions
Interpreting Scheme in C. Compiling Scheme to C. Compiling to virtual machines.