Comp 40:
Supplemental Readings

(Note: for information about textbooks used in COMP 40 consult the textbooks section of the of the Course Policies and Administration page.)

In COMP 40, you are learning to be professional C and UNIX/Linux programmers. In addition to the three main books that we recommend there are a number of excellent and important references, many of which are considered classics in the programming community. Please try to at least look at as many of these as you can and learn as much from them as you can.

Classic references on C and Unix programming

The Linux system we use is a descendent of UNIX, the classic operating system developed by Dennis Ritchie and Ken Thompson at AT&T Bell laboratories in the 1960s and 1970s. The C Programming Language was used to develop Unix, and although C (or its C++ and Objective-C) extensions are used for many other systems today, the basics of good C programming are closely linked to the basics of good UNIX programming. Accordingly, the following is a mix of classic references on C and UNIX programming. You should read all of these as soon as practical if you pursue a career in programming.

Brian W. Kernighan and Rob Pike, The UNIX Programming Environment, Prentice-Hall, Englewood Cliffs/NJ, 1984.

The classic guide to Unix hacking.

Brian W. Kernighan and Rob Pike, The Practice of Programming, Addison Wesley, 1999.

I don't know how to characterize this book except to say that Kernighan and Pike know as much as anyone about programming with C and Unix, and they have carefully identified the most important (and most entertaining) aspects of their programming practice and set them down concisely in a wonderful little volume of under 300 pages. Check out the excerpts on the web site and decide if you want to borrow the book from the library.

Brian W. Kernighan, The Elements of Programming Style, McGraw-Hill, New York, 1978.

This classic guide shows good programming style by example—often by bad example! If the instructor or grader has cited you for poor programming style, you should read this book.
Peter van der Linden, Expert C Programming: Deep C Secrets, Prentice Hall, 1994.
A quirky, lighthearted explanation of some of C's dark corners. Although it is a bit biased toward explaining ANSI C (which is now old hat), it's an excellent book for a C programmer with medium experience to deepen his or her understanding of how to write good C programs. If you want to own just two books on C, this is a good one. It should be on reserve in the library.

Other useful references

Kent Beck, Extreme Programming Explained.

An interesting book overall, and has the best detailed description of pair programming (why and how) that I have read. On reserve in the library.

David Goldberg, What Every Computer Scientist Should Know About Floating-Point Arithmetic, ACM Computing Surveys, 1(23):5--48, 1991.

In which you can learn, among other things, why your instructor hates the floating-point unit.

Norman Ramsey, Literate programming simplified, IEEE Software, 11(5):97-105, Sep 1994.

A discussion of literate programming with noweb.
David R. Hanson and Norman Ramsey, Supplement to C Interfaces and Implementations
Coverage of the Unboxed Array interface.