CS111 Notes

Lyn Turbak has prepared some notes for the course. You should be reading and referring to these as we go:

  1. Big Ideas
  2. Simple Java Programming
  3. JEM Examples

Also available is the text from the Fall'01 version of CS111. Although some of the conventions, emphasis, and terminology are different between the Fall'01 course and this semester, most of the basic concepts are the same, and the Fall'01 text is a valuable reference.

It is all too easy to write programs that are difficult to read and modify. To make programs more modular, and therefore easier to write, read, and debug, you should define and observe preconditions, postconditions, and invariants.

Working programmers rely on coding standards that help make code easier to write, read, and maintain, and that are consistent across a project or company. Of course, there are quite a few competing standards, but there are some common rules, and everyone agrees on the importance of a consistent style. Please read these notes on programming style to help you get started thinking about how to write good code.

In addition to well-modularized code that uses powerful invariants and a clear coding style, a programming community develops certain programming idioms, commonly accepted ways to encode certain very common tasks. In particular, beginning programmers often write unnecessarily verbose and awkward conditionals. Here is some advice on indentation and writing conditionals in Java.

Other Materials

Throughout the semester, we will post various resources, such as practice problems for the exams.