Are CS 143 and CS 144 For You?

(A document for incoming first-year students in the Faculty of Mathematics at UW)

As the diagram below shows, there are four different entry points to the introductory CS course sequence at UW, marked by double arrows. This document concentrates on describing one of them (CS 143/144), which is a new alternative offered for the first time in fall 2004. In order to explain this sequence, we must briefly describe the others and explain something about the intentions of all of them. [Note to reader: this must be integrated into materials explaining 131/2/3/4.]

Diagram of course sequences

Any introduction to computer science starts by exploring the nature of computation, how it is expressed and how it is carried out. There are many different strategies for such an exploration, but most involve some amount of programming, that is, learning to write programs that accomplish tasks. By and large, a computer scientist does not do all their programming in one language; instead, they choose a language to fit the task and the circumstances. Still, one has to start somewhere, and a first course in computer science at university usually either assumes experience in some language, or teaches some language to its students.

The major development in software in the last fifteen years has been the spread of object-oriented methods in order to develop and maintain large software systems. Languages such as Java and C++ are in use throughout industry and academia, and new languages are being developed and marketed. Many of the computer applications you may be familiar with from prior experience or media coverage were developed using these languages. The objects-first approach to introductory computer science starts with one of these languages and presents the object-oriented philosophy as soon as possible in order to help the student develop proper habits. This is what is done in CS 133 (and, more slowly, in the CS 131-132 sequence) using Java. Students then move on to CS 134, which explores basic data structures and algorithms; those with prior exposure to Java programming can start in CS 134.

Object-oriented languages such as Java and C++ are designed for industrial use, and are complex. Some students new to computer science may feel as if they were studying to be a commercial pilot and were put into the cockpit of a Boeing 747 on their first day. They might prefer a small two-seater trainer plane, or even a flight simulator. The computer science equivalent is a teaching language, one which is not used commercially, but which prepares the way for the use of a more complex language.

There are some object-oriented teaching languages, but they are not in widespread use, and it is hard to find textbooks and other support materials. Another approach, the one used in CS 143/44, is to use a completely different style of language in order to explore the fundamental nature of computation. If the situations which led to the development of object-oriented languages can be explored by using this other style of language, then students will be in a good position to move to a complex object-oriented language.

The teaching language in CS 143 is Scheme, a simple functional language that has been used in teaching at MIT for almost twenty years, and is currently in use at several institutions in North America (Berkeley, Caltech, Brown, Northeastern, Chicago, Utah). A functional language expresses computation as the application of functions to data. You have already had exposure to this concept through your elementary and high-school mathematics courses. Suppose we define the functions sum(x,y)=x+y and prod(x,y)=xy. If we then ask the value of the expression prod(sum(1,3), sum(2,4)), it is simple to evaluate it by substitution:

prod(sum(1,3), sum(2,4)) = prod(4, sum(2,4)) = prod(4,6) = 24

Scheme makes two changes to this standard notation; it puts the name of the function inside the brackets instead of outside, and replaces the commas with spaces. In Scheme, the same expression would be written as (prod (sum 1 3) (sum 2 4)). The rule for evaluation then becomes: find a matching pair of brackets with no other brackets inside it. What is inside is a function name and some data. Substitute: that is, replace the brackets and what's inside with the value of the function applied to the data. Continue doing this until you're left with a single value.

(prod (sum 1 3) (sum 2 4)) = (prod 4 (sum 2 4)) = (prod 4 6) = 24

Now you know Scheme! Well, not quite. Scheme has some built-in functions to improve clarity and expressiveness (it uses * and + instead of prod and sum), and allows you to use them to define your own functions. Here, computation is the definition of functions and evaluation of expressions. In this simple framework, CS 143 explores concepts in introductory computer science leading to object-oriented methods. But just because the framework is simple doesn't mean the course is; it's just that the language we use doesn't get in the way of the intellectual challenges. We believe the course to be suitable both for students with no prior exposure to programming, and those who have taken programming courses in high school.

CS 144 then makes the transition to Java at the beginning, and after that converges with CS 134 (the course using Java which follows CS 133 or CS 132); that is, after the introduction of Java, CS 144 covers the same basic data structures and algorithms as CS 134. An approach similar to CS 143/144 has been used at some of the institutions mentioned above, and students seem to be able to make the transition to a new language effectively, having learned the required material from a different perspective.

How can you decide if CS 143/144 are right for you? Only you can answer that question, but we can provide you with some guidelines and some information. The textbooks for both CS 143 and CS 133/131/132 are available on the Web, and you can browse them.

If you have a personal computer and can install software on it, you can try out the development environments you will be using at UW (free for unlimited use):

As for guidelines, CS 143/144 may be right for you if:

We would be happy to answer any questions you might have.

(Prabhakar Ragde, School of Computer Science, University of Waterloo)