r/computerscience • u/Threight • Jan 22 '21
Good CS books that explain stuff clearly
I really enjoyed these books so far:
Code: The Hidden Language of Computer Hardware and Software: The author builds an imaginary computer from telegraph relays, chapter by chapter he explains everything clearly. Telegraph relays to logic gates to binary adders to RAM and a CPU and even a barebone assembly language. Very neat stuff!
Writing a Intepreter in Go and its sequel Writing a Compiler in Go: The author starts from scratch and explains every little part of making a programming language, from the lexer to the parser to the interpreter with a REPL. In the second book he codes a VM and compiles the language to bytecodes that run on the VM
These books are nice in that they're not heavy with literature and math like most textbooks, they explain stuff clearly step by step and I feel like I learned so much from them and I want more
Any suggestions?
6
u/Cpt_shortypants Jan 22 '21
From logic gates to C It's about 700 pages and if you read it you will understand the fundamentals. Try to do the excercises. The book goes over von neumann architecture and logic gates, and ends with C programming language.
2
u/desutiem Jan 23 '21
Thank you for posting this. Looks like a good source of material. I just managed to grab an ex-library copy for a few pounds..! Bargain!
1
u/Threight Jan 27 '21
I just managed to grab an ex-library copy for a few pounds
Do you have a website for this or is it more of a local thing? Everything I see online has outrageous prices + shipping + converting to CAD... I'd love to get a physical copy of it but i'm not about to spend $300 on it lol
1
u/desutiem Jan 27 '21
Ah.. it was a used book seller on eBay. Think I just got lucky. Sometimes Amazon also has used copies if you scroll down although the prices can be all over the place.
1
u/Threight Jan 28 '21
did you get the 2nd or 3rd edition? The 2nd is cheaper from what I've seen, all the outrageous prices are for the 3rd
1
u/Threight Jan 27 '21
I just managed to grab an ex-library copy for a few pounds
Do you have a website for this or is it more of a local thing? Everything I see online has outrageous prices + shipping + converting to CAD... I'd love to get a physical copy of it but i'm not about to spend $300 on it lol
1
u/Threight Jan 22 '21
A C-like programming language? Or like, actual C?
4
u/Cpt_shortypants Jan 22 '21
it's actual C. But the focus is on how you can make complex systems from basic logic gates, elevating a level of abstraction each step. It doesn't really go into much detail with C, but it shows how it works 'under the hood'
1
3
u/LostSEMSCS Jan 22 '21
From logic gates to C
Do you mind putting the full name of the book and it's author? I can only find this when I search "From logic gates to C" https://www.amazon.com/Digital-Systems-Logic-Gates-Processors-ebook/dp/B01M63HPNT
4
u/diagana1 Jan 22 '21
I'm guessing it is this one. Looks interesting.
4
u/Cpt_shortypants Jan 22 '21
Yes it's this one! There may or may not be a free pdf online but you didn't hear that from me :p
18
Jan 22 '21
Not necessarily for you, but for people interested in understanding Javascript, I recommend Eloquent Javascript. It is free online, and it's physical book is high quality as well.
It provides excellent lessons and examples so you both learn content and have challenges to test your knowledge and understanding.
A lot of the memes about JavaScript come from misunderstanding its bindings and type conversion, and this book explains those concepts well.
2
15
u/wsppan Jan 22 '21
Take the Build a Modern Computer from First Principles: From Nand to Tetris (Project-Centered Course)
In the Beginning was the Command Line by Neal Stephenson.
Computer Science Distilled: Learn the Art of Solving Computational Problems by Wladston Ferreira Filho
Thinking in Systems: A Primer by Donella H. Meadows
13
u/nitrobitcher Jan 22 '21
Currently working through SICP (https://mitpress.mit.edu/sites/default/files/sicp/full-text/book/book.html)
YMMV but it is by far the most entertaining CS book I've ever read (i've not read many books though). it will also probably change the way you think about programming
1
u/javier123454321 Jan 23 '21
Going through this one too. It's making me think in computer, I like it
4
u/rebel_druid Jan 22 '21
Yes, this. Complex topics explained in a straight forward way is the most helpful and a delightful way to read. I have seen authors do the opposite as well. Write simple things in a convoluted way to seem erudite.
Such easy to follow books become a classic nonetheless and would appreciate some suggestions for similar books.
4
u/Luna2560 Jan 23 '21
Kinda off topic but what do you do to retain the information in a textbook? Like do you just remember it naturally or do you summarise each chapter and write down key dot points?
1
u/Passname357 Jan 26 '21
Not OP, but I’ve read some textbooks front to back just to learn (like Aho’s compilers textbook). Even in class I never take notes because I feel like it keeps me from paying attention and I do better without it. I find reading a much more active activity than listening to a lecture, and so naturally I retain even more. It certainly helped that at the time I was reading the compilers textbook I was also implementing a C compiler from scratch and so I had the concepts kind of drilled in that way.
7
Jan 22 '21
It's focused more high-level but The Imposter's Handbook is pretty good. Definitely helped me fill some gaps in my knowledge and it's more of a book that provides a roadmap for topics to explore more in-depth.
1
Jan 22 '21
I am starting with "Writing a Interpreter in Go", but I don't understand how to proceed with the book. There are code samples included along with the digital edition which contains the code that I am supposed to understand. So, is the goal to just read the code along with the text ?
1
u/Threight Jan 23 '21
I mainly read the explanations and read the code when there were bits I wasn't sure I understood. Otherwise I'd skim the code quickly as Go itself doesn't really interest me.
If you're as interested in the fundamentals behind compilers I suggest following along with your own code in whatever language you're comfortable. I had fun designing my own little language and got up to a functional parser before I lost interest like I always do lol
2
2
Jan 26 '21
for me, no book, not even in CS, but NO book. will ever. EVER. ever exceed the clarity of C Programming: A Modern Approach by K.N. King. this should be the book you experience your first time with. Even someone like me with massive learning issues was able to follow the book. the way it explains pointers will make you feel like you're being cradled gently from side to side.
1
u/aedeph Jan 23 '21
CLR, SICP, TaPL, HoTT, Dragon Book, PFDS
1
u/rebel_druid Jan 23 '21
Err.. Some I recognise.. what are tapl, hott and pfds?
-1
u/aedeph Jan 24 '21
3
u/rebel_druid Jan 24 '21
well.. not so straight forward with pfds.. just autocorrecting and showing random pdfs.. 😅
26
u/NinjaBatHat Jan 22 '21
Code: The Hidden Language of Computer Hardware and Software - How was this first book to learn Computer Hardware/Architecture? I'm trying to get into the specs and things in a computer and this looks like a perfect way to get introduced to those topics. Mind if you share a bit more insight if you don't mind?