next up previous
Next: Texts Up: Computer Science 270 Survey Previous: Who Should Take This

Subject Matter

If you're taking this course, you are already comfortable with the notion of writing a program, and you've learned some of the techniques and data structures most often used in computer programs, especially Scheme and/or Java programs. But those are only two of literally hundreds of computer languages, each with its own strengths and weaknesses. A programmer who approaches every problem thinking about how to solve it in, say, Java is like a carpenter who uses a hammer on everything, even when a saw or a screwdriver would be more appropriate. A competent programmer must be able to select the most appropriate language for any given problem. Furthermore, a competent programmer must be able to write idiomatically in each language, i.e, to write in the style to which that language is suited: don't be like a carpenter who chooses a screwdriver as the appropriate tool, but still uses it like a hammer. Finally, a competent programmer must be able to learn a new language and its idiom quickly.

We'll spend the first half of the semester learning the C++ language. Java, which most of you learned last semester, was intentionally modelled after C++, but with a number of simplifications and safety measures, and with some useful features removed. The syntax will look extremely similar, and most of the concepts are the same, so all we need to learn is how to live without the simplifications and safety measures in C++. In brief:

After the midterm exam, we'll spend about a month on the C language, the (much simpler) ancestor of C++. C, and to a lesser extent C++, is widely used in connection with the \(\mbox{Unix}^{\!\textsc{tm}}\) operating system, which most of you are studying concurrently in CSC 271. We'll also discuss how to use a debugger, an immensely valuable program that helps you see where your C and C++ programs are going wrong and how to fix them.

After Thanksgiving, we'll switch to a very different language named Prolog. Prolog was developed in the 1970's for applications in artificial intelligence, particularly expert systems, and it is still widely used in that area. If switching between Scheme and Java required you to ``shift mental gears'', Prolog will require you to shift into reverse, as most Prolog programs basically say ``I could solve this problem if only I could first solve those three other problems. I could solve those other problems if only ...''. Nonetheless, those of you who miss Scheme will find Prolog somewhat similar. Prolog requires completely different ways of thinking about programming: some of the problems you would work hard to solve in C++, Java, or even Scheme are trivial in Prolog, while other problems you wouldn't have even thought of from those mindsets become serious and reasonable questions in Prolog.


next up previous
Next: Texts Up: Computer Science 270 Survey Previous: Who Should Take This
2000-09-05