Wednesday, October 15, 2008

My favorite computer science book



Pierce's Types and Programming Languages is a masterful introduction to the theory and practice of type systems.  One of the things that makes this book so great is that it is equally accessible to both the theory-oriented and the practice-oriented.  This was driven home to me in a conversation with Ola Bini, when I saw he was carrying this book, and he commented "I love this book because I can skip all the math and get what I need from the ML implementation."  I answered that I liked it for the opposite reason; I was able to get everything I needed from the math and didn't have to look at the code.  Its pretty impressive that a book can be that useful and successful from two such radically different reader approaches.

I found that Pierce's treatment was extremely accessible.  He starts with almost no assumptions, introduces first the untyped lambda calculus, then the simply typed lambda calculus, some obvious extensions (records, references, subtyping, union types, functional objects, etc), operational semantics, and builds gradually to more useful type systems.  Each section includes motivation, analysis, a formal description of the system, soundness proofs, and ML code; the impatient can skip some of these and still get what he's talking about.  There is working code for each of the languages developed.  (The type systems were developed in a system that the author wrote called TinkerType, which makes it possible to build type systems by "mixing and matching" features, and it generates both the ML code and TeX source for generating the figures used in the book -- most impressive!)

Not only is this book useful to anyone who is interested in the design and science of programming languages, but it is also a pleasure to read.

What's your favorite computer science book?  (Unoriginality points for anyone who says TAOCP.)

16 comments:

  1. Java Concurrency in Practice (!) and Programming Pearls.

    Swami
    Singapore

    ReplyDelete
  2. "Java Concurrency in Practice" is great indeed, but if I had to pick another one: "Sun Certified Java Programmer Study Guide". Extremely well written, lots of humor. Certainly not anywhere as relevant as TAOCP, but you can't help to notice the amount of work that went into fine-tuning this series. Simply a joy to read.

    ReplyDelete
  3. Completely forgot I talked to you about this book, but now I was reminded. =)

    My favorite computer science book would be Godel, Escher, Bach, if that qualifies.
    Otherwise I would be hard pressed to choose something like The Art of the Metaobject Protocol, The wizard book, or maybe Lisp In Small Pieces.

    I'm actually not that fond of TAOCP. =)

    ReplyDelete
  4. I do not have a single one. OOSC definitively belongs on the list because Meyer writes so profound about all aspects of OO. It is a very good book to use as a basis for reasoning about OOA/D/P. "Mastering Regular Expressions" is another one because Friedl manages to help readers understand peculiarities of different regexp engines without needing too much CS theory and as a side effect improves general understanding of regular languages. "Effective Oracle by Design" is also a very good book because it conveys profound knowledge of internal mechanics of Oracle and provides extreme valuable help for thinking out of the box when it comes to finding efficient solutions.

    ReplyDelete
  5. "Thinking in Java" of Bruce Ekcel and "Design Pattern" of GoF.

    ReplyDelete
  6. Java IO by Elliote Harold. I consider it pleasure reading (I've read it cover to cover ~8 times). Additionally I would like to mention the 'Head First' series by O'Reilly.. surprisingly effective!

    ReplyDelete
  7. Types and Programming Languages is my favorite computer science book too. It is succinct, and the chapters don't need to be read in order. Great book!

    ReplyDelete
  8. The Manga Guide to Databases.

    http://www.amazon.com/Manga-Guide-Databases-Mana-Takahashi/dp/1593271905/ref=sr_1_1?ie=UTF8&s=books&qid=1224252838&sr=8-1

    ReplyDelete
  9. Probably SICP. But Michael A. Jackson's Principles of Program Design (from 1974) is way up there too.

    ReplyDelete
  10. Concepts, Techniques and Models of Computer Programming (CTM) would be on the top of my list, followed closely by SICP. I've started in on Types and Programming Languages a couple of times, but keep getting bogged down, though I would highly rate the book in spite of my limitations.

    ReplyDelete
  11. Of the ones not mentioned so far: Essentials of Programming Languages, 3rd ed., by Friedman and Wand. ISBN 9780262062794.

    ReplyDelete
  12. SICP is indeed a contender. I used it at MIT as a grad student, and I was blown away at just how much great material they manage to cover in a one-semester text. I liked CTM too, but it didn't resonate with me quite as much as SICP; I guess that while I could imagine using Scheme in the real world (although it's still a bit of a stretch), Oz seemed too much of a stretch.

    ReplyDelete
  13. I am fond of ANSI Common Lisp and the previously mentioned AOMOP. For raw motivation I like to read The Soul of a New Machine and The Cuckoo's Egg.

    -m

    ReplyDelete
  14. "Distributed Algorithms".

    ReplyDelete