Welcome to WebmasterWorld Guest from 220.127.116.11
First, what makes a programming book? I would say the fundamental aspect is that a programming book is one for which you learn a language in order to read the book, you do not read the book in order to learn a language. The latter are syntax books. Put another way, programming books teach concepts, not languages. Programming books either assume that you know the language in question, are written in pseudo-code, or they use a language so simple that you can learn it as you go without problem. SICP (see below) uses the last approach.
There are four programming books that I've seen mentioned as the greatest programming books ever. I'm sure there are many more, but these are the ones I know of. I've only really read and worked with the first one.
The Structure and Interpretation of Computer Programs by Abelson and Sussman, often mentioned as SICP. The examples and exercises in this book are written in Scheme, a dialect of LISP, because Scheme has a very simple syntax, yet is one of the most powerful languages around. Among other things, it has "lambda functions [mitpress.mit.edu]", essentially functions that have no name and can, in fact, be written on the fly and passed to other functions as arguments. The book has long been used as the first "computer science" course for students at MIT and Berkeley where it is assumed that most incoming CS majors have several years of programming under their belts. This book focusses on generalizing functions, abstracting data and functions and other general concepts on how to approach a programming problem. It's the only one of the four that I mention that I actually own and have worked through. The entire book is available online [mitpress.mit.edu] and I highly recommend checking it out.
Design Patterns by Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides, the so-called "Gang of Four Book [en.wikipedia.org]". Not counting Christopher Alexander's A Pattern Language (which I have read and is really about architecture), this is the progenitor of the Patterns movement. Examples in C++ and Smalltalk (the first OO language AFAIK).
The Art of Computer Programming [en.wikipedia.org] by Donald Knuth. Named one of the twelve best books of the 20th century by American Scientist. Examples written in the hypothetical language MIX Assembly Language (for which free emulators exist). This is mostly a collection of computing algorithms.
Code Complete Second Edition by Steve McConnell is often bandied about as well as one of the best books on software development. This book, in its second edition, uses C++ and Java in the examples. Only selected chapters are available online [cc2e.com] as well as the table of contents and a few things like that.
Do any of you swear by any or all of these? I think SCIP is a *great* book that taught me a lot, but I honestly can't compare it to the others.
Are any titles missing that absolutely need to be on such a list? Remember, this list is about books that teach concepts, not languages.
To get the most from the book, you already need to know how to program, but reading it not only shows you how to write better code, but leaves you wanting to be a better programmer as well.
Looking now at the 'free' chapters of Code Complete, looks like a very well-written book.
From Chapter 5:
I can't describe what working through SICP did for the way I approach problems. Let's just say that I fold the laundry differently after reading SICP.
One interesting thing about SICP is that you have to think in terms of recursion since Scheme has no looping constructs like "while" or "for". The central idea behind recursion is to think like this
Can I answer this question easily?
If no, then simplify and ask again.
If yes, answer.
So you get used to just putting off anything that's too difficult to answer simply and moving on until you can answer. Simplest example would be something like finding factorials.
Q: What's 200!
A: 200 * 199!
Q: What's 199!
A: 199 * 198!
Q: What's 2!
SICP encourages that sort of approach to ever more complex problems.
The other things it spends a lot of time on are
- data abstraction
- functional abstraction
You can get carried away with abstraction, which can and will cause a performance hit in an interpreted language like PHP or Scheme, but I use more than I used to. Lots of constants since their fairly cheap and offer some minimal abstraction.
I also thing the "The C++ Programming Language (Special Edition)." is a great book as it teaches a lot of programming princpals and would be useful to anyone.
Knuth's books were great but a very tough read for me.