homepage Welcome to WebmasterWorld Guest from 54.161.192.61
register, free tools, login, search, pro membership, help, library, announcements, recent posts, open posts,
Become a Pro Member

Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
Forum Library, Charter, Moderators: coopster & jatar k

PHP Server Side Scripting Forum

    
Best Programming Book There Is?
Not a syntax book!
ergophobe

WebmasterWorld Administrator ergophobe us a WebmasterWorld Top Contributor of All Time 10+ Year Member



 
Msg#: 6810 posted 6:39 pm on Feb 5, 2005 (gmt 0)

I've been thinking of posting something along these lines for a while and was prompted to do it by the latest "Best PHP Book?" thread.

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.

 

uncle_bob

10+ Year Member



 
Msg#: 6810 posted 12:07 am on Feb 6, 2005 (gmt 0)

I can thoroughly recommend Code Complete. I've only the first edition, but I try and re-read it every couple of years.

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.

mincklerstraat

WebmasterWorld Senior Member 10+ Year Member



 
Msg#: 6810 posted 8:55 am on Feb 7, 2005 (gmt 0)

Thanks for the links, Tom. I've been planning on reading SICP for some time now but haven't gotten around to it yet.

Looking now at the 'free' chapters of Code Complete, looks like a very well-written book.

From Chapter 5:

  • Design is about Priorities: so true, and one of the things completely missed by more 'doctrinaire' guru-types. Quite glad we don't have a resident 'always-do-it-this-way' type here, this can be quite annoying.
  • Design involves Restrictions: very important point to get at the very beginning of a project. You won't be able to do everything, you'll have to make intelligent choices and stick to them. If you keep your windows too open at the beginning, you pay for it in so much confusion, and so many decisions that were made too late, so your code isn't built around good, solid principles.
  • ergophobe

    WebmasterWorld Administrator ergophobe us a WebmasterWorld Top Contributor of All Time 10+ Year Member



     
    Msg#: 6810 posted 3:44 am on Feb 10, 2005 (gmt 0)

    I think Code Complete is a different beast entirely from SICP. A lot more focussed on project management. SICP is more about how to think about algorithms I guess.

    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!
    A: 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.

    vabtz



     
    Msg#: 6810 posted 3:52 am on Feb 10, 2005 (gmt 0)

    "Code Complete" is by far the best book I have read. I also try to read it once a year and use it as a reference all the time.

    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.

    Global Options:
     top home search open messages active posts  
     

    Home / Forums Index / Code, Content, and Presentation / PHP Server Side Scripting
    rss feed

    All trademarks and copyrights held by respective owners. Member comments are owned by the poster.
    Home ¦ Free Tools ¦ Terms of Service ¦ Privacy Policy ¦ Report Problem ¦ About ¦ Library ¦ Newsletter
    WebmasterWorld is a Developer Shed Community owned by Jim Boykin.
    © Webmaster World 1996-2014 all rights reserved