Ask HN: The book that did it for you in math and/or CS?

392 points by debanjan16 ↗ HN
Do you credit any particular set of books for the advent of your expertise in math and/or computer science? The book that was of the right difficulty at the right time to ignite the intellectual curiousity that has made you go forward since.

209 comments

[ 3.7 ms ] story [ 227 ms ] thread
(comment deleted)
I don't get it. Is this somekind of popular joke? If so, please help me understand it.
Please don't do this here.
Introduction to Algorithms - Cormen et al.

- Kicked off learning about Big O Notation through this. The concepts completely changed the way I looked at code, especially being mostly self taught beforehand.

Numerical Analysis - Sauer

- Learned about Newton's Method from this book which blew my mind at the time and got me hooked.

Paul's Notes - https://tutorial.math.lamar.edu/classes/de/de.aspx

Not me but someone I know got a lot of this mathematically:

A Tour of the Calculus by David Berlinski

"Thinking Physics" by Lewis Carroll Epstein, read after I received a B.S. in Aerospace Engineering. I suddenly realized that I hadn't learned anything in my degree and was functionally useless. Since then I have built a solid base of understanding of algebra, trigonometry, statistics, and intermediate database theory, although I unfortunately remain mostly ignorant about aerospace engineering.
For math, I would say nothing. What made the difference for me there was the teacher I was working with. A good teacher could help inspire me to get an A+ in College Algebra through Calc III while a bad one could result in me to get a D- in anything from Calc I through Calc III. Yes, I took Calc I and Calc III twice, because I got a D- the first time through both of those classes, and it was the same guy who taught me Calc I and Calc III for my second time through, and in both of his classes I got an A+.

I barely scraped through with a C for Engineering Math (Differential Equations).

For me, the teacher made the difference in math.

For CS, the most influential books for me were Knuth, Sorting and Searching (although I actually bought all three books in the series, unlike most others I knew), as well as the original Kernighan & Ritchie book on the C programming language (before ANSI C was published).

Code, by Charles Petzold. It came to me at exactly the right time, and broke through the biggest conceptual barrier I’d had until that point; how do you actually go from logic gates to general purpose computing? Having Petzold walk you up the ladder of abstraction, never missing a link, really got me over the hump of treating all that complexity as a black box. On a meta level it gave me confidence to go approach apparently impossible things with an open mind and dig deep enough that you see how the “magic” works.
This is the same answer for me. I picked it up because as a teenager I thought it was about encryption (didn't know the word at that time). It also had the effect of introducing me to the right section of books in the library.
This was going to be my suggestion. I was disparately taught all this stuff in uni, but this book joined all the dots for me. It's really well written and perfectl paced. Seconded!
That one is good too, though it can get a little obscure in some sections.. I tried reading it twice! The first time I was stuck on the memory chapter. The second time I was stalled by the clock and synchronization thing, but it's still a great book. I hope I can muster the courage to read his Annotated Turing Paper.
I'm starting to learn CS all over again at the old age of 40, and had the pleasure to rediscover mathematics thanks to:

- Discrete Mathematics with Applications, by Susanna Epp, or

- Discrete Mathematics and Its Applications, by Kenneth Rosen (both have the same content, choose the style that you prefer), and

- Concrete Mathematics, by our lord and savior Donald Knuth.

I don't plan on reading TAOCP anymore as I would be dead by the time I finish reading everything else, but those introductory books are very good for beginners.

I'm also approaching 40 and dusted of some old books from uni last year. One of which was about linear algebra, it was incredibly dense and proof heavy and I remember not understanding what I was doing, mostly remembering formulas. Then I watched 3Blue1Brown video series on linear algebra and things just clicked, almost 20 years after that first algebra class :)

https://www.3blue1brown.com/topics/linear-algebra

Fun fact: Knuth is a devout Lutheran and he recently led a church Bible study on the--I can't make this up--Bible book "Numbers."
Knuth, vol. 1.
Volume 1 served me a decade+ ago as an approachable survey of the history of computer science up to that era- super useful and enjoyable!

What did you find in it?

I will recommend books that I have and books that I heard of:

Books that sparked my interest in all of Mathematics (BTW, I'll be glad if you recommend any Abstract Algebra books):

- Calculus, Howard Anton.

- Calculus, Spivak

- Advanced Engineering Mathematics, Erwin Kreyszig

- Elementary Number Theory, David Burton.

Computer Science/Engineering:

- Data Structures and Algorithms, Adam Drozdek

- Digital Design, Morris Mano

- David Patterson and John Hennesey's books

- Mastering Embedded Linux Programming, Chris Simmonds.

I can recommend "Universal Algebra" by P.M. Cohn
Everything W. Richard Stevens
Seconded. He had such a strong and clear style of delivery.

But if I had to pick one, it’s a toss up between Unix Network Programming and TCP/IP Illustrated, Volume 2.

Those two books had a significant impact on me in terms of demystifying the network stack.

CS: Design Patterns by GoF. It truly made me understand object oriented design. I'd claim at least 95% of programmers in our industry programming in an object oriented language don't know object oriented design.

Math: - The Code Book by Simon Singh. - Chaos by James Gleick.

Eventually I came full circle and think OOP is a mistake. Everything is functional for me now, even OOP languages. Statelessness, functional programming, avoid objects and hidden logic.
Same. I actively avoid OOP and have embraced functional programming.
Same, with one exception. I think there are specific situations that call for an abstract data type. And some subset of those times calls for an interface so you can have multiple kinds of that interface.

But rarely. Only when specifically called for by the problem at hand. A very far cry from “everything is an object.”

If you are young and stupid enough, you don't even realize when a book is too difficult. You just plow through it if you can make any sense of it at all. So for me it was TAOCP, a few different theory books by Aho and Ullman, and Spivak's Calculus. I can't say I understood everything in them, but they got me going.
Spivak's Calculus is fantastic.
My interest in mathematics is traceable directly to The art of the Infinite (by Robert & Ellen Kaplan).
Math: Art of Problem Solving (read in jr high)

Computer Science: CLR Algorithms book and Skiena's Algorithm Design Manual (read both in college)

_Algebraic Topology_ by Allen Hatcher. This is quite an advanced book, but it was the first topology book I picked up and it blew my mind. Without a serious math background you may only be able to read the first parts (some of chapters 0 and chapter 1), but even so it may amaze you. It was insane to see how much mathematical machinery can be built up to understand concepts as simple as “space” and “continuity.” Then these tools can be used to quickly prove facts about mind-boggling higher dimensional objects.

_Introduction to Quantum Mechanics_ by David Griffiths. Not CS or Math, but an amazing book because if you sit down and work through it it gives you a manageable intro to a completely non-intuitive and mysterious scientific field. Prerequisites are “only” multivariable calc and linear algebra.

_Algebra_ by Michael Artin. This was the book I decided to grind through at the right time to learn abstract algebra and get better at rigorous proofs, and it was worth it. Part of why I loved this book and subject is because it feels dry and mechanical at first, but if you work on it long enough you can see the beautiful bigger picture come together.

_Introduction to Topological Manifolds_ by John M. Lee. This was another “right book at the right time” for me. The title is a bit jargony, but it is a rigorous introduction to the foundational objects of modern geometry (namely topological spaces and manifolds in particular). Great warm-up for the first book on my list.

_Algebra: Chapter 0_ by Paulo Aluffi. Weird title, but the first few chapters are the best perspective on abstract algebra I’ve seen. He focuses early on categories in a useful and philosophically interesting way, which is unique.

_Gravitation_ by Misner, Thorne, and Wheeler. Didn’t read the whole thing, but this book taught me a tensor is just a higher-order linear function. Who knew? Most physicists give really crappy explanations of tensors. Also I love that this book, affectionately known as the “phone book”, is so heavy that one imagines spacetime curving around it.

Fwiw, Griffiths QM provides an appendix with all the linear algebra you need to get through the book. People will definitely get more going in knowing about vector spaces but it’s not strictly necessary as long as you start in the appendix.
Classical Mechanics by Taylor

Relearning mechanics from first principles is fun!

Computer Networking: A Top-down Approach, Jim Kurose

I read this about 2 years into my study of CS. I found the design of the internet, at times intentional and very often emergent / working around constraints, absolutely fascinating. I couldn’t help feeling that algorithms were things I could pull off the shelf but protocols were something I’d need to be able to design well throughout my career.

Come here to recommend this excellent networking book and it's much better than the Tanembaum's one. If you are in networking field you owe yourself to read this book and the latest 8th edition is the best version yet because the authors have removed the chapter on multimedia networking and focusing more on SDN. Heck, any aspiring textbook writer should read this book as a golden reference on how to write a proper textbook.
Amazing book, though the network layer chapter was kinda daunting!!!
An introduction to Genetic Algorithms by Melanie Mitchell. I picked it up in a charity bookstore believe it or not and it prompted a lifetime interest in data science and the field that turned into machine learning.

Purely functional data structures by Chris Okasaki. Just totally changed my perspective about all sorts of things in computer science. As well as being one of the most advanced comp-sci books I've ever read, it's truly mind-expanding in every possible way. How many comp-sci books have you read that make you question how something as basic as a number is stored?

Are you talking about integers and floats? Or about the process of storing a bytestring? Or something else?
All positional number systems but he really goes deep on binary number representations using lists and fancy heaps. I'm not going to post a link because you should buy the book to support the author, but since it is basically a second edition of his PhD thesis you can find that online if you dig around.
Apostol Calculus Vol 1

The introduction gives a history lesson, a great description of the method of exhaustion with descriptive drawings, and some very straightforward proofs on finding the area under the curve for parabolic segments via some basic infinite sums (no limits), all in 10 pages in a conversational style. And it just gets better from there.

My dad gave me his book he used in the 70s and I read it in high school in parallel to the textbook the school issued. Everyone thought I was some genius because I thought calculus was so obvious and I could explain it so well but I was just parroting the text and proofs from this book, basically verbatum. I told the other kids to use it as well but no one did.

+1 for Apostol V1! I also read it in high school, ended up testing out of Calc 1 in Uni, having learned plenty from reading that on my own. As you say, it really is so conversational and easy to follow. Starting with integration works really well, you build lots of sums and then use a supremum/infimum as opposed to a limit. I think the mental imagery for that is a lot more manageable than limits, especially if its your first time watching infinities disappear.
> My dad gave me his book he used in the 70s

That would probably be the second edition, published in 1967. The first edition was in 1961.

If you have a kid and they go to a college that uses Apostol you can give them your 2nd edition without worrying that it will be too far off from the current edition because the second edition is the current edition.

Same with volume 2. The 1969 second edition is the current edition. The first edition was in 1962.

Anyone happen to know of a list somewhere that lists subjects and for each gives you information on how well it can be learned from old books?

For undergraduate calculus for example a 50 year old textbook is fine. At worst some of the example and exercises might be outdated or maybe mildly sexist by today's standards.

On the other hand, that 20 year old book on learning Java with Symmantec Visual Cafe sitting on one of my bookshelves is probably nearly completely useless.

In between would be books where parts of them are still relevant and accurate and parts of them have been superseded and would at best only be worth reading for historical purposes.

"On the other hand, that 20 year old book on learning Java with Symmantec Visual Cafe sitting on one of my bookshelves is probably nearly completely useless."

Hah. I think I learned Java with that book as well, and used Visual Cafe starting out. I think one thing I did pick up (relatively) early was that books written to have a short shelf life were probably poor investments. Some "Word 6.0 for Dummies"-type book is probably meant to get someone up to speed that had pirated the program, and not a more general mind-expander that is going to lead you to thinking about how to implement some idea in whatever you're using today.

Dover Publications has a whole catalog of old math textbooks. It's amazing how good many of them still are.
Many good suggestions here. It's also the case that the 3rd book you read on a topic often makes more sense than the 2nd, and 4th more than the 3rd. Understanding is cumulative, so it's not a question of "which" book, but "how many".
I remember finding sometimes on my journey that I'd open a book and think "well, I can't make heads or tails of it." Then a few months later I'd try again and in the meantime I'd have read simpler ones and then the difficult book had become approachable.
Yes, absolutely.

Learning Perl was the first book I did any kind of programming with, though I didn't end up sticking with Perl.

Learning C# 3.0 made me finally get OO programming and that was when I first started writing programs that did much of anything.

Discrete Mathematics by Epp gave me a basic grounding in the math I needed to understand CS books.

The Algorithm Design Manual by Skiena and Algorims by Sedgewick and Wayne helped me start to understand the "CS" side of programming.

Tanenbaum's Operating Systems textbook taught me a fair bit about operating systems and concurrency.

I'm sure you could have used a different series but without these I wouldn't know how to program, let alone have made a job of it.

Data Structures and Their Algorithms by Lewis and Denenberg, used during my junior year of CS major program
Mathematics: From The Birth of Numbers—picked it out at a Barnes&Noble when I was a kid. It had so much in it. It didn’t go into depth but it had fantastic breadth. Reportedly the author spent ten years writing it. Feels like having a world atlas, but of mathematics.

The Art of Computer Programming—NOT for the reason you expect. The series is simultaneously fantastic and terrible. Being able to articulate why the series just plain sucks even though it’s also really good at the same time. 90% of the time, if there’s something I want to look up in TAOCP, I can just go for a walk, realize whatever I’m trying to do is unnecessary work, and come back and work on actual important stuff I care about. The other 10% of the time, I get better answers from digging through the citations on Wikipedia.

Exercises for the Feynman Lectures on Physics—Yes, the exercise book, not the lecture book. I know it’s not CS or math. The way that the problems build on each other is spellbinding. For example, there’s an early problem where you calculate the mean free path of air, but you’re not given a formula for it—you’re just given a series of problems which provoke you to think about the subject in a way that you can figure out a formula for it yourself.

I discovered Mathematics: From the Birth of Numbers in the summer of 2003 at my local library. At the time I was a high school student taking a summer Algebra 2 class in order to be able to take calculus my senior year for college admissions purposes. This book instilled in me a love for mathematics, even if I sometimes struggled with the topic.

Just a few hours ago my copy of Mathematics: Its Content, Methods and Meaning just arrived; I bought this book as a reference of undergraduate-level math concepts based on Hacker News recommendations since I'm right now in the process of reviewing undergraduate-level math to strengthen my understanding of deep learning fundamentals. I had the opportunity to glance through this book, and I wish I had discovered this book when I was in high school or during my undergraduate years; it appears to be an excellent, more technical companion to Mathematics: From the Birth of Numbers.

Given the direction in my career (I went from focusing on systems software to deep learning and data mining), I wish I had majored in mathematics as an undergraduate instead of computer science. I'm able to pick up computer science concepts rather quickly, but mathematics requires more effort for me. A part of me almost wants to do an online second bachelor's in math, but right now I use some of my spare time studying math.

It sounds like these concept maps might be helpful for you to orient yourself in the UGRAD math topics.

MATH & PHYS: https://minireference.com/static/conceptmaps/math_and_physic...

LINEAR ALGEBRA: https://minireference.com/static/conceptmaps/linear_algebra_...

They are extracted from my books, but can be used to support learning from any other book too. I find it helps a lot to think about the connections and parallels between concepts, and also use the concept maps as a "spec" to know when you've covered all the material.

I had such a shitty high school teacher that I still stay away from it. Looking for introductory texts, might give "Exercises..." a go.
> Feynman Lectures on Physics

I havy skimmed through the volumes of Feynman lectures, and can confirm this. Especially things concerning computational complexity.

What initially turned me into a curious person were Surely You Are Joking Mr Feynman & Godel, Escher, Bach. Then Book of Proof & Forallx: an introduction to formal logic helped me develop an interest in mathematics. But what was really a kind of aesthetic crack was The UNIX Programming Environment and The TeXbook.