Recommended Reading: (Request for Comments)
Posted 14 Sep 2004 at 15:04 UTC by mchirico
This is my recommended reading list for someone who wants to become involved in
open source programming. True, it is no
substitute for reading and writing code -- well, maybe it is?
Accepting the argument that one
should read a few books, what are those books and why should they read them? I feel very strongly about the
books on this list. Meaning, I do not think you will waste your time reading them. Perhaps you disagree?
Then, by all means please comment, and I would like to pass along your convincing arguments and add it
to the permanent link (
According to statistics on sourceforge, C++ is the most common language followed by C.
The top 13, in descending order, are listed below. Java is third, and according to this reasoning
there should be more Java books on the list. However, I do not know what the best Java books are.
Please comment. But, clearly C++ and C have a big influence. I feel that if you really want to
understand how your computer works, an opportunity that you have with an open source operating system,
then, you will have to understand C. To understand many of the open source applications, I think you
will have to have an understanding of C++. Sure, there are many more languages Python, Ruby, Perl etc.; but, in
my opinion C++ and C is a good start because many of these other open source languages are written in
either C or C++. There may come a time when an interface is need between your project and some other open
source project. I am arguing you will have the basic education to perform the necessary surgery.
Below is the initial list. The order is not significant. The numbering is for the explanation that
follows. Again, please comment. If you disagree and have a good argument, then I would like to add your
argument to this list. Unless you direct me to do otherwise, I would like to add your contact
information as well.
HIGHLY RECOMMENDED BOOKS (Numbering here is for reference - see below):
"UNIX Network Programming, The Sockets Networking API", Volume 1, Third Edition.
W. Richard Stevens, Bill Fenner, Andrew M. Rudoff.
"UNIX Network Programming, Interprocess Communications", Volume 2, Second Edition.
W. Richard Stevens.
"UNIX SYSTEMS Programming, Communication, Concurrency, and Threads", Kay A. Robbins,
"Programming with POSIX Threads", David R. Butenhof. Addison-Wesley
"The C++ Programming Language" Third Edition. Bjarne Stroustrup. Addison-Wesley.
"C Programming Language" (2nd Edition), Second Edition, Kernighan and Ritchie
"Advanced Linux Programming", Mark Mitchell, Jeffrey Oldham, and Alex Samuel, of
CodeSourcery LL. This book if free at the following resource:
"Accelerated C++, Practical Programming by Example", Andrew Koenig, Barbara E. Moo.
"C: A Reference Manual", Fifth Edition, Samuel P. Harbison, Guy L. Steele.
"C++ Standard Library: A Tutorial and Reference, The", Nicolai M. Josuttis. Addison Wesley.
"C++ Templates: The Complete Guide", David Vandevoorde, Nicolai M. Josuttis. Addison Wesley.
"Exceptional C++: 47 Engineering Puzzles, Programming Problems, and Solutions", Herb Sutter.
"More Exceptional C++", Herb Sutter.
"The Art of Computer Programming (TAOCP)", Vol 1,Vol 2, Vol 3. Donald E. Knuth. Addison-Wesley.
"Programming Perl, 3rd Edition", Tom Christiansen, Jon Orwant, Larry Wall. O'Reilly.
"Programming from the Ground Up: An introduction to programming using Linux assembly language.", Jonathan Bartlett, Edited by Dominick Bruno, Jr.
"Expert C Programming", Peter van der Linden, Prentice Hall PTR.
"Java in a Nutshell. A Desktop Quick Reference",David Flanagan 4th edition.
HIGHLY RECOMMENDED: PHILOSOPHICAL
"Zen and the Art of Motorcycle Maintenance: An Inquiry into Values", Robert Pirsig.
"Lila: An Inquiry Into Morals", Robert Pirsig.
"Structure and Interpretation of Computer Programs", Harold Abelson, Gerald Jay Sussman,
Julie Sussman. This book is free:
(7) This would be the first book I would recommend. It will cost you nothing. It is all on line.
The Stevens books (1),(2) bring out the magic of the Unix operating systems. Note (1) is the latest edition
which has additional work by Fenner and Rudoff. For me, where I had access to the code
and took it apart, this book bring meaning to everything. It was inspirational; but, the inspiration came from
program and not just reading. I would recommend these books as a first read for someone who has already
programmed. Book (1) covers all of the major socket operations. If you have the second edition of
(1), then, you should purchase the third edition, since SCTP is a very interesting read. Again, the best way to read
these two books is to write programs as you go. This goes for (3) as well, which has some over lap in material, but presents
it in a different light. Still, both books should be read as you do some heavy experimenting.
Threads: I stared to see the advantage in speed (I use the 2.6 linux kernel), and the ease of sharing
data between two threads. Process had some interesting hoops to jump through when a child process has
to communicate back to the parent, which is really the focus of (2). (4) gives a good deal of thought
to just threads. By the way, I have not read Java Threads, so that has not yet been considered
(5) is one of the best books on C++. It is very well written. But, because of the number of pages,
I would recommend to a beginner (8). Or at least (8) along with (5), since I have never seen anyone
read through (5) that did not already understand some C++. (5) gives a good introduction to the
language. (8) is a classic that you keep coming back to.
(11) and (10) cover some important topics that only get one chapter in (5). (12) and (13) cover
some of the advance features. I would suggest reading these last when trying to learn C++.
(9) I always come back to this book for writing C code or when C and C++ need to work together. Mainly,
this is an excellent reference for getting you out of trouble.
(17) This was a fun read, however, this book would not have made to the list. Except, direction questions on
every C++ interview I have had, came from this book.
(18) I bounce in and out of Java. I have every edition of this book. I think it is a good place to go
for C programmers. In my opinion, Java is becoming more of a base language like C and C++, so I would
argue it is worth learning. I am looking for other good java books. Please suggest.
If you read some of Steven's (1),(2) personal notes, he states that he had no use for Perl. He did
a lot of the necessary work in awk. Although I have nothing against awk, I think is bad advice.
Ignoring the religious hype around Perl, it is worth learning. Confession: "Learning Perl" by
Randal L. Schwartz is my book of choice. But, since it only has a forward by Larry Wall, and since
I have to come in contact with Perl zealots, it wasn't worth putting this choice on the list.
Reading this book and programming in assembly teaches you to slowdown and have fun. If I am stuck on
a problem, I find that this book is the place to go. It builds the right mind set for problem solving.
The cloths dryer broke the other day and I had no desire to fix it. This book got me in the right mind
set to solve problems. So I have to put it on the list. I think (14) Knuth should be read this way also,
by taking your time; like working a puzzle. Start at least volume 1.
Programming in Mathematica changed my perspective because it required a lot of functional programming.
Unfortunately, Mathematica is very expensive for an individual; although, if you are a student, there is
a discount. I picked this book because it was free, and reminded me a lot of the feel I felt when
programming in Mathematica. Plus, I am an emacs user. Lisp or Lisp like languages were ahead of their
time, and script foo has a lot of similarities. So, it is initially on the list.
(A) and (B). You will either love these books and carry them with you or hate them. I think they should
be required reading for CS and math majors in colleges. Some colleges and high schools make it required
reading for English. These are classics, and they do touch on the idea of creating something. Three books
I took off before posting are "The Trial", Franz Kafka, Polonius' speech in Hamlet
"This above all: to thine ownself be true,
And it must follow, as the night the day,
Thou canst not then be false to any man."
and "Arrowsmith" by Sinclair Lewis. Arrowsmith is
about life, discovery and humor. I think Kafka's message was to find meaning in the futility. Or to me
the book was like a Zen Koan. You have to find meaning where there is no meaning. Now, Polonius is a bit of a
clown. There is another, dead clown, that shows up in the play too. I think clowns have an element of
wisdom in Shakespeare because they explore, even if in a random way, and from this they slam into certain truths. Posting this
list is a clownish thing to do. The character in Arrowsmith is a bit of a clown as well.
I do hear the words in my head "to thine ownself be true", when I'm thinking about comments that I should
place in code or when the code should be rewritten or changed.
You have a lot of books on the technicalities of using languages with the specs and tips which is good. But my initial reaction is that many of the books you've posted are too technical, too specificly focussed on the implementation language.
I think there is a lot to be said for including some kind of design, or general programming book(s) to your list.
Personally I would nominate at least 'Design Patterns' which is useful for spotting things in other code you might see as well as showing some idea of a design process. 'The Mythical Man Month' isn't so much a programmer book, but it's useful to briefly cover the kind of problems you can encounter when working with groups of people. 'The Pragmatic Programmer' is a good fun read which covers problem solving, estimation and has a few different languages being used for the purposes of comparison.
(I'm also torn about recommending Knuths books. They are legendary, but very dense and difficult to be enthusiastic about without a good reason. I've read bits of them and have a bound boxed set of the three - the only time I've ever needed to look up things they have been a lifesaver but reading them for fun? Not a great way to spend a day .. Maybe that's just my non-academic background showing?)
Nonetheless it's a good start at a list, and it's only the debugging/mindset/practise aspect which I think has been neglected a little. (Adding a couple of general developer books such as 'Code Complete' or 'Writing Solid Code' would be satisfy this - in addition to the ones I mentioned above).
I agree that the "Design Patterns" book should be included, though I sold my copy a while ago. Still kept "The timeless way of building" by Christopher Alexander, which I think is the missing philosophical aspect of the gang of four book. If you include more "philosophical" books, I'd recommend the books by Edward Tufte on visual design.
Maybe you should consider "TCP/IP illustrated" as well (though I only skimmed over it in a library, maybe others can comment on it).
I am getting a lot of email on this.
This is interesting. It is part of an email from Chris Long, a Postdoctoal
Fellow at Carnegie Mellon.
I'm mainly writing to request clarification. Who exactly is the
audience you're targeting with this? The document says it's for
"someone who wants to become involved in open source programming".
It's pretty clear this means someone who wants to develop/contribute
code to OSS projects. What it doesn't say, though, is where they're
coming from. I can think of at least a few categories of people that
would have different needs from a reading list:
A) Alice has used OS programs and because of their functionality, or
for philosophical reasons, or whatever, has decided she wants to
write OSS. But although she's an experienced computer user, she
has no programming experience (or maybe just barely enough to know
she likes programming).
B) Bob is an undergrad with a few CS classes under his belt. He knows
one language, and maybe a similar second one (e.g., Java and C++),
and can write small programs pretty well. He hasn't worked on
anything big or with other people.
C) Charlie is a professional software engineer. He knows a lot about
writing code in commercial/industrial environments, but has never
Obviously, there are more types of people than that. But I think this
is enough to see that one reading list is not ideal for all. Maybe it
would be useful to define a set of categories (ideally better than my
3 examples) and then to rate each book on the list as to its
suitability for each category. It also seems to me that some good
books probably shouldn't be read without certain prerequisite
background, so maybe it would be helpful to mention that, too, in the
Now that I think about it, I can think of several attributes of each
book that could be useful to list:
1. Suitability level for each type of audience
2. What it covers
3. What you will learn
4. Why it's better than similar books
5. Why it's worse than similar books (hopefully a smaller list than #4
Yes, I agree with Chris. There should be some categories.
To comment on Stevey's take: Yes,
it's almost as if Knuth is a book that should NOT be recommended.
It's a book you find on your own. There is already enough reference
My opinion, posted 16 Sep 2004 at 08:59 UTC by shlomif »
Nice list. Here are some comments, and also books that I'd like to add. First
of all, C++ is stressed far too much: it's not that important. I have once
said, that C++ supports Object-Oriented Programming roughly as much as COBOL
supports Functional Programming. C++ provides some syntactic sugar
and better ways to perform common ANSI C-idioms. (classes instead of a
Gtk+-like OOPization, templates instead of void *-games.) However, most
open-source projects out there are written in ANSI C, and for very good
It is important to learn ANSI C before you learn C++, because C++ hides a lot
of the low-level nitty-gritty details away, while ANSI C is a back to basics
language. Nevertheless, I would recommend people to start learning how to
program with first HTML and then Perl (or alternatively a similar language like
Python or Ruby). This is because learning how to program in ANSI C can be
very confusing for non-programmers. (as many Technion students can attest to).
Another thing I noticed is that you seem to recommend books that are
rumoured that mere mortals cannot understand. Stroustrup's book, for example.
Or "The Art of Computer Programming" by Knuth. And a final thing: there's
an incredibly small number of books about anything except C and C++.
In any case, here are my additions:
First of all, the four most influential books I read (all of them
Innumeracy by John Allen Paulos -
an interesting book about how lack of understanding of some mathematical
concepts leads to various false beliefs. Basically a subset of #2.
The Neo-Tech Discovery (the book
I actually read is out of print) - a universal philosophy that is second
to none. Mind-blowing and mind-expanding. Sharpens your mind and soul like
nothing else, and explains many issues perfectly. It's not available in
shops, and requires order by mail. I also cannot find their catalog online
anymore. A large part of this book used to be available online, but was
Feeling Good by David Burns - a
field-guide to Cognitive Psychology. Contains many psychological exercises
that simply makes sense. Also, help explain what causes one mood's swings.
Even if you are not prone to depressions, anxieties, euphoria, etc. it is
still helpful to prevent it from happening, and to understand yourself
and other people. Highly recommended.
and the Bazaar by Eric S. Raymond - the best book I read so far
about open-source. If you haven't read it yet - do it! Other essays by
ESR are also very good, or entertaining or both.
You can find reviews of technical books I read recently in the perl.org.il wiki. And here
are some older reviews. Many
other books I read influenced or informed me to some extent.
There are also good sources of information and essays like
the Joel on Software site or
Paul Graham's site.
C vs C++, posted 16 Sep 2004 at 09:36 UTC by chalst »
Shlomif wrote: However, most open-source projects out there are written in ANSI C, and for very good reasons.
I very much doubt this is true; on the contrary, I expect C++ lines of code outnumber C loc by a comfortable margin in the free software corpus. C++, for all its faults, is a far better language for most software engineering than C. Neither C++ nor Common LISPers like the comparison, but the two languages have something important in common: they are designed for their expert users, and make few apologies for the difficulties they cause new users. C++ supports good OO design, but does little to prevent bad OO design.
Knuth's TAoCP series is extremely dense, but I think I like it precisely
because it's dense. Obviously it's not a series for those who just want to
grab an algorithm and instantly start hacking away. I'm not even sure
whether one should even try to "finish" the series, because it's so
monumental. An algorithmics book that's somewhat less dense (and less
thick), but also quite in-depth, is Brassard &
I explained before why
CatB is over-hyped. Regardless, I recommend reading it, and
questioning it. It's interesting to compare and contrast CatB with First
Monday's interview with Linus.
TPOP, posted 16 Sep 2004 at 14:25 UTC by redi »
That's certainly a list of very good books, but I'm surprised not to see
any Scott Meyers books there. Did you decide you'd already got too many C++
books? I think the Effective C++, More Effective C++
and Effective STL titles are a lot more use to the average FOSS writer
than e.g. Knuth, or Josuttis and Vandevoorde - which is very good but covers
in more depth than most people need. Much of the Open Source C++ code I've
seen is written to work with pre-standard compilers, and in many cases
is written (intentionally or not) so it only compiles with GCC 2.
This means the use of exceptions and the template code is quite simple
(and often non-conforming) so
the good C++ books you list are IMHO of little value to "Open Source"
programmers specifically, unless they also hope to be good "C++ programmers".
As GCC gets closer to the letter of the standard (and distros
ship the later versions of GCC) more FOSS programmers are using a better
compiler and so the situation I describe will not last for long ... I hope.
But since there are already lots of good C++ books in that list, and
because no-one else has mentioned it, I feel I must point you towards
Kernighan and Pike's excellent The
Practice of Programming.
To a large extent it's language neutral (it has examples in several languages,
and even reimplements the same program in several at one point), so rather
than teaching how to use a language well, it teaches how to program well.
How to design, structure, test, debug and optimise your code. Due to
the background of the author's it is slightly biased towards UNIX-style
programming, and so sits well in today's Open-Source environment.
It's a book that will probably have something useful for all but the most
battle-hardened veterans such as Kernighan and Pike themselves.
as Chris Long has said in his email. If you want contribute code to the GNU project or Linux then you need to know C, often a handful of other languages like Make, bash, m4 and programs such automake and autoconf to build a project. I don't know if any the books address the non-C language aspects of a GNU-based project, in my experience these are the most puzzling overall. Other projects (KDE, Mozilla) require knowledge of C++.
I personally wouldn't recomend any of the above technologies based on educational value or merit.
I was supprised by the C++ figure because in a recent Linux distribution, C++ accounts for about 15% of SLOC and C about 71%.
Actually I have a list of references here, and some of them are
about philosophy... but really, when it comes to philosophy, you either Get
It (TM), or you Don't Get It (TM).
Autotools, posted 16 Sep 2004 at 17:00 UTC by nymia »
How do I say this, well, there are plenty of programmers who write system and application code. The evidence is--of course--already obvious, but there is one area Free Software and Open Source that seems to be lagging behind. Only a few are interested enough setting up Autotool scripts for their apps.
So I would recommend books that relate to Autotools. It brings to the table the juicy M4 and the various test scripts for testing, checking and setting variables. Learning it may probably not give you that edge, but it will surely enough improve the package you're sending out to the world.
Oh yes..., posted 16 Sep 2004 at 18:44 UTC by tk »
...if anyone gets hold of a copy of that ``out-of-print'' Neo-Tech, be sure
to type/OCR it, annotate it heavily, and spread it far and wide on the Net
just like Halloween I.
Security, posted 17 Sep 2004 at 11:41 UTC by metaur »
Shouldn't there be some books about how to code securely as well?
disagreements, posted 18 Sep 2004 at 04:24 UTC by dalke »
How is that list any different than what you would suggest for non-open source programming?
Your list is OS-centric. Take a look at those projects on SF. How many of them are
at the OS level and how many are application level?
Speaking of applications, there's nothing there on GUI programming, neither nuts and bolts nor on usability. ("The Inmates are Running the Asylum", "The Philosophy of Everyday Things", and "The Humane Interface" are at least interesting books in the latter category.)
Do any of those books discuss object modeling, data abstraction, information hiding, or pre/post- conditions? Or security analysis, defense in depth, and threat models?
You have no books that discuss the programming process. There's nothing there on software engineering, testing, requirements gathering, nor on how developers work together. "Writing Solid Code", "Debugging the Development Process", "Understanding the Professional Programmer", and "Rapid Development" come to mind.
Your list is ...the word snobbish comes to mind. I've read through Stevens' book once. Never needed what's in there since I work on higher level layers than that. (Mostly application layer.)
And TAOCP? I've owned them for 10 years. (Even found a typo, but a known one.) Used 'em perhaps three times. Every time I look at them I rejoice in that I don't need to do assembly language. By comparison, his "Concrete Mathematics" was very enjoyable and is the only math textbook that made me laugh. And I just realized -- TAOCP is the only data structures books you have. Nothing else you list talks about algorithm analysis.
And for Zen and the ... I couldn't stand the book. As I recall it went on for pages about how science and art are in two separate domains. I reject that idea categorically.
There's also books about people in computers. "Fire in the Valley", "Soul of a New Machine", "Patterns of Software" are three different styles of (auto)biographical stories.
Regarding dalke'scomment, "The Algorithm Design Manual", Steven s. skiena and "Introduction to Algroithms", cormen, Leiserson, Rivest, Stein are the only other two good books that I know of. It still seems TAOCP does a better job. But, I am going to take a second look.
Stroustrup (5) talks about the programming process - it is a very light overview. It seems to me a lot of the Rapid Development, Extreme Programming etc. methodologies are somewhat faddish, or particular to a groups taste. It seems to me the only method accepted over time is CMM (Capability Maturity Model). I claim no expertise in this area; but, it is the answer I get when talking to people who do large contract projects.
As for security, Stevens (1),(2),(3); Stroustrup (5), and Robbins (3) talk a lot about building robust code. This brings up an interesting point. Sometimes C++ can better address this issue. For instance, sprintf should be replaced by snprintf in the C world, since it is not "length-safe". C++ can go further with std:stringstream which is also "type-safe", or even std::strstream which is efficient, length-safe, and type-safe as well. Unfortunately, it is flagged for depreciation. (Reference "Exceptional C++ Style 40 New Engineering Puzzles, Programming Problems, and Solutions", by Herb Sutter -- this book is just out). I'm thinking security from a programmers perspective were you thinking security from a system admin perspective? True no system admin books on security - but that will change year to year as applications change. I think what is address in these other books will change less often, or just change with the language. OK no threat models.
Stroustrup (5) goes into a lot of object modeling, and data abstraction. It is not a lot of theory, instead, it is all working examples.
Agreed, at least the Stevens books, especially (1), exams Unix low level system calls.
Regarding "Zen and the Art of Motocycle Maintenance", people fall into two distinct groups on that one. It is almost a way to select a persons personality.
security, posted 18 Sep 2004 at 16:53 UTC by dalke »
Responding to mchirico's question about security. I was thinking more of Bruce Schneier's book "Beyond Fear." I've only read reviews, so I didn't include it on my list. It's supposed to do a good job explaining how to think about security. There are more practical books. I've skimmed through "Building Secure Software" and it also looks good.
I think 'robust software' and 'secure software' are distinct things. Eg, if a program stores a password in a file as cleartext, world readable on a machine with potentially arbitrary users then it's probably not secure, even if there software itself contains no bugs.
I'm not an XP advocate, which is why I didn't list any of those books. "Rapid Development" is a different style of book. It gives a great overview of the many different factors affecting software development and suggestions for ways to manage risk. It's more like an encyclopedia of the different ways, combined with commentary on when it's appropriate to apply them. (Eg, it even describes a couple places where waterfall development model might be the best choice.)
security, posted 18 Sep 2004 at 18:09 UTC by mchirico »
I have been trying to get a hold of "Secure Coding: Principles & Practices", by Graff and Wyk. I have no idea if this book is any good. I think it had a good review, then, I never heard anything about it. Anyone read this book?
The first list was kind of idiosyncratic, so here's another idiosyncratic list. I took some old recommendations of mine and selected just the books that include substantial amounts of source code. Perhaps nowadays with all the open source on the net you shouldn't need to look in dead trees for stylish examples -- but that would make another list.
- Abelson and Sussman, Structure and Interpretation of Computer Programs
- Aho and Weinberger and Kernighan, The AWK Programming Language
- Jon Bentley, Writing Efficient Programs
- Leo Brodie, Thinking FORTH
- W. H. Burge, Recursive Programming Techniques
- Carriero and Gelernter, How to Write Parallel Programs
- Cormen and Leiserson and Rivest, Introduction to Algorithms
- Edsger Dijkstra, A Discipline of Programming
- Fraser and Hanson, A Retargetable C Compiler: Design and Implementation
- Friedman and Felleisen, The Little Schemer
- Friedman and Felleisen, The Seasoned Schemer
- Friedman and Wand and Haynes, Essentials of Programming Languages
- James F. Gimpel, Algorithms in Snobol4
- Goldberg and Robson, Smalltalk-80: The Language and its Implementation
- Paul Graham, On Lisp
- Paul Hudak, The Haskell School of Expression: Learning Functional Programming through Multimedia
- Kernighan and Pike, The Practice of Programming
- Kernighan and Pike, The Unix Programming Environment
- Kernighan and Plauger, Software Tools in Pascal
- Kernighan and Ritchie, The C Programming Language
- Donald Knuth, Literate Programming
- Wm Leler, Constraint Programming Languages
- Liskov and Guttag, Abstraction and Specification in Program Development
- Peter Norvig, Paradigms of Artificial Intelligence Programming
- Chris Okasaki, Purely Functional Data Structures
- Richard O'Keefe, The Craft of Prolog
- P. J. Plauger, Programming on Purpose, vol. I
- P. J. Plauger, The Standard C Library
- Niklaus Wirth, Project Oberon: The Design of an Operating System and Compiler
Steve McConnell has a reading list which I thought was quite useful, it is now unfortunately behind a required log-in and no longer cached by Google.
There are multiple "levels" of reading lists with customisation for specialisations. The original URL is:
There is a newer (less useful?) version here: