Programming Books

Practical programming books—all recommended.

This annotated bibliography lists the books in date order from most to least recent. (There's also a convenient alphabetical title index on the right.) This bibliography only includes books that I think are worth reading (and that I myself have bought and read), but excludes my own books. All comments are about the specified print edition, not about the possibly mangled ebook or translated versions.

  Alphabetical Title Index
• Advanced Programming in the UNIX Environment
• Architecture of Open Source Applications Volume I, The
• Architecture of Open Source Applications Volume II, The
• Art of Multiprocessor Programming, The
• C in a Nutshell
• C++ Concurrency in Action
• C++ in a Nutshell
• Clean Code
• Code Complete
• Design Patterns
• Domain-Driven Design
• Don't Make Me Think, Revisited
• Effective C++
• Effective Modern C++
• Exercises in Programming Style
• Fluent Python
• GUI Bloopers 2.0
• High Performance Python
• Java Concurrency in Practice
• JavaScript: The Definitive Guide
• Linux Programming by Example
• Mastering Regular Expressions
• OpenGL SuperBible
• Programming Rust
• Programming in Scala
• Python Cookbook
• Python Essential Reference
• Python in a Nutshell
• Rapid Development
• Rust Programming Language, The
• Security in Computing
• Seven Concurrency Models in Seven Weeks
• SQL for Smarties
• Tcl and the Tk Toolkit
• Using SQLite
The Rust Programming Language
Steve Klabnik and Carol Nichols (No Starch Press; 2018)

Rust is a modern language that can be used to create applications and systems of all kinds. The language uses aggregation and traits rather than inheritance. The Rust compiler does extensive code analysis to make it impossible to introduce data races in concurrent code, and generally eliminates whole categories of potential errors that C/C++ compilers are defenceless against. The compiler uses the LLVM toolchain, so produces fast-running executables. Rust's build tool, cargo, is a pleasure to use.

This book teaches Rust from scratch, but assumes some programming knowledge. It is Rust's official textbook and is freely available online. The early part of the book is a bit uneven—alternating between baby steps and being more demanding, but it does give good overall coverage of the language. The book goes beyond being a mere introduction in that it explains some subtle and important Rust features including interior mutability and key patterns of use, especially for concurrency. However, no mention is made of the excellent and easy-to-use concurrency provided by the rayon crate. The error handling coverage is barely adequate, with no mention of the error-chain, failure, or quick-error crates.

This book will be useful to anyone starting out with Rust. In addition to covering the language and glimpses of the standard library, it illustrates good Rust style, something not always obvious (for Rust or any language) simply by reading the documentation.

Programming Rust
Jim Blandy & Jason Orendorff (O'Reilly Media; 2017)

This book teaches Rust to programmers of other languages. Given the dearth of good Rust books, this book is certainly worth reading. It covers the Rust language pretty fully, although it doesn't cover much of the standard library, or have much to say about third-party libraries. The book introduces the novel and advanced feature of “lifetimes” rather early, which would have been fine if the subject had been returned to later on to explain how and when to use owned and borrowed data in structs. The index is poor. Overall, this book is adequate for getting to grips with all the basics, and is sufficient to get people to the point of writing their own small programs. A lot more reading elsewhere will be required to progress further though.

Python in a Nutshell
Alex Martelli, Anna Ravenscroft, & Steve Holden (O'Reilly; 2017)

This book presents the entire Python language (2.7–3.6), many parts of the standard library, and some important third-party libraries. It is ideal for beginner/intermediate Python programmers who want to broaden their knowledge with a useful overview; and for those moving from other languages to Python. The book provides sufficient introduction to get started with many major topics in Python programming, and usually provides links for where to get further information. The coverage of Python 2.7 is unfortunate since it complicates and confuses the text in places.

Programming in Scala
Martin Odersky, Lex Spoon, Bill Venners (Artima; 2016)

Scala is a hybrid object-oriented—functional language for the Java Virtual Machine. The language itself is large and interesting. And this book is an excellent introduction. In fact, this book could be taken as a model of how to write a programming language textbook. The explanations are crystal clear using appropriate technical terminology (that's properly explained), and liberally illustrated with readable and understandable examples throughout. For anyone coming from a procedural or object-oriented programming background—and for anyone considering writing a programming textbook—this book is well worth reading.


Fluent Python
Luciano Ramalho (O'Reilly Media; 2015)

This is essential reading—in addition to the Python Cookbook and my own Python in Practice—for any Python programmer (beginner to intermediate) who wants to broaden and deepen their understanding of Python. The book is wide-ranging and interesting with the occasional flash of humor. It includes an introduction to using Python 3.4's asyncio module. The only weak area is the coverage of meta-programming which is rather short and superficial; but the rest of the book is really excellent.


SQL for Smarties: Advanced SQL Programming
Joe Celko (5th edition; Morgan Kaufmann; 2015)

On the positive side the book illustrates many useful, powerful, and advanced features of standard SQL, and is packed with interesting advice and information. On the negative side the prose is often poorly written and is littered with typos; and sadly, the typos extend into some of the examples too. Apart from the typo caveats, this book should be useful for anyone looking to move more of their code out of their procedural language and into pure SQL, and for anyone wanting to deepen and broaden their SQL knowledge.


Effective Modern C++
Scott Meyers (O'Reilly Media; 2014)

Every programmer ought to read this book—whether or not they use C++!

If you use C++, you need this book because it explains all the major pitfalls and how to avoid them, as well as all the important best practices. It covers the type deduction rules, the use of auto, move semantics, smart pointers, rvalues, lambda expressions, as well as a bit of useful advice on concurrency. (For comprehensive coverage of C++ concurrency see C++ Concurrency in Action. And for more advice on C++ programming, much of it still valuable, see Meyers' other books, especially, Effective C++.)

If you don't use C++, you need this book so that you can show your boss all the reasons why it would be insane to use C++ to build reliable and maintainable software. It isn't that C++ can't be used for such purposes, but rather that is has become so complex and so subtle that only the best programmers on their best form can make full use of it without tripping up. For mere mortals, pretty well any other mainstream language will be a better choice not because of any limitations in C++ (it has few left), but because it is so easy to make subtle mistakes and so easy to write code that's only comprehensible to gurus.


Exercises in Programming Style
Cristina Videira Lopes (Chapman and Hall/CRC; 2014)

This unusual and interesting book takes a simple programming problem and presents over thirty different implementations, each illustrating a different programming style. This approach makes it very clear how the different styles differ, and the accompanying explanations help with understanding the trade-offs. The examples are in Python 2 and written in a very simple style so they are easy to understand and apply to any language. The book will be most useful to intermediate programmers seeking to broaden their toolbox of coding ideas and practices, on their way to becomming more advanced practitioners.


High Performance Python: Practical Performant Programming for Humans
Micha Gorelick & Ian Ozsvald (O'Reilly Media; 2014)

This book is mostly focused on Python 2.7 with a few remarks about Python 3 here and there. It is also geared up mainly to those using Linux. The book looks at the fundamentals—in particular, profiling and the use of Python's built-in data structures. It also introduces NumPy and Cython, as well as some lesser known technologies. The book will be of most benefit to two kinds of reader: those doing large scale processing on a single machine (e.g., big numeric computations), and those doing large scale processing more generally (e.g., using clusters or cloud computing). Apart from the early chapters which go into reasonable depth, most of the rest provides introductory material on techniques and technologies to get you started. A useful overview and a useful start for those beginning to get to grips with performance problems.


Seven Concurrency Models in Seven Weeks: When Threads Unravel
Paul Butcher (Pragmatic Bookshelf; 2014)

Ignore the "Seven Weeks" silliness—this is a really well written and interesting book that looks deeply into the major approaches to doing concurrency. The book covers all the pitfalls as well as showing the benefits, and is written in an accessible style that any moderately experienced programmer should be able to understand. The examples are in different languages since some approaches to concurrency are available only in particular languages, but are well explained and easy to follow even if you don't know the language concerned. This book serves as an excellent introduction to concurrency, although experienced concurrent programmers should also find much of interest. C++ programmers should also read C++ Concurrency in Action. Java programmers should read Java Concurrency in Practice; hard-core Java programmers might also enjoy The Art of Multiprocessor Programming.


Don't Make Me Think, Revisited: A Common Sense Approach to Web Usability
Steve Krug (3rd edition; New Riders; 2014)

This is a short and practical book on web usability based on research and experience. Applying the easy-to-understand ideas in this book will improve any web site of any size. (Based on the second edition.)

amazon InformIT

Advanced Programming in the UNIX Environment
W. Richard Stevens, Stephen A. Rago (3rd edition; Addison-Wesley Professional; 2013)

A thorough in-depth introduction to Unix programming using the Unix system call APIs and the standard C library. The book's examples are in C. (Based on the second edition.)

amazon InformIT

OpenGL SuperBible: Comprehensive Tutorial and Reference
Graham Sellers, Richard S. Wright, Nicholas Haemel (6th edition; Addison-Wesley Professional; 2013)

This is a good introduction to 3D graphics using OpenGL, suitable for programmers without prior 3D graphics experience. The examples are written in C++, but the OpenGL APIs are usually pretty faithfully reproduced in bindings for other languages (e.g., PyOpenGL for Python), so the book's examples can be used without too much adaptation.

amazon InformIT

Python Cookbook
David Beazley, Brian K. Jones (3rd edition; O'Reilly Media; 2013)

This book is full of interesting and practical ideas covering all aspects of Python 3 programming. I have two caveats. First, some of the ideas for improved efficiency only seem to work well for unrealistic examples. Second, some of the more advanced examples show what can be done—but not necessarily what one ought to do when writing maintainable code. Nonetheless, every Python programmer should buy and read this book.


The Art of Multiprocessor Programming
Maurice Herlihy, Nir Shavit (Morgan Kaufmann; 2012)

This book provides a thorough introduction to multithreaded programming, including small but complete working examples (in Java) that demonstrate all the key techniques. The last chapter provides a brief introduction to transactional memory, one of the hopes for a higher-level approach to threading that doesn't burden programmers with all the petty bookkeeping details that conventional techniques demand. This is not light reading, but worthwhile for those who really want to understand multithreaded concurrency rather than simply use it through their language's libraries. Incidentally, the links are to the revised reprint, I only have the original. For a more accessible introduction to concurrency (not just using threads), see Seven Concurrency Models.


C++ Concurrency in Action: Practical Multithreading
Anthony Williams (Manning Publications; 2012)

This challenging book covers concurrency in C++. It describes many of the problems and pitfalls that can afflict concurrent programs that use threading (regardless of language), and explains how to avoid them.


The Architecture of Open Source Applications Volume II
Amy Brown & Greg Wilson (editors) (Brown & Wilson; 2012)

This book follows the same pattern as Volume I (described below). And like Volume I it is interesting and useful, especially for those contemplating larger or multi-person projects.


The Architecture of Open Source Applications Volume I
Amy Brown & Greg Wilson (editors) (Brown & Wilson; 2011)

This is an unusual and valuable book. Each chapter covers a different open source application and is written by one of the application's lead developers. Each chapter gives a brief introduction to what the software does and then goes on to explain the overall architecture, the rationale for the key decisions, and concludes with a brief assessment of the project's successes and failures. Anyone interested in building larger scale software or working on multi-person software projects should find something of interest in this book.


JavaScript: The Definitive Guide: Activate Your Web Pages
David Flanagan (6th editon; O'Reilly Media; 2011)

This is an ideal tutorial and reference for JavaScript/ECMAScript. It is comprehensive and easy to read, and the examples work. The few bits of JavaScript used on this website are all based on ideas and examples from this book.


Using SQLite
Jay A. Kreibich (O'Reilly Media; 2010)

Don't be put off by the “Lite” in SQLite—SQLite is a real database with excellent SQL support. SQLite is very widely deployed and is useful not only as a conventional SQL database but also as a single-file file store for application data. This book shows how to use SQLite to create, modify, and query databases. It also serves as a good introduction to SQL since it doesn't assume prior knowledge of SQL. In addition to being a fine tutorial, the book is also a good reference. SQLite is accessible to any language which can access C libraries (pretty well all languages). For example, Python includes built-in support for SQLite with its sqlite3 module; but I recommend using APSW instead since it is far superior, offering as much access to SQLite as C programmers get but through a nice Python API.


Python Essential Reference
David M. Beazley (4th edition; Addison-Wesley Professional; 2009)

The book's title is an accurate description. The fourth edition has been updated to cover both Python 2.6 and Python 3.0. Most of the book is devoted to Python's standard library as well as covering more advanced features such as extending Python with C libraries and embedding the Python interpreter into other programs. Personally, I find David's Python Cookbook more useful and interesting.

amazon InformIT

Tcl and the Tk Toolkit
John K. Ousterhout, Ken Jones (2nd edition; Addison-Wesley Professional; 2009)

This is the standard text on Tcl/Tk 8.5. Tcl is an unconventional, almost syntax-free language. It is worth learning about simply because it is so different from almost anything else, and the ability to write lightweight cross-platform GUI programs with it is a useful bonus.

amazon InformIT

Clean Code: A Handbook of Agile Software Craftsmanship
Robert C. Martin (Prentice Hall; 2008)

This book addresses many “tactical” issues in programming: good naming, function design, refactoring, and similar. The book has many interesting and useful ideas that should help any programmer improve their coding style and make their programs more maintainable. The book's examples are in Java, but in most cases they are applicable to any object-oriented language (and often to procedural languages too).

amazon InformIT

GUI Bloopers 2.0: Common User Interface Design Don'ts and Dos
Jeff Johnson (2nd edition; Morgan Kaufmann; 2007)

Don't be put off by the slightly whimsical title; this is a serious book that every GUI programmer should read. You won't agree with every single suggestion, but you will think more carefully and with more insight about user interface design after reading this book.


Java Concurrency in Practice
Brian Goetz, Tim Peierls, Joshua Bloch, Joseph Bowbeer, David Holmes, Doug Lea (Addison-Wesley Professional; 2006)

This book provides excellent coverage of concurrency in Java. The book contains many tips on concurrent programming that are applicable to any language.

amazon InformIT

Mastering Regular Expressions
Jeffrey E. F. Friedl (3rd edition; O'Reilly Media; 2006)

This is the standard text on regular expressions—a very interesting and useful book. Most of the coverage is understandably devoted to Perl—which probably has more regular expression features than any other tool. In addition to its coverage of regular expressions generally, it has specific chapters devoted to Perl, Java, .NET, and PHP regular expressions. Incidentally, a different kind of regular expression engine was created for Google by Russ Cox—re2—which is well worth reading about. Although specific coverage of Python isn't present in the book, since Python supports a large subset of what Perl provides (plus Python's own ?P extensions), the book is still very useful to Python programmers. Furthermore, an excellent and well-established and much more powerful and more Unicode-friendly Python regular expression library is available from PyPI: regex.


Security in Computing
Charles P. Pfleeger, Shari Lawrence Pfleeger (4th edition; Prentice Hall; 2006)

This book provides interesting, useful, and practical coverage of the broad range of computer security issues. It explains how attacks can be made and how to protect against them. However, I did find it a rather dry read.

amazon InformIT

C in a Nutshell
Peter Prinz, Tony Crawford (O'Reilly Media; 2005)

This is the best C reference book I've read. It gives comprehensive coverage of the C language and the standard library. This is the book to buy once you've read a tutorial book on C—although very experienced programmers may find that this book is sufficient to learn from in its own right.


Effective C++: 55 Specific Ways to Improve Your Programs and Designs
Scott Meyers (3rd edition; Addison-Wesley Professional; 2005)

This book is essential reading for any C++ programmer. It describes many subtle pitfalls and explains lots of good practices. An additional book that is also essential reading—and which covers C++11 and C++14—is Meyers' Effective Modern C++.

amazon InformIT

Code Complete: A Practical Handbook of Software Construction
Steve McConnell (2nd edition; Microsoft Press; 2004)

This book shows how to build solid software, going beyond the language specifics into the realms of ideas, principles, and practices. The book is packed with ideas that will make any programmer think more deeply about their programming. The book's examples are mostly in C++, Java, and Visual Basic, but are readily translatable and applicable to other languages.


Linux Programming by Example: The Fundamentals
Arnold Robbins (Prentice Hall; 2004)

A useful and accessible introduction to Linux programming using the Linux system call APIs. The book's examples are in C.

amazon InformIT

C++ in a Nutshell
Ray Lischner (O'Reilly; 2003)

This useful book provides a solid, compact, and comprehensive reference to the C++ language and its standard libraries (including the C libraries that are part of the C++ standard). Unfortunately it doesn't cover C++11.


Domain-Driven Design: Tackling Complexity in the Heart of Software
Eric Evans (Addison-Wesley Professional; 2003)

A very interesting book on software design, particularly useful for large, multiperson projects. At its heart it is about creating and refining domain models that represent what the system is designed to do, and about creating a ubiquitous language through which all those involved with the system—not just software engineers—can communicate their ideas. The book's examples are in Java.

amazon InformIT

Rapid Development: Taming Wild Software Schedules
Steve McConnell (Microsoft Press; 1996)

This book takes a strategic—project-oriented—approach rather than a tactical—code-oriented—one, as it explains the software development process and how to manage it. I still have this book and it sticks in my memory because while I was reading it I was working on a software project that made just about every mistake the book covers. (The project was finally killed off a few years after I'd moved on.) The book is evidence-based and still interesting despite its age.


Design Patterns: Elements of Reusable Object-Oriented Software
Erich Gamma, Richard Helm, Ralph Johnson, John Vlissides (Addison-Wesley Professional; 1994)

Deservedly one of the most influential programming books of modern times. The design patterns are fascinating and of great practical use in everyday programming. The book's examples are mostly in C++, with some also illustrated using Smalltalk. One consequence of this book's success is that many more design patterns have been discovered since its publication, and some of the patterns it describes have become controversial.

amazon InformIT