Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: What are some of the best well-written books on computer science?
75 points by asoli on Nov 10, 2021 | hide | past | favorite | 59 comments
I'm curious if you have a favorite CS book specifically for the way it was written and how the author communicated their ideas.



Feynmans lectures on computer science: https://www.amazon.com/gp/product/B07FJ6RRK7/ref=as_li_tl?ie...

You might be familiar with Feynman's Lectures on Physics, but his lectures on Computation (based on a class he taught and his work in 'Connection Machine') aren't any less amazing. Through this short book, Feynman guides us through the concept of computation and the van Neumann architecture in his unique style, from logic functions, to Turing machines, coding and even quantum computers. It will give you a unique appreciation of the finer points in which computers are "Dumb as hell but go like mad" so that you can better squeeze every bit of performance out of your code.


Second edition incoming soon (2022 I think).


I also enjoyed the green "Dragon Book" [1] on compilers, by Aho and Ullman. I think it must have been thirty years ago, or more, though.

[1] https://www.amazon.com/Principles-Compiler-Addison-Wesley-in...


agreed! reading this book at a 11 years old completely changed the way i use data structure and write code today.


That’s cool. I was mid-20s. I was fortunate to be able to work on UNIX systems at the time, doing language systems work.

Thanks for sharing your experience!


Knuth's "art of Computer Programming", especially and specifically for the way it communicates things. I'm quite weak when it comes to reading advanced maths, but the code communicated to me, and taught me most of what i ever learned about how to read the weird squiggles.


This book is recommended (and heavily upvoted) on every such thread about good software books but I would very much doubt more than 5% have read more than a few chapters, probably less than 1% have read one book in the series and probably less than 0.1% have read the entire series.

This is one of those series that everyone thinks they should read but few actually do.


I read all 3 volumes obsessively in high school. I don't claim to have understood much of them, but every page passed before my eyes, and I managed to make sense of the easier parts, I think. One thing that stuck with me forever was the exercises near the beginning of volume 3, where you are given various "data processing"-ish questions that you have to solve basically with sorting and merging operations on a computer without much memory. I used those methods over the years to do stuff with the GNU sort utility and simple shell scripts that would have taken much longer to do with e.g. SQL queries. Being fairly SQL-clueless finally caught up with me a few years ago, but it was a good run.


they make great bathroom books; pick 'em up and open a random page and there's something cool, more often than not.

You can make the same arguments about "do people really read their Bibles?" and the answer is it don't matter: if there's any benefit to be had from the book at all, it's much more likely to accrue if you have a copy.


The book is certainly approachable to read and understand. Especially with some amount of background math. I think the book is hyped so much because people don't have the right background and/or find it difficult at the beginning and give up. Same goes for SICP. And people think the books are really good just because it's hard. It's not, it's approachable given the right effort.


I think it's more a question of how many people fully understand it once having read it.


I recently started trying to understand non-cryptographic hash functions and pretty much every text out there ends up referencing Knuth without really explaining it deeply. Hashing (not hash tables, just hashing) is a subject that pretty much every book seems to ignore and just go with the "here, use this hashing thing because Knuth said so [TAOCP volume 3]". I had to buy it.

That said, I also read other chapters when I had the need to understand specific things.


The Structure and Interpretation of Computer Programs, by Abelson and Sussman.


That one is often recommended, but when I checked it out some time ago (read a few pages from different parts IIRC), I didn't get the point of the book for someone who isn't a beginner. What's supposed to be great about it?

I like technical nitty-gritty as well as more abstract or "human factors" material but somehow it seemed to be none of these.


It's a good book if you have started out with say python and know basic programming. If you have functional programming exposure or if you have gone a bit beyond basic programming, it's not that much of an addition to your knowledge. This is my takeaway from the book.


Thank you. I really wasn't sure if I missed something.


The Pragmatic Programmer is still the standard handbook of best engineering practices.

Test Driven Development by Example, by Kent Beck is a great book, and it's aged well too. There's a lot of good 3rd party material on most concepts, but for TDD the first source is still the best.


Interpreting "CS books" to include books about programming languages, I'd like to add The AWK Programming Language [1] to the list.

This is a style of book I'd like to see for many other languages and paradigms: It doesn't assume that it has to teach you the basics. You know what a variable is, you know how loops work. You're reading it to learn AWK, not to learn programming basics. And it's remarkably readable.

I followed it up by reading the O'Reilly book on sed and awk in order to learn some sed basics, too, and while it is by no means a bad book, it just doesn't reach the same level of understandable writing.

I've also bought and read Real World Cryptography [2] in its early access phase, and I like it for much of the same reasons. It doesn't drown you in math -- it assumes you'd like a solid foundational understanding of up to date cryptography and practice oriented explanation of its concepts and focuses on that.

[1]: https://archive.org/details/pdfy-MgN0H1joIoDVoIC7

[2]: https://www.manning.com/books/real-world-cryptography


I also believe this is why the Awk book is so thin, and easy to hold. It gets right to the point teaching the language itself. I wish more books were the size of that book.


Great book on distributed system:

Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems Book by Martin Kleppmann


I work at a very large software company (which you know of) that has a corporate O'Reilly subscription and it was mentioned recently that DDIA was the most read book of the org.


Bertrand Meyer's Object-Oriented Software Construction. A classic, written in an engaging style that makes the book very readable and conveys important ideas about programming and software engineering (and object-oriented thinking too!). The first edition was perfect. The second edition exploded in size and I never read the full book; I dipped in and read several sections and they were pure Bertrand Meyer, so I have no doubt the second edition is as good as the first, just longer. The book was published c. 1990, but it's a classic for good reason and would be just as useful now as it was then.

Also, as jes noted in another comment, SICP (Structure and Interpretation of Computer Programs) is a must-have and must-read.


The C Programming Language, 2nd edition.

Introduction To Operating System Abstractions Using Plan9 From Bell Labs.

https://doc.cat-v.org/plan_9/9.intro.pdf

Today you can just use 9front.


If the person has some good-ish math background, then a good intro book for CS would be Sedgewick/Kayne's https://introcs.cs.princeton.edu/java/home/. The exposition is succinct.

If math is not a strong suit then https://htdp.org/ and https://dcic-world.org/ are good books to take up. The exposition is really good.


Would upvote HTDP as a great book to read before starting SICP, if you only begin your programming journey.


The Annotated Turing

I had never taken a theory of computation class so reading this book was a good casual starting point to understand how mathematical logic and computing are related

Plus there’s some good history bits in there too


Great book! I went trough it to better understand Turing's paper. The annotations in it and remarks of Turing's bugs help clarify a bunch of stuff. I would bet that the original reviewers of the paper had no idea what Turing what writing about or where to lazy to check it and to find the things that Petzold notes. I still remember the chapter where turing's development of maths in the paper resembles Brouwer's intuitionism.


not sure i know (or remember) any book that covers the entire field. but i never miss a chance to tell people about "the c programming language" by k&r.

one of a kind and, for some of us, the best book on programming ever written. i would love to see it updated to modern c.


What do you like about K&R so much? I was excited to dive into it during the C systems programming class I took in school, and it was fine, but I didn’t understand the hype. And I loved learning C / usually care about things like this.


For at least some people, K&R just "clicks". It's written in a way that is crystal clear (to at least some people).

In my case, I read K&R over a Thanksgiving weekend, and I understood all of it[1], even without a compiler to try things out on.

[1] Except for passing command-line arguments into a program (argc and argv). Couldn't understand that one without experimental results.


You read it in three days? Did you skip all the exercises or did it not have any?


I don't recall whether it had exercises. If it did, obviously I skipped them, because I didn't have a compiler.


K&R C definitely has exercises (solutions available at <https://clc-wiki.net/wiki/K%26R2_solutions>) - final one of chapter 1 is write bracket matcher


“The go programming language” ive heard some consider as the modern equivalent and not just because the language is Go.


My all-time favorite is not a exactly a book, but a tutorial on compiler construction: https://compilers.iecc.com/crenshaw/

It is dated in its choice of assembly, but I really enjoyed this style of crystal-clear explanations when I was a young kid learning how to program.

Other extremely well-written books include TaPL (Types and Programming Language), by Benjamin Pierce: https://www.cis.upenn.edu/~bcpierce/tapl/.

Benjamin Pierce's writing style is very good and you can enjoy it in the free series on Software Foundations (using a theorem prover like Coq to develop programs): https://softwarefoundations.cis.upenn.edu/.


The C programming Language By Brian W. Kernighan and Dennis M. Ritchie.

It will change your life. Or at least your approach to programming.


Sedgwick: Algorithms, see https://algs4.cs.princeton.edu/home/ It comes without confusing academic abstractions, just with useful information and actually executable example code.


I used to prefer this over the Cormen book (Introduction to Algorithms). Although in some tests the questions were taken directly from the Cormen book, so there was taht.


I have read and recommend Andy Tanenbaum's book on operating systems. He's also written a book on networking and one on distributed systems.


Project Oberon: The Design of an Operating System and Compiler, by Niklaus Wirth and Jurg Gutknecht.

Oberon is a beautifully simple language and the Oberon System was amazingly creative and fresh. The ideas and code in the book are a model of clear thinking and exposition.


The Little Schemer. A joy to work through. Great for learning recursion and programming.


Design Patterns: Elements of Reusable Object-Oriented Software by the Gang of Four.


while it’s the reference on design pattern it’s still the worse book on the subject.

most colleges student don’t really understand when to use each pattern after reading the book.


Furthermore, it is incredibly C++ centric, and twenty year old C++ at that; I reviewed it a decade ago and realized many of the patterns are solutions to problems that many other languages don’t suffer from.


What is a good book on the subject?


If you are really interested, navigate to r/computerscience and r/compsci, and then search "books". That's it.

You are going to find plethora of really good books that users have personally found helpful, great, or simply more understandable.

Give it a go.


N. Wirth: Algorithms + Data Structures = Programs


Mythical Man Month, 2nd edition but either work. Also Code Complete. Honestly, neither of these refer to Computer Science in the way that other cited books do but they are pertinent to the application of it via software.


I'd consider those more software engineering/management books than computer science in the like theoretical and fundamental sense - not to say that they aren't great books though.


That's certainly true, but I think fledgling computer scientists would do well to learn a little bit of project management early in the process. Mythical Man Month can be read in an afternoon.


I read Mythical Man Month last year and was amazed at how relevant it still was even at a space of several decades. So much wisdom in such a small book.


1. SICP

2. How to Design Programs

3. Software Design for Flexibility: How to Avoid Programming Yourself Into a Corner


Starting Forth by Leo Brodie


And Thinking Forth by Leo Brodie.


Designing Data-Intensive Applications: The Big Ideas Behind Reliable, Scalable, and Maintainable Systems by Martin Kleppmann https://www.amazon.com/Designing-Data-Intensive-Applications...

You can learn a lot of algorithms. It's useless unless you start to create architecture and use them in practice.


Gelertner and Jaganathan's Programming Linguistics is very well written and most interesting.

Hennessey and Patterson's Computer Architecture: A Quantitative Approach is excellent.

I also agree with the recommendations elsewhere on the list of Andrew Tanenbaum's book on operating systems, and of Jon Bentley's Programming Pearls books.


programming pearls jon bentley


Sipser's Introduction to the Theory of Computation


The structure and interpretation of computer programs.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: