What are the best books for computer science

What are the best books for computer science, I am studying javascript and I realised that I need a lot of infos to ace my code, and to actually understand processors and things like threads, compilers, algorithms and so on and so forth ?

if I wanted to answer this question , I would look up the text books that my favorite university is using for various classes…

Here are some random resources…

History of Computer Science in cute animated video playlist

Cheap Asynchronous JS video course

Eloquent JS book

A Classic Design Patterns Book

Algorithms Book with great ratings

Just one caveat: understanding aspects of CS may help greatly with programming in general, having a good grounding in it is a Very Good Thing, etc. But, it’s [arguably] not really going to help with day-to-day JS. JS is a practical scripting language, mainly there to allow interaction with web browsers. It’s very high-level and is generally detached from the nuts and bolts of how computers (and maths behind them) work. For example, you mention threads: JS has one thread, that’s it, so knowing how to use threads has no real practical use in JS. Knowing how to write compilers: again, very little practical value w/r/t JS. Algorithms, more useful, but JS has a very limited toolset: you can’t drop into low level code, the number of data structures available to you is 1, the language is not good at maths, etc.

This isn’t to put you off, just that trying to learn a high-level language like JS by going from first principles is going to take you a very long time. 100% learn CS, but large parts of it won’t help you write JavaScript at all.

Some stuff definitely will though. Regarding books, the ones I would recommend unequivocally (the language they use I’ve put in brackets, though it’s mainly irrelevant):

  • Structure and Interpretation of Computer Programs (Lisp)
  • Designing Programs (Racket)
  • Concepts, Techniques and Models of Computer Programming (Oz)

And this course, which is the best online course I’ve ever done (has a part B and C as well, languages are ML, Racket and Ruby). It has the best explanation of closures I’ve ever been given, for one thing:

1 Like

One more thing Dan , i noticed that many courses swing between different languages like the one you gived me , how can i learn JS while i’m studying Ruby or Lisp

The point of CS is not to learn a language, I think that was one thing I should have said: it’s important to emphasise this. It’s not particularly relevant in a lot of cases because you’re not learning to learn a language, you’re using a language as a tool to understand a general concept.

JS is a pretty complex, very high level language that doesn’t really work in the same way as most other languages, and is not a particularly good language for learning concepts. It sometimes gets used for teaching because it’s available everywhere (and it’s really good at some things - visualising stuff for example), but most CS learning stuff is not going to be JS.

2 Likes

This came up as a related topic when I was posting this thread: A small site listing CS text books from universities

I created a small site that collects text books from popular universities. Might be useful!