Programming Books that Make You Smarter

These are wonderful books that would help anyone become a better programmer. Most of these are known and loved by a small group of geeks, but are not picked up by a broader audience because of the programming language used in them.

In many cases, however, the message conveyed is not how to program in the given language, but how to look at programming problems from another perspective. Every language needs a different mindset, and I believe that these books make you think in ways you never did before. I would recommend them even if you will never program in these languages.

Some of the books are distributed on the internet for free, I hope the links will stay working.


  • R. Hyde, The Art of Assembly Language, 2nd Ed., No Starch Press, 2010.
    A nice introduction to the inner workings of the computer and to assembly programming. I think every programmer should have a thorough understanding of assembly (in an arbitrary architecture). You may want to read this first, to be able to fully enjoy the two books below.

    Online version:

    I find that I actually like the original version better, which used conventional assembly instead of HLA. You can find it here:

    Original version:

  • H. S. Warren, Hacker's Delight, Addison-Wesley, 2002.
    Advanced bit-shuffling techniques for optimized code.


  • C. Emerick, B. Carper, C. Grand, Clojure Programming, O'Reilly, 2012
    This is an introductory text to Clojure, which is a Lisp dialect on the Java VM, with a more functional approach than Common Lisp. This enables features like lazy evaluation and a novel transaction-based concept for multithreaded programming. It combines Haskell-like list comprehension with real macros emerging from the code-as-data paradigm, while offering access to Java libraries.

Common Lisp

(See also Scheme / Lisp for books on other lisps.)

  • P. Seibel, Practical Common Lisp, Apress, 2005.
    (Common) Lisp is my language of choice, for various reasons. It has some features that make it the most comfortable language (for me), like macros, closures, REPL… This book is the best introduction to Common Lisp and to programming in the Lisp Way. Read it and then move on to the books below.

    Online version:

  • P. Graham, On LISP, Prentice Hall, 1993.
    Advanced Lisp programming, mostly using macros. After experiencing the power of metaprogramming in Lisp, you won't be content with "conventional" languages anymore.

    Online version:

  • D. Hoyte, Let Over Lambda,, 2008
    Advanced Lisp programming, mostly using closures. This powerful construction is now making its way into more mainstream languages as well.
  • E. Weitz, Common Lisp Recipes, Apress, 2016.
    This is a reference book of advanced CL techniques, but I've read it cover to cover, and learned a lot from it, even though I've been using Lisp for more than a decade. It covers, in addition to the core language, some of the best open-source libraries, as well.
  • S. E. Keene, Object-Oriented Programming in Common Lisp - A Programmer's Guide to CLOS, Addison-Wesley, 1989.
    Everything you wanted to know on how to use CLOS. I would recommend this even to people who doesn't use CL, just to show them that there are other ways to do OOP.

    When you feel comfortable with CLOS, move on to:

  • G. Kiczales, J. des Rivières, D. G. Bobrow, The Art of the Metaobject Protocol, MIT Press, 1991.
    This book explores object-oriented reflective techniques for language extension & design, through the derivation of Common Lisp's object system. It also lets us peek under the hood of CLOS, and serves also as a MOP reference. A bit dry, but interesting book.
  • P. Norvig, Paradigms of Artificial Intelligence - Case Studies in Common Lisp, Elsevier, 1991
    A book on building AI systems - with Common Lisp at its best.


  • F. Cesarini, S. Thompson, Erlang Programming, O'Reilly, 2009
    An Introductory text on Erlang - a language based on the message passing techniques of concurrent programming. Twists your brain in ways you have never imagined.

Factor & Forth

  • L. Brodie, Starting Forth, 2nd Ed., Prentice Hall, 1987
    A wonderful book teaching the essentials of Forth programming. The simplicity of its syntax and the power of the language is really astounding.

    Online version:

  • L. Brodie, Thinking Forth: A Language and Philosophy for Solving Problems, Prentice Hall, 1984
    This classic teaches programming practices still relevant today. While some topics are specific to Forth, most of the ideas are applicable to other programming environments, as well. It encompasses all aspects of programming, such as analysis, design, problem solving, implementation, factoring, even style and documentation.

    A reprint and an ANS Forth-compatible version are available as parts of the Thinking Forth Project:

  • R. W. M. Jones, jonesforth - a literate Forth compiler
    This is a simple, but fascinating program, written in a literate style. Reading this, you can build a compiler from the very foundations, which is an experience you'll never forget.

    Online version:

  • B. Rodriguez, Moving Forth, In: The Computer Journal (59-60, 62, 64, 67, 69, 71, 74), 1993.
    This series of articles investigate the various methods and tricks for implementing a Forth compiler on various architectures. If you have read jonesforth, this is the next step.

    Online version:

  • C. Childers, RetroForth
    The bootup image of RetroForth, complete with a metacompiler, is thoroughly commented in a literate style. It is also lots of fun to read.

    Online version: RetroForth Commentary

  • S. Pestov, Factor
    I don't know of any books on Factor programming yet, but it has a neat help system and browsing the vast standard library and examining its code is very rewarding.

    Online version:


  • M. Lipovaca, Learn You a Haskell for Great Good, No Starch Press, 2011
    Haskell is a strictly functional language with a lot of lazyness and a mind-boggling (but amazing!) type system. I've read quite a few tutorials, but this is the book that made me grasp what Haskell is all about.

    Online version:

  • B. O'Sullivan, D. Stewart, J. Goerzen, Real World Haskell, O'Reilly, 2008
    After a good introduction (like LYaH above) this is the book that tells you all the intricacies of Haskell programming through practical examples. While other books mainly emphasize the theoretical aspects of Haskell, here you will find that it can actually be used for real programming, as well.

    Online version:

  • S. P. Jones, The Implementation of Functional Programming Languages, Prentice Hall, 1987.
    This is to Haskell what Anatomy of LISP is for Lisp. Well, for Miranda, to be exact, as Haskell only appeared in 1990. The book first explains the translation of functional programs into an enriched lambda-calculus, and then analyzes the evaluation of this intermediary language.

    Online version:

  • R. Bird, Thinking Functionally with Haskell, Cambridge, 2015
    Another nice introductory text to both Haskell and functional programming. To me, its main attraction is that each chapter has a number of exercises (with solutions!), something that LYaH lacked. It also has chapters on algorithmic proofs and efficiency, topics that are usually overlooked in beginner books. Still, I wouldn't recommend it as a first book, because of its ad hoc structure, and its focus on proofs (which makes it a bit dry to my taste).


  • G. Nelson, The Inform Designer's Manual, Dan Sanderson, 2006.
    Inform is a language for writing interactive fictions. This book shows the power of DSLs, and is also fun to read.
  • A. Reed, Creating Interactive Fiction with Inform 7
    And now for something completely different: programming in a way you've never done before. The Inform 7 compiler parses English sentences - probably the most novice-friendly language ever!


  • C. A. Reiter, Fractals, Visualization and J, 3rd Ed., 2007.
    Any book on J would be good to make you think in new ways - it's not only that a seemingly meaningless string of garbage is actually working code; the ubiquity of matrices in this language is awe-inspiring. I chose this book because the nice graphics add some extra enjoyment to the ride.


  • D. E. Knuth, The Art of Computer Programming Vol. 1-3, 3rd Ed., Addison-Wesley, 1998.
    No list of programming books would be complete without this. All the basics of programming, data structures and algorithms are there. Rumor has it that there will be a 4th volume coming out soon.


  • J. D. Ullman, Elements of ML Programming, ML97 Ed., Prentice Hall, 1998
    A nice introduction to Standard ML, and to the world of functional programming in general. However, it uses a non-ML-y style (tupled arguments, redundant semicolons…) to ease the transfer from conventional programming languages.
  • C. Okazaki, Purely Functional Data Structures, Cambridge University Press, 1998
    Okazaki's thesis, later made into a commercial book. A classic treatise on how to build and modify data structures in a purely functional context.

    The original thesis:

  • M. Felleisen, D. P. Friedman, The Little MLer, MIT Press, 1997
    An introduction to (a subset of) ML and to using a refined type system, in the style of The Little Schemer.


  • The Perl Manuals
    Perl has very good tutorials. Read them (or at least man perlintro) and move on to this book:
  • M. J. Dominus, Higher-Order Perl, Elsevier, 2005.
    Perl programming using advanced programming techniques, with a lot of nice exercises.

    Online version:


  • I. Bratko, Prolog Programming for Artificial Intelligence, 4th Ed., Pearson, 2011.
    If you buy only one Prolog book, this should be it. It covers the basics as well as some advanced techniques. There are examples of many AI applications, such as expert systems, machine learning, or game AI. There is also a chapter on metaprogramming.
  • L. Sterling et al., The Art of Prolog, 2nd Ed., MIT Press, 1994.
    This is also an all-in-one book, starting from the basics, but also presenting advanced programming techniques, and many interesting application examples. It is a bit more technical, and focuses more on programming languages - interpreters, compilers, program transformation, and less on artificial intelligence.
  • R. A. O'Keefe, The Craft of Prolog, MIT Press, 1990.
    Aimed at experienced Prolog programmers, this book explains how to write good Prolog code. A classic.
  • H. Aït-Kaci, Warren's Abstract Machine, MIT Press, 1991.
    An in-depth tutorial on the de facto standard virtual machine behind Prolog.

    It is now out of print and downloadable for free (along with some slides):

  • U. Nilsson et al., Logic, Programming and Prolog, 2nd Ed., Wiley, 1995.
    This is an introduction to the inner workings of Prolog for the mathematically inclined. It covers the basics of several variants of logic programming, such as constraint programming or concurrent logic programming.

    It is now out of print and downloadable for free:

Scheme / Lisp

(See also Common Lisp.)

  • H. Abelson, G. J. Sussman, Structure and Interpretation of Computer Programs, 2nd Ed., MIT Press, 1996.
    Also called the "Wizard Book", this is an introduction to programming in general using Scheme as a medium. An abundance of exercises helps you understand the concepts. There is even a videocourse downloadable on the internet.

    Online version:

  • R. K. Dybvig, The Scheme Programming Language, 4th Ed., MIT Press, 2009.
    An introduction and reference to the Scheme language.

    Online version:

  • C. Queinnec, Lisp in Small Pieces, Cambridge University Press, 2003.
    The complete guide to write your own Scheme/Lisp compiler. This is also called the modern-day version of Allen's Anatomy of LISP (see below).
  • J. Allen, Anatomy of LISP, McGraw-Hill, 1978.
    This book explains how to write an interpreter or compiler to (an old version of) lisp. Its non-lispy notation may be strange at first, but it serves an important purpose: abstract definitions and the actual representations are completely separated. After so many years, it's still a deep and very enjoyable read.
  • D. P. Friedman, M. Felleisen, The Little Schemer, 4th Ed., MIT Press, 1995
    A fun read in dialogue format leading you step-by-step to the Y-combinator and the construction of a Scheme interpreter.
  • D. P. Friedman, M. Felleisen, The Seasoned Schemer, MIT Press, 1995
    This is the sequel to "The Little Schemer", using the same didactic style, introducing some more advanced language features, like destructive methods and continuations.
  • D. P. Friedman, W. E. Byrd, O. Kiselyov, The Reasoned Schemer, MIT Press, 2005
    The third book in the series take us to the field of logics, building a Prolog-like language in the process.
  • D. P. Friedman, M. Wand, Essentials of Programming Languages, 3rd Ed., MIT Press, 2008
    This is a book about interpreters, and the languages they interpret. Its main message is that any sufficiently complex system needs a DSL, and for that, an interpreter. It also discusses various types of languages while creating an interpreter for them, adding one feature at a time.


  • C. Liu, Smalltalk, Objects, and Design, toExcel, 1999
    This is the book usually recommended by the community along with the 'blue book' (or its later edition, the 'purple book'), which are the language reference manuals.

    Smalltalk is a unique language that also needs a different frame of mind than most languages you have encountered before. Unfortunately, since GUI is an important part of the language, implementations differ considerably. However, most Smalltalk systems have some kind of help to get you started - and then just explore, explore, explore.

    I recommend Pharo, a very small, fast and clean Smalltalk. Other implementations include Squeak and Smalltalk/X.

    There is a collection of free books here:

Language-independent Books

Here I list some books that are about programming generally, and do not use any specific language.

  • A. K. Dewdney, The (New) Turing Omnibus, Freeman / Holt, 1993
    This is a collection of 66 topics, ranging from formal languages and algorithms to computer vision and cryptography. There is even a description on how to build a minimal computer. Each chapter is only a few pages, just long enough to spark your interest, recommend some relevant books, and present some problems to think about. Sadly, my Holt Paperbacks edition contains quite a lot of misprints.
  • S. S. Skiena, The Algorithm Design Manual, 2nd Ed., Springer, 2008
    All kinds of algorithms you may need. It is split in two parts - the first part is a logical walkthrough on programming techniques, graph algorithms or dynamic programming methods. The second part is a reference, listing problems and possible algorithms that you can use, as well as existing libraries.
  • T. H. Cormen et al., Introduction to Algorithms, 3rd Ed., MIT Press, 2009
    Another nice book on algorithms, with a bit more depth and coverage. It is less of a reference, though, and more of a university course.
  • J. Bentley, Programming Pearls, Addison-Wesley, 1986
    Interesting real-life problems, rendered as exercises for the reader, then a detailed explanation follows. A must read.
  • J. Bentley, More Programming Pearls - Confessions of a Coder, Addison-Wesley, 1988
    The sequel.
  • R. Bird, Pearls of Functional Algorithm Design, Cambridge, 2010
    A worthy successor of Bentley's "pearl" books, this volume looks at functional programming techniques in the same fashion. An essential read for all Haskell programmers, but its notations may scare off the uninitiated.
  • S. J. Russell et al., Artificial Intelligence - A Modern Approach, 3rd Ed., Pearson, 2009.
    The definitive text on AI. But be sure to check out the language-dependent alternatives (see Prolog and Common Lisp).
  • P. Seibel, Coders at Work, Apress, 2009
    A series of interviews with some of the most influential programmers. I normally don't read interviews, but these are packed with interesting information and anecdotes; I got a lot of inspiration from this book.
  • M. C. Feathers, Working Effectively with Legacy Code, Prentice Hall, 2004
    A book on simplifying existing code, creating unit tests, and refactoring.

So what should I read?

My highly opinionated guide would be something like this:

  • Lisp block:
    1. Structure and Interpretation of Computer Programs
    2. Practical Common Lisp
    3. On LISP
    4. (if you are hooked => Let Over Lambda, Common Lisp Recipes, Anatomy of Lisp / Lisp in Small Pieces)
  • Low-level language block:
    1. The Art of Assembly Language
    2. Starting Forth
    3. jonesforth
    4. Moving Forth
    5. (Factor docs)
  • General block:
    1. The (New) Turing Omnibus
    2. The Algorithm Design Manual (and if you liked it, Introduction to Algorithms)
    3. Programming Pearls (and if you liked it, More Programming Pearls)
    4. Artificial Intelligence - A Modern Approach (or: Prolog Programming for Artificial Intelligence / Paradigms of Artificial Intelligence)
  • OOP block:
    1. Smalltalk, Objects, and Design
    2. Object-Oriented Programming in Common Lisp
    3. The Art of the Metaobject Protocol
  • Haskell block:
    1. Learn You a Haskell for Great Good
    2. Real World Haskell
    3. Pearls of Functional Algorithm Design
    4. (if you are hooked => The Implementation of Functional Programming Languages)

(The blocks can be studied in sequence or in parallel.)

Note that all books in bold are free, so you can start learning right away!

Date: 2016-05-15T08:44+0900

Author: Peter Salvi

Org version 7.9.3f with Emacs version 24

Validate XHTML 1.0