Stack OverflowWhat books should I read to have an undergraduate education in Computer Science?
[+35] [22] Kyle Cronin
[2008-09-27 15:02:14]
[ computer-science ]
[ ]

I've always been a largely independent learner gleaning what I can from Wikipedia and various books. However, I fear that I may have biased my self-education by inadvertent omission of topics and concepts. My goal is to teach myself the equivalent of an undergraduate degree in Computer Science from a top university (doesn't matter which one).

To that end, I've purchased and started reading a few academic textbooks:

As well as a few textbooks I have left over from classes I've taken at a mediocre-at-best state university:

My questions are:

Software engineering books are welcome, but in the context of academic study only please. I'm aware of Code Complete and the Pragmatic Programmer, but I'm looking for a more theoretical approach. Thanks!

There's something up with the way your opening sentence reads, I was going to edit but didn't want to risk putting words in your mouth. :) - Kev
Thanks. I should have said learner, not learning. And I should have read the post before I posted. - Kyle Cronin
(2) Can't replace 4 years of hard work by reading a book. The pace, the homework, and the environment of learning from already learned professors isn't an experience you can easily swap out with an alternative. - mmcdole
[+13] [2008-09-27 15:07:24] Vinko Vrsalovic

Biggest two omissions I see:

For operating systems I prefer the Tanenbaum instead of the Silberschatz but both are good:

And about the order, that would depend on your interests. There aren't many prerequisites, automata for compilers is the most obvious one. First read the automata book and then the dragon one.

I don't know all the books you have, but the ones I know are good enough so that may mean the others are decent as well.

You are missing some logic [4] and discrete math [5] books as well.

And let's not forget some database theory [6] books!


[+12] [2008-09-27 15:09:10] therealhoff

The best approach I've found is to pick your favorite University, go to their website, and check out the courses for the degree. Many of the big ones have their required readings published for each course. MIT's Open Course Ware is a good example.

This, by the way, works for non-CS degree programs as well.

[+9] [2008-09-27 15:05:53] dacracot

The Art of Computer Programming by Don Knuth [1]


I tried reading TAOCP in high school after having only done some cursory Java programming. Some of the concepts in the book (register machines, the MIX language) were well over my head. Can you recommend a book to introduce me to some basic hardware architecture that would prepare me for TAOCP? - Kyle Cronin
The is probably the reason these types of books go well within a college course. The prof guides you through. Gives you references and focuses you on the important bits. Its been 25 years since I was at university so I'm not sure what to recommend. - dacracot
(2) The TAOCP books are great, but not something every undergrad (even at a top university) would/should read. - ShreevatsaR
(3) -1 TAOCP would be too overwhelming to self learn at this level - Greg Dean
[+6] [2009-06-08 03:34:07] William Leara

MIT introduced their "OpenCourseWare" program several years ago. They put books/homework assignments/lectures on-line and so you can follow along with the MIT curriculum:

Cool, i was looking for that, and was about to post it - Rishi
[+4] [2008-12-20 03:53:22] Norman Ramsey

Many courses at top universities don't use a textbook because none of the available books are good enough. (I was educated at Princeton and taught for 8 years at Harvard.) When someone recommends a book, ask if the book is really good or if it is just the best available in the field.

For example, in compilers, I'm not a big fan of the 'Dragon Book'; I never liked the approach, and the current edition is very outdated. I think you'd be better off with a book like Michael Scott's Programming Language Pragmatics [1] which although a bit scattershot is a lovely book to read. (I've never taught from it, so I can't say what students think of it.) I don't know of a really good book on compiler construction for the autodidact, although you might look at Cooper and Torczon's Engineering a Compiler [2] because it is up to date and written by two of the best compiler engineers in the business.


(1) The Dragon Book is still highly relevant today. Fundamental compiler technology doesn't go out of date that fast. - mipadi
All the front-end stuff is fine. The stuff on register allocation, code generation, and optimization is way out of date. But almost no undergraduate course covers that stuff more than superficially. - Norman Ramsey
+1 for Programming Language Pragmatics. It's a good book. Plus, I had the opportunity to attend a talk/presentation by Professor Scott. Very interesting individual. - Thomas Owens
[+3] [2009-01-17 18:11:25] Graeme Perrow

Sorry, you can't replace four years of university by reading a book or a number of books, no matter how good the books are. If you could, why would anyone go to university?

(5) See Goodwill Hunting for a counterpoint. - James McMahon
I totally disagree. Have you been to university? It simply provides an environment for you to learn, and encourages a certain kind of thinking and way of working. There's no reason why you can't teach yourself just as well, if you can find the time and financial stability to do so. - Andy Hume
(2) @nemo, that is a pretty dumb "counterpoint". So you have to be a genius savant with intelligence greater than all of the MIT professors put together to achieve it? You more proved this answer than disproved it. - mmcdole
(6) See Goodwill Hunting to see a movie about fictional characters. - user1228
(3) Upvote for the Good Will Hunting comment. Made my day. - user19471
So this is my 3rd most viewed question, which is why it is titled as it was. Of course I know that I can't replace an entire degree with a book. But As I indicated, I have experience that replaces the majority of it. The question is about what sort of behind the scenes knowledge I am missing. - Jeff Martin
(1) I don' think this answer is fair. I don't think most people can learn a degree from books, but it's far from impossible. - André Caron
[+3] [2009-01-17 18:13:15] John D. Cook

First, I wouldn't worry about it. But if you'd like a book to learn some of the abstract CS ideas, I'd recommend The Turing Omnibus [1] or Theoretical Introduction to Programming [2].

If I were deciding between hiring two programmers and neither had much experience, but one had a CS degree and the other didn't, I'd hire the one with the CS degree. But when you get to comparing two programmers with a dozen years of experience, the degree hardly matters.


[+3] [2009-06-08 04:29:07] MahlerFive

I probably can't suggest the best books, but there are several important subjects you are missing:

  • Statistics
  • Linear Algebra
  • Graph Theory and Discrete Math
  • Computer Graphics
  • Scientific Computing
  • Computer Networks
  • Software Engineering
  • Data Structures

Some topics that might be considered more "optional" might be:

  • Cryptography
  • Image/Pattern processing and recognition
  • Bioinformatics
  • Internet Computing
  • Classical Physics

[+3] [2009-06-08 04:58:34] Gilad Naor

The Elements of Computing Systems [1]

This book takes you from the basics of hardware design all the way to writing programs in object oriented languages. Using a simulator, you build a complete computer. Then you write an assembler, an operating system, a compiler (for an object oriented language compiled to run on a VM) and then a game written using that language.

It's a lot of work, but the authors have carefully made the task as simple as possible. You'll have to work hard to work through this one, but it gives you a complete perspective of computer programming.

You can view some sample chapters, as well as play with the simulators here [2].

Highly recommended! (Even for CS graduates)


Thanks for your suggestion. This sounds a lot like "From Nand to Tetris in 12 Steps" - do you know how they compare? - Kyle Cronin
@Kyle: same course, different names. I agree with Gilad Naor: I also HIGHLY recommend this book! - Dinah
[+2] [2008-09-27 15:46:34] J.J.
  • Discrete Math I & II (my private school)
  • Physics I (Missouri most state schools)
  • Statistics I
  • Cryptography(optional but I liked it)
  • OpenGL in C++ (optional but neat)
  • Systems analysis and Design(Software engineering from the business perspective. The class was so so.)

  • Ethics.

  • Networking (teaches network algorithms, bit patterns dealing with network data).

    There are some things that to comprehend them require help; not necessarily a Professor(tho they do that for a living), but maybe a friend that has taken the class or studied the field.

Reading books on these subjects doesn't mean you know them. Doing math on the math, coding on the code, and so on is what helps you understand, and shows you know the subject in the end.

[+2] [2008-09-27 16:05:51] Ben Hoffstein

I think you can use most of the other books for reference and just absorb Programming Pearls [1] in its entirety. Doing so would make you better than 90% of the programmers I've ever met.


[+1] [2008-09-27 15:12:37] Pablo Marambio

I don't know how is it in the US, but in my country we study discrete mathematics and an introduction to graph theory before formal languages and automata.

Also, I don't see any book covering computer networks... why don't you try Andrew Tanenbaum's Computer Networks [1]?


[+1] [2008-09-27 15:12:47] moonshadow

Before anything else, read Computer Science: a Modern Introduction [1]. This will give you a good grounding and overview of the subjects there are to pursue.

Introduction to Algorithms [2] is very good. For an introduction to functional programming, I recommend working through ML for the working programmer [3].

Areas that differentiate the computer scientist from the programmer: a grounding in discrete mathematics, a basic understanding of VLSI and systems architecture, an understanding of the basics of cryptography and security, an understanding of computability theory, an understanding of information theory.


Introduction to Algorithms is the bible of CS :D - anbanm
[+1] [2008-09-27 15:15:04] Dima

This is a pretty good list. The two topics I would definitely add to the mix are discrete math, and networks. Other topics that may be interesting to you are compilers, computer graphics, distributed operating systems. There are also cool sub-fields of AI, like computer vision and machine learning. And in order to handle all that, you definitely need linear algebra and probability.

And it goes without saying that you cannot really do computer science by just reading books. To really understand each topic, you have to do projects in it. I would also suggest looking at MIT's Open Courseware, where professors post syllabus, lecture notes, and assignments.

Do you have any specific book recommendations for discrete math, linear algebra, and probability? - Kyle Cronin
Not really. I kept the books from the courses, but I can't really say whether they are better or worse than other books on the subjects. - Dima
[+1] [2008-09-27 16:05:52] user9282

Concrete Mathematics

My copy is in the mail, but from what I've heard, it requires a very solid understanding of basic mathematics to tackle. I think it should be stressed this is NOT a first book on mathematics. - Gilad Naor
You need to have a prior experience with Discrete Mathematics before you tackle this book. - unj2
[+1] [2008-09-27 19:35:20] Ryan Guest

You should also have a book on general databases without going deep into the specifics of Oracle, MySQL, SQL Server, etc.

I'd recommend: Database Systems: The Complete Book [1]


[+1] [2009-06-17 05:11:29] cjs

Concepts, Techniques and Models of Computer Programming [1] seems to have the broadest overview I've seen of the various higher-level language programming styles and techniques.


I've heard good things about CTM. The only thing is that the code examples seem to be written in an obscure language called Mozart, but I'll add it to the list anyways. - Kyle Cronin
There's good reason for that: Mozart is multi-paradigm, so it allows using a common language for everything in the book, rather than switching between languages for different paradigms. This makes life easier for the student. Learning the concepts, not the syntax, is always the hard part about learning a language; you'll find learning the syntax of Oz to be very little work, and you'll find learning the syntax of your next language that uses concepts you've learned from the book also to be very little work. - cjs
[0] [2008-09-27 15:50:30] Scottm

Books on Professional Software Development covering how software projects work, different methodologies, and design patters are great. Web-design knowledge is also very useful when it comes to employment.

I don't understand why you are trying to do this yourself though. Even a 'mediocre-at-best' university will be able to teach you the skills far better than you can teach yourself. It's all about meeting people who have experience actually working in the computing industry.

It's not about the university it's about the effort you put in that determines how well you do.

My answer is perhaps unhelpful to you though because I don't know where you are from. In Scotland where I live I got to go to University for free, this may not be the case for you.

[0] [2008-11-25 21:25:00] Robert

File Structures: An object oriented approach with C++ [1]

A lot of good info about block devices and file structuring which you won't find in any of the books you listed. It got a few critical reviews on Amazon because people didn't like his code examples, but the point of the book is to teach the concepts, not give cut and paste code examples.

Also make sure to get a book on compilers


[0] [2009-06-08 04:12:17] hiena

I would add Introduction to the Theory of Computation [1] to the list


[0] [2009-06-17 05:24:59] Mark Carpenter

The "Gang of Four" Design Patterns book [1]. The Design Patterns course I took in college was probably the most beneficial class I've ever taken.


[0] [2010-10-14 13:34:00] Puttaraju

Even i'm in the same plane: studying computer science in my free time after work; These are some of the books i have in my shelf right now

  1. Applying UML and patterns - Larman [1]
  2. Introduction to algorithms - Cormen [2]
  3. Discrete mathematics and its applications - Rosen [3]
  4. Software Engineering [4]
  5. Advanced Programming in the UNIX Environment [5]

Will udpate this list further as soon as i finish them... :-)