About

The Top 9½ In a Hacker’s Bookshelf

Every hacker should have a good solid dead tree library to draw ideas from and use as reference material. This list has a bit of everything – textbooks you will encounter at top tier computer science universities, books giving insight into the industry, and references you shouldn’t be caught without. It is a list of hackers’ classics.

This is a classic on the human elements of software engineering first published in 1975. The technology has changed a lot in this time, but the human elements of software engineering have remained the same. It is a wealth of insight, often quoted, and very well known in the industry. “The Mythical Man Month” describes many commonly occurring problems in large and mid-scale development projects and breaks them down. Here are a two of the book’s important principles:

The Mythical Man-Month: Adding manpower to a late software project makes it later.

No silver bullet: There is not a single strategy, technique, or trick that can exponentially raise the productivity of programmers.

I recommend this book not only for programmers, but for anyone managing a software project. Project managers and programmers alike will appreciate Brooks’ clear, well-thought out points.

Commonly referred to as just K&R, this is the canonical C reference book. It’s to the point without being too terse; it is detailed enough for a beginner to understand without being bloated. K&R tells you exactly what you need. Nothing more, nothing less. At 274 pages this is one of the most compact languages references you will find. I dare a Java author to come up with something so sweetly concise.

This book is recommended for anyone learning C, and for anyone looking for a C reference book. K&R is a must read for anyone who is writing a language reference or technical literature.

If you have never programmed before, K&R might not be the best place to start out, but still doable if you are motivated. Beginners might also consider getting a copy of “The C Answer Book,” which gives detailed explanations of solutions to the K&R exercises.

SICP is used in entry level computer science classes at many top tier universities including the University of California – Berkeley and the Massachusetts Institute of Technology. It uses the Scheme language to introduce many powerful paradigms like recursion, lambda notation, abstraction, and interpreted languages.

I found this book incredibly dense when I first read it for an introductory CS class, and there was still much to learn from a reread several years later after I had a better grasp of the ideas presented here. If you didn’t have the opportunity to use this book in the classroom, I would recommend picking it up to see what you missed, especially if you haven’t used any of the Lisp dialects extensively.

“Code Complete 2” is a highly regarded book about software construction, where McConnell defines construction as mainly programming and debugging, along with some elements of construction planning, detailed design, unit testing, integration, and integration testing. The book’s focus is on writing better code. McConnell touches on a wide variety of topics including managing complexity, refactoring, coding style, and writing good comments.

This book is recommended for anyone who wants to write good solid code. It will save beginners time when learning good coding practices, and is a great refresher for programmers with years of experience who may find that over time they have developed habits that are holding them back.

This is another textbook. “Introduction to Algorithms,” is probably the most popular university-level text for algorithms classes. It also serves as an excellent reference book.

Even though practically speaking most programmers shouldn’t be writing their own implementation of, say, quicksort, in a production environment, algorithms knowledge is essential for understanding what kind of asymptotic performance you can expect from libraries and your own code.

“Introduction to Algorithms,” is recommended as a reference for any developer looking to brush up on their algorithm skills. It is also recommended if you are interested in topics like NP-Completeness, randomized algorithms, or Fast Fourier Transformation. Good math skills are essential if you want to grok all parts of this book.

This is a catalog of different object-oriented design patterns. For each of the 23 patterns that are presented, the authors give an in-depth analysis including a motivating example for the pattern, common pitfalls and trade-offs, related patterns, and sample code in either C++ or Smalltalk. Some of the patterns covered are Singleton, Observer, Template Method, Iterator, and Proxy.

This book is a must read for intermediate or advanced developers working on object-oriented code. Coders that are new to object-oriented design would be best served by mastering the basics of an object-oriented language and digging in to non-trivial project before attempting to learn all of the patterns presented here, otherwise the patterns aren’t likely to “stick.”

This is a great book for learning how to approach problems. Each of the 15 chapters presents a different task, such as sorting phone numbers, creating anagrams, or doing text searches. The problem is defined, and then Bentley walks through different solutions, providing a discussion and clear analysis of each solution, with a breakdown of programming principles at the end.

“Programming Pearls,” contains some very clever ideas, and would be of some use as an algorithm reference for a small class of problems, but the take away of the book is something much bigger and more general: how to approach and solve problems from the perspective of an engineer.

I recommend this book to anyone who enjoys working though programming brain teasers.

“Compilers: Principles, Techniques, and Tools,” is commonly known simply as the “dragon book.” This is the standard textbook in a theoretical compilers class. It covers everything you would expect to find in a compilers text: language syntax, parsers, lexical analysis, grammars, intermediate code generation, runtime environments, optimization, etc. If you haven’t done a lot of work with these topics, be prepared to learn a whole slew of new terminology and concepts: deterministic finite automata, finite state automata, LR parsing, and more.

I particularly enjoyed parts of the dragon book that get down and dirty into the mathematical notation and theory – and this is large theme throughout the book. If you find regular expressions and state machines fascinating you will really enjoy the book. On the other hand, if you are looking for a text that will introduce modern, practical compiler implementation details you may find the dragon book a bit lacking. In those respects the dragon book is starting to show its age (this version was copyrighted in 1986).the 2nd edition of this book includes new sections covering modern techniques.

This is one of the many great books from the O’Reilly collection. “Unix Power Tools,” weighs in at a hefty 1200 pages, and is full of descriptions of Unix command line tools, usage cases, and shell script syntax examples for all of the major shells.

“Unix Power Tools,” is a great reference book and is fairly well organized into self-contained chapters. If you find yourself reading this book from cover to cover you are an amazing specimen of geekdom.

Much of the information contained within this book can be found more quickly with a Google search, but sometimes its nice to have a dead tree reference as well.

This is one of the few books that is valuable for beginners and experts alike. Everyone from a complete Unix newbie to a seasoned Systems Administrator has something to gain from “Unix Power Tools.”

Well this book isn’t technically about hacking, but your geek card is hereby revoked if you haven’t at least read this “increasingly inaccurately named,” Hitchhiker’s Trilogy. It contains all 5 books in the Trilogy: “The Hitchhiker’s Guide to the Galaxy,” “The Restaurant at the End of the Universe,” “Life, The Universe and Everything,” “So Long, and Thanks for All the Fish,” and “Mostly Harmless,” plus the short “Young Zaphod Plays it Safe.”

Be entertained. Discover the answer to life, the universe, and everything. Learn how to make a Pan Galactic Gargle Blaster. And most of all don’t panic!

This edition is bound in beautiful black leather and has a silk ribbon bookmark sewn into it. It’s like reading a very nice Bible, only more believable. (Mandatory disclaimer before any trolls find me: That was a joke.)

[Disclaimer: The links above are affiliate links, which means if you buy something from Amazon after following a link from GrokCode, you pay the same amount and I will get a percentage of the sale to help support this site (which would make me smile).]

A pretty good list, and one I'd generally agree with. I personally find the later editions of "Unix power tools" to be too perl-oriented, where the earlier editions were much better. I'd add Eric Raymond's "The art of Unix programming". ESR may have lost his marbles at times, but in that book, he manages to pretty accurately capture the philosophy that drives the Unix culture[1]. Even if you're not coding on Unix, the approaches laid out in the book should make you a better coder.
[1] Although in places, he tries to force tools into that culture that really don't fit, such as Emacs -- I'd have preferred it if he'd just said "Emacs isn't a good fit with the Unix culture, but many hackers use it because it's useful".

Another essential is The Inmates Are Running The Asylum by Alan Cooper. This volume is subtitled Why High-Tech Products Drive Us Crazy and How to Restore the Sanity. This should say enough to attract some curiosity, I hope, as it seems to be written from both sides of the fence.

dragoneater wrote:
> The dragon book is best utilized for toilet paper. Seriously, do not waste your money on it, it’s unreadable!
>
> I concur on the rest.
What book would you propose on compilers, instead?

Ignoring technical manuals for a brief moment, for a bit of social history about hackers try Steven Levy's Hackers: Heroes of the Computer Revolution, which tells you about the culture and characters from three ages of computing history. 1960's era MIT, 1970's era homebrew computing and the 1980's games companies. Fantastic tales of bizarre characters and their crazy antics

Not a fan of Unix Power Tools. I think it was out-of-date 15 years ago when I read (part of) it--I can't imagine how it reads now. And it was very uneven, too.
Granted, it's been updated a few times since then, but still, there are certainly better books out there to include on such a "desert island" list.
How about TCP/IP Illustrated? Or The Design and Implementation of the 4.4BSD Operating System?

Looks I'm not the only one who wrote a list of 9 best programming books. I love the fact that you added H2G2 and that we have little overlap (SICP and K&R only). I have been recommended Programming pearls repeatedly, I'll have to read it.
Cheers,
Ruben

While I'm a HUGE HHGTTG and met Adams a few times before his all to soon death. The book "The Psychology of Computer Programming" by Gerald M. Weinberg would eclipse this choice for a top 9 1/2 books. It's now out as a "Silver Anniversary Edition" and you can read more about it here: http://www.dorsethouse.com/books/psy.html . Thanks for the great listing though. All excellent selections.

I'd definitely add a book on networking. Comer's books are a great introduction, but they don't scale beyond that, and the books by Stevens are great when you need something authoritative, but are hardly generalist works. (The OSI wars are over, so Padlipsky's _Elements of Networking Style_ is largely unnecessary today, but a lot of fun to read). We're left with Tannenbaum's books, but I don't really like them.
Some book on LISP. I actually like reading Steele's 2nd edition of Common LISP, the Language but then I'm a sicko. Definitely gives the Java folks something to aspire to, though. Perhaps _The Little LISPer_, or the Scheme variants.
Graphics are a similar quandry: Lots of good books, nothing really stands out as *the reference*. I never liked Foley and Van Damm, or Newman and Sproull (which dates me). For "fun" reading check out Jim Blinn's collected columns. The PostScript reference books were interesting as well.
A good book on modern computer architecture is indispensable. _Modern Processor Design_ is good.
Likewise, OS design. The _Inside Windows NT_ books are excellent (even if you hate Windows), and the book on porting Linux to the Itanium is great, too (I forget the title, it's published by HP).
@Jeremy: Sedgewick's books on algorithms are what I used for self-study after I left college. They're well written and approachable, if not as deep as the "white book."
For more fun: _Soul of a New Machine_, and _The Pentium Chronicles_, and _Managing Humans_.

Great list! Except "Unix Power Tools" I read all of them too and would recommend them warmly to every software guy.
Some other great books on my bookshelf are:
* The Pragmatic Programmer (Hunt, Thomas)
* Peopleware (DeMarco)
* Modern Operating Systems (Tanenbaum)

Two more essential books -
Refactoring by Martin Fowler
Test Driven Design By Example by Kent Beck
TDD & refactoring are the most important innovations in software development for the last 15 years. If you are not practicing them you are working in the programming dark ages.

This edition is bound in beautiful black leather and has a silk ribbon bookmark sewn into it. It’s like reading a very nice Bible, only more believable. (Mandatory disclaimer before any trolls find me: That was a joke.)
Yeah, and it's funny beacuse it's true!
And good recommendations, thanks!

Hitchhiker's Guide should be replaced by Neuromancer by William Gibson, as it is also great book (much better IMHO; I read the first 15 pages of HG and put it down after finding about 50 examples of Douglas Adams contradicting himself, which was a real turn off for me), and it fits better with the other nine listed

@cjh I will have a look at Java Precisely, especially since I need to learn Java 5. I wasn't looking forward to another 800+ page Java book.
@seb I'm a bit ashamed to say I haven't read Knuth's TAOCP yet, but it is on my list of books to read. I'm sure I'll get to it sometime...
@Michael Hartl Its great to know that they are keeping the dragon book updated, it would be a shame to see such a great resource become dated.

Anyone got a better recommendation for an algorithm and/or data structures book?
I find most of them types of books (including Introduction to Algorithms) seem to
be made to use in a University environment, not self-study.

I am amazed at the number of people who put the GOF Design Patterns book on their lists. It makes me wonder if anyone has actually read the book, or just put in down because everyone else has it. The book deserves recognition because it seemed to kick off the patterns idea, but the book itself is not a great read: dense, pedantic and at the same time obtuse (although to be both pedantic and obtuse takes some skill). I found the Head First patterns book and Holub on Patterns to be much more understandable. I was never a fan of the Hitchhiker books, so I would have to replace it with another.

At 274 pages this is one of the most compact languages references you will find. I dare a Java author to come up with something so sweetly concise.
Check out Java Precisely. It covers Java 5.0 in 142 pages in a format that clearly owes much to the classic K+R. You can browse it in Google Books and see what I mean.

Very definately missing:
Gödel, Escher, Bach: an Eternal Golden Braid (commonly GEB) is a Pulitzer Prize-winning book by Douglas Hofstadter. **Must** be among the books on any hackers bookshelf; and you better have read it too! ;-)
This belongs right at the top of the list with SICP and Mythical Man Month.
The dragon book is a favorite of mine. Everything there is to know about computer science is involved in compiler design.
But I have to say "Introduction to Algorithms" might be a great intro text book, however the real hackers I know, need to know more than intro material - and head staight for the great works of Knuth.