[HN Gopher] Ask HN: I'm looking for a good book on the fundament...
       ___________________________________________________________________
        
       Ask HN: I'm looking for a good book on the fundamentals of CS
        
       I'm at the beginning of my software dev career, and as I didn't go
       to school for anything related (B.Sc. Chemistry), I feel like I
       really would like to have the fundamentals of CS down. Doubly so as
       I would like to go into the field of VR, and right now I'm working
       on my own toy rendering engine, which I feel is really exposing my
       lack of knowledge...  Anyways, any suggestions welcome. Ideally
       it'd be more digestible than just a plain textbook but I'm open to
       anything. I imagine either way it'll be a tough but great read to
       work through :)
        
       Author : Karsteski
       Score  : 198 points
       Date   : 2021-12-09 15:14 UTC (7 hours ago)
        
       | tomduncalf wrote:
       | The Manning book is a great, very approachable and even enjoyable
       | intro to the basics of algorithms and data structures. It's got
       | illustrations and everything!
       | 
       | It doesn't go into loads of detail but as a first intro I think
       | it's great, then you can go deeper if you want.
       | 
       | https://www.manning.com/books/grokking-algorithms
        
       | funkaster wrote:
       | it seems you want something that's less CS (math) and more
       | algorithms. I would highly recommend the classing TAOCP
       | (https://www-cs-faculty.stanford.edu/~knuth/taocp.html). If
       | anything, your IQ bumps by 10 points just by putting the book in
       | your shelf.
       | 
       | It's a really fun book, tons of exercises and never gets old.
        
       | scns wrote:
       | This book [0] uses Java. The content of the edition using Python
       | is the same IIRC. The first one used Swift and is a tad older.
       | 
       | [0] https://www.manning.com/books/classic-computer-science-
       | probl...
        
         | MrUssek wrote:
         | Plus one for these. I found them a quicker and perhaps funner
         | read than CLRS which was my undergrad textbook, and it covers a
         | lot of interesting stuff. These are all a part of David Kopek's
         | book project you can find here: https://classicproblems.com/
        
       | memetomancer wrote:
       | Maybe this won't be a popular opinion, but there are some non-CS-
       | specific works that really helped cement some underlying
       | principles.
       | 
       | Namely, the fun stuff like "Martin Gardner's Mathematical Games"
       | articles, "Godel, Escher, Bach" by Hofstadter, and "The Cyberiad"
       | by Stanislaw Lem.
       | 
       | These require a bit of thoughtfulness applied to relate to CS.
       | And it was specifically worthwhile to actually work through the
       | number theory stuff in GEB.
        
       | activitypea wrote:
       | https://teachyourselfcs.com
        
       | vngzs wrote:
       | Surprised no one seems to have mentioned the godfather of CS
       | books, _The C Programming Language_ by Brian Kernighan and Dennis
       | Ritchie [0]. At first glance, it 's a programming language book
       | rather than a "computer science" book, but you probably won't
       | think that by the time you're finished ...
       | 
       | First, every operating system you'll use - likely in your
       | lifetime - is a giant mountain of C code. From the kernel all the
       | way to the userspace utilities. As a programmer, your career will
       | be forged on the shoulders of giants, and those giants wrote in
       | C. So to understand how your machine works, you must learn C.
       | 
       | Second, K&R covers far more than just a language - it presents a
       | system of _thinking_ about computing. It covers algorithms for
       | line counting, memory allocation, and the construction of linked
       | lists. The techniques you learn for pointer manipulation will
       | enable you to author implementations of data structures that are
       | considerably more elegant and simple than the naive methods [2].
       | 
       | It contains fundamental, influential insights about the computer
       | science field on nearly every page.
       | 
       | Still, I'd discourage you from writing C professionally if you
       | can help it. Rust retains nearly all the advantages of C while
       | abandoning its unsafe memory model and replacing it with compile-
       | time determined allocations and de-allocations. As roughly 70% of
       | CVEs in C or C++ projects are caused by memory unsafety, this is
       | a significant feature [1]. But the insights you make in studying
       | K&R will translate to everything you build, regardless of
       | language.
       | 
       | You'll walk away with a mental model for computers so powerful
       | that it was the genesis of our modern technology era.
       | 
       | [0]: https://en.wikipedia.org/wiki/The_C_Programming_Language
       | 
       | [1]: https://www.chromium.org/Home/chromium-security/memory-
       | safet...
       | 
       | [2]: https://grisha.org/blog/2013/04/02/linus-on-understanding-
       | po...
        
         | aidenn0 wrote:
         | FWIW, I liked Plum's "Learning to program in C" far better than
         | K&R's book. I can't recommend Plum today though because it's
         | pre-ANSI so the code all uses K&R style declarations.
        
       | georgecmu wrote:
       | There are a lot of book recommendations, but I would not focus on
       | books if I wanted to get the equivalent of a solid CS education.
       | Instead I would work through university lecture slides,
       | assignments, and exams -- basically fast forward through a CS
       | undergrad leveraging what you already know.
       | 
       | I'm partial to CMU's CS syllabus for obvious reasons, but I find
       | that it's also one of the most open and available resources on
       | the web; i.e. not locked in on an intranet, etc.
       | 
       | With pre-existing background in software development the basic
       | syllabus is more than doable in a 3-4 months. There are two
       | sequences below: programming and theoretical fundamentals; you
       | can do them in parallel.
       | 
       |  _Programming:_
       | 
       | 15-211: Introduction to Data Structures. Used to be in C++; now
       | looks like it's in Java.
       | https://www.cs.cmu.edu/~mjs/121/lectures.html
       | 
       | 15-212: Principles of Programming. Still in ML.
       | https://www.cs.cmu.edu/~me/212/schedule.html |
       | https://www.cs.cmu.edu/~fp/courses/96-212/ (unlocked assignment
       | pages)
       | 
       | 15-213: Intro to Computer Systems. I hesitate to recommend this;
       | 90% of the value in this course is in the labs and assignments,
       | so it's difficult to do on one's own, but I would at least go
       | through the slides and try to work through exams.
       | https://www.cs.cmu.edu/~213/schedule.html
       | 
       |  _Theoretical:_
       | 
       | 15-251: Great Ideas in Theoretical Computer Science. Used to be
       | Discrete Math with a heavy CS lean; it may have evolved.
       | https://www.cs.cmu.edu/~15251/schedule.html
       | 
       | 15-451: Algorithms. Here's a decade worth of lectures, exams and
       | assignments - take your pick: https://www.cs.cmu.edu/~15451/ The
       | 2013 course looks pretty complete:
       | https://www.cs.cmu.edu/afs/cs.cmu.edu/academic/class/15451-f...
       | 
       |  _Next steps:_
       | 
       | Since you are interested in VR, etc, you should probably look
       | into the Computer Graphics courses. Note that the undergrad and
       | grad courses are combined; the only difference is the
       | expectations:
       | 
       | 15-462: Computer Graphics
       | http://15462.courses.cs.cmu.edu/fall2020/ Exam problems and
       | solutions are gold:
       | http://15462.courses.cs.cmu.edu/fall2020content/exams/finals...
       | 
       | 15-463: Computational Photography
       | http://graphics.cs.cmu.edu/courses/15-463/
       | 
       | 15-464: Technical Animation
       | http://graphics.cs.cmu.edu/nsp/course/15464-s21/www/syllabus...
       | http://graphics.cs.cmu.edu/nsp/course/15464-s21/www/assignme...
       | 
       | Hope this helps. Good luck!
        
       | gjkood wrote:
       | Have you tried some of the old "Graphics Gems" series books yet?
       | [1], [2], [3] They are not CS fundamentals but will help you out
       | with the necessary concepts, math and algorithms for graphics
       | programming and ray-tracing.
       | 
       | As others have mentioned any books on Data Structures &
       | Algorithms are a must. [4], [5], [6]
       | 
       | However in my opinion, trying to understand CS fundamentals
       | without undergoing some sort of formal education is a chore. You
       | won't know what you are missing. Going through an established
       | approved syllabus will give you a fuller understanding. But that
       | is only if you are interested in the long haul.
       | 
       | There are a number of MOOCs that may fit the bill allowing you to
       | slowly gather the knowledge without sacrificing too much time and
       | focus on a day job to keep you going. I feel they are also great
       | value for money for what you get. Some of them are from very
       | reputable names if that is important. [7][8].
       | 
       | Since you have a B.Sc you can do the Masters level but there are
       | also Bachelors level courses. [9]
       | 
       | 1. https://www.amazon.com/Graphics-Gems-Andrew-S-
       | Glassner/dp/01...
       | 
       | 2. https://www.amazon.com/Graphics-Gems-II-IBM-
       | No/dp/0120644819...
       | 
       | 3. https://www.amazon.com/Graphics-Gems-No-3-David-
       | Kirk/dp/0124...
       | 
       | 4. https://www.amazon.com/Introduction-Algorithms-3rd-MIT-
       | Press...
       | 
       | 5. https://www.amazon.com/Algorithms-4th-Robert-
       | Sedgewick/dp/03...
       | 
       | 6. https://www.amazon.com/Algorithm-Design-Manual-Steven-
       | Skiena...
       | 
       | 7. https://www.coursera.org/degrees/master-of-computer-
       | science-...
       | 
       | 8. https://www.coursera.org/degrees/mcit-penn
       | 
       | 9. https://www.coursera.org/degrees/bachelor-of-science-
       | compute...
        
         | Karsteski wrote:
         | I'm actually going to apply to the OMSCS as well, so hopefully
         | I get in. It'll be part-time so I can work, but I'll definitely
         | have less of a social/gaming life for the next few years if I'm
         | pursuing an online masters lol
         | 
         | OMSCS Website: https://omscs.gatech.edu/home
        
           | gjkood wrote:
           | A very good choice Karsteski, probably one of the best online
           | CS programs out there. Wishing you the best in getting in.
           | 
           | I have embarked on another MOOC catering to a business degree
           | and still figuring out how to balance course load with
           | personal and professional life but I am loving it.
           | 
           | Learning a lot and the courses encourage group/team
           | assignments working with students from all over the world.
           | Learning to navigate the global team work model.
           | 
           | Good luck.
        
       | hereforphone wrote:
       | The Art of Computer Programming. It requires some decent math
       | knowledge. But so does CS understanding.
        
       | Jtsummers wrote:
       | There are three areas to really study here:
       | 
       | 1. Programming
       | 
       | 2. Computer Science
       | 
       | 3. Software engineering
       | 
       | Programming is, well, the act of writing code both in general and
       | in a particular language. For this, find one or two books or
       | courses on the languages you're using. Work through them, type up
       | most, if not all, their sample programs yourself. Don't just
       | copy/paste, don't download a copy of their source code. Typing it
       | in helps a lot to internalize the information. Then create
       | variations. I'm learning Rust, as an example, and have been
       | writing up the programs in _The Rust Programming Language_ , then
       | I change their structure, make them generic, or modify other
       | elements to see if I actually understand what's happening.
       | 
       | Computer science is more fundamental. For that, many of the
       | algorithms & data structures books mentioned are great to study.
       | It's good practice to implement both (algorithms & data
       | structures) in whatever languages you're using, even if they
       | already have them built in. Then switch out your implementation
       | for the language standard version (if present) so you learn both
       | the fundamentals (how they're built and used) and the standard
       | (how they're used in _your_ language). Pay attention to things
       | like algorithm analysis, it gets cast aside here sometimes but it
       | really is helpful especially in something like rendering. If you
       | understand the relative costs of different choices you will get
       | much more efficient programs, but also study how your actual
       | system behaves. Sometimes an on-paper faster algorithm is slower
       | in practice due to how the CPU and RAM actually work (like
       | scanning a vector for something may be faster in practice than a
       | faster-on-paper hash table or map data structure). You can go
       | deeper and study theory of computation and other areas, but that
       | 's not going to be necessary yet.
       | 
       | Software engineering is, reductionist definition, about three
       | things: working with others, working with your future self,
       | organizing programs and systems. Two books I like on the non-
       | technical side: _The Mythical Man-Month_ by Fred Brooks and _The
       | Psychology of Computer Programming_ by Gerald Weinberg. Some
       | parts of both are dated, but they 're still relevant to today and
       | thinking about how teams work and systems develop over time. On
       | the more technical side: Learn how to test in your languages, and
       | read _Refactoring_ by Martin Fowler. Learn to use version
       | control, even for toy projects. Create git repos and get in the
       | habit of committing early and often (like with working with any
       | file on the computer you should save early and often so you don
       | 't get burned by a crashed editor, committing early and often
       | saves you from when you make a major change and realize you want
       | to undo it).
       | 
       | ---------------------
       | 
       | You can study programming without studying CS proper, but at some
       | point you are likely to start running into decision points that
       | will be hard for you without knowing the tradeoffs that CS (even
       | just the introductory portions) teaches. Same thing with software
       | engineering, it's not technically necessary for programming, but
       | once you start working at scale (large projects or more than just
       | a handful of people) it pays to understand that area.
        
       | noisy_boy wrote:
       | I'll take the opportunity to hop on to this thread and admit that
       | I have never properly learned C (I have seen some code here and
       | there). Considering there are several comments advising on using
       | C as the language to implement the algorithms, what is your
       | recommendation to get started with C? I'm looking for something
       | that is not too long (I have a problem continuing with big books)
       | and yet is concise and teaches the language in a well rounded
       | manner.
        
         | jimpudar wrote:
         | It's hard to recommend anything other than the original K&R -
         | "The C Programming Language".
         | 
         | It's obviously not going to teach you the ins and outs of
         | modern C development, but it's the best introduction to the
         | language out there IMHO.
        
         | dS0rrow wrote:
         | https://nostarch.com/Effective_C by Robert C. Seacord. a little
         | about the book and the motivation behind "Why C":
         | https://ieeexplore.ieee.org/document/9237323
        
       | nixpulvis wrote:
       | I can't recommend How to Design Programs (HtDP) enough.
       | 
       | The authors care _deeply_ about not just the content, but the
       | learning process itself. It may at times feel repetitious and
       | even boring, but it 's a principled introduction to CS which will
       | set you up for success in ANY programming language. And the book
       | is free online :)
       | 
       | https://htdp.org/
       | 
       | From here you can graduate to lower level programming concepts in
       | C (or Rust), more practical languages like Ruby, Python or even
       | Java for high level application design. Basically, it's time to
       | learn about full-fledged memory management one way or another.
       | Don't miss out on some type theory along the way, remembering
       | that they are just codified data definitions and function
       | signatures.
        
       | pshushereba wrote:
       | The Impostor's Handbook https://bigmachine.io/products/the-
       | imposters-handbook/ has been helpful for me. Been using it to
       | supplement learning from a coding bootcamp.
        
       | tomhoward wrote:
       | Basic Microprocessors and the 6800 (1981):
       | 
       | https://www.amazon.com.au/Basic-Microprocessors-and-the-6800...
        
       | blagovest wrote:
       | Hey! I have written a book on conceptual foundations of
       | programming and CS. It is language-agnostic and focuses on
       | principles that transcend programming languages. It talks about
       | everything from functions and types (and where they come from,
       | theoretically) to concurrency and parallelism. It's written with
       | beginners in mind that want to have a grasp on concepts as well
       | as working devs that have hands-on experience with a language,
       | but want to learn to think in cross-language concepts. I am
       | really short on time to put a website on the internet yet (I hope
       | by Christmas it'd be up), but I'd love to send a draft to whoever
       | is interested (if you like, you can pay me later, but no
       | obligations) Email is blagovest dot gospodinov at yah00 dot c0m
       | (just say you're from HN)
        
       | WoodenChair wrote:
       | This is self serving, but I wrote the Classic Computer Science
       | Problems series for developers like you--folks who work in
       | software but don't have a CS education. It is a broad survey,
       | using code instead of theory. It's broad not deep. They're not
       | textbooks:
       | 
       | https://classicproblems.com
       | 
       | I also recommend Grokking Algorithms by the same publisher as an
       | introductory book if you don't want a textbook.
       | 
       | None of these go into graphics at all though, so they won't help
       | you with rendering or VR.
        
       | b20000 wrote:
       | for what you are doing, you can probably learn more from reading
       | id software's open source code bases. e.g. the doom code base.
        
       | zameericle wrote:
       | I always recommend Robert Sedgwick's series:
       | https://www.amazon.com/Algorithms-Parts-1-4-Fundamentals-Str...
       | 
       | You'll also get a chance to learn C++ as you go through it.
        
       | treebog wrote:
       | Lots are recommending CLRS, but IMO it is way too dry and dense
       | for a first course.
       | 
       | I taught myself algorithms with the Algorithm Design Manual by
       | Skiena, and I strongly recommend it. The first half is an
       | exposition on algorithms, and it is mercifully readable, fun, and
       | short. The second half is a catalog of different algorithms. You
       | don't really read through it, but it is useful as a reference if
       | you have a specific problem you're trying to solve and you want a
       | background on algorithms in that area.
        
       | debo_ wrote:
       | A couple friends of mine in similar situations spoke very highly
       | of The Imposter's Handbook (https://bigmachine.io/products/the-
       | imposters-handbook/)
       | 
       | I have a CS degree and I still really enjoyed reading through the
       | 1st ed. of the first volume. I haven't looked at what was done
       | with the material since then.
        
       | revorad wrote:
       | I haven't used it myself but have heard good things about the
       | resources here - https://teachyourselfcs.com
        
         | shmde wrote:
         | This website is blocked in India with the message.
         | 
         | "The website has been blocked as per order of Ministry of
         | Electronics and Information Technology under IT Act, 2000."
         | 
         | https://imgur.com/a/NuRxjFl
        
         | ivanech wrote:
         | This is a great list. The person who made it runs a school for
         | CS fundamentals, and I've been taking classes there for about a
         | year. I strongly recommend it: https://bradfieldcs.com
        
         | srcreigh wrote:
         | Also haven't used it, but this link from there [0] regarding
         | intro to CS-style discrete math proofs seems somewhat lacking.
         | 
         | There doesn't seem to be enough focus on teaching proof
         | techniques, and skips straight to discrete math content.
         | 
         | Could be a decent beginner resource if combined with something
         | that teaches proof techniques though.
         | 
         | EDIT: the MIT book also listed is actually good [1]
         | 
         | [0]:
         | https://cims.nyu.edu/~regev/teaching/discrete_math_fall_2005...
         | 
         | [1]: https://courses.csail.mit.edu/6.042/spring17/mcs.pdf
        
       | ska wrote:
       | There are some good mainstream recommendations in the thread
       | already. For something less obvious: Given your background, you
       | may find SICP
       | (https://mitpress.mit.edu/sites/default/files/sicp/index.html)
       | works well for you.
       | 
       | If you work your way through the exercises, and read the
       | footnotes, you'll end up with a pretty solid base. You don't have
       | to do the work in scheme, but that in itself is a good learning
       | exercise.
        
         | neilv wrote:
         | If anyone wants to work through SICP, but is having trouble
         | getting MIT Scheme for their computer, or wants something
         | closer to a Fisher-Price student IDE, :) there's an add-on for
         | DrRacket:
         | 
         | https://docs.racket-lang.org/sicp-manual/Installation.html
        
       | dmux wrote:
       | I've always been partial to "Introduction to Computing:
       | Explorations in Language, Logic, and Machines" [0] by David Evans
       | of the University of Virginia.
       | 
       | [0] https://computingbook.org/
        
       | CottonMcKnight wrote:
       | I'm a bottom-up learner. To take bottom-up "fundamentals of CS"
       | to an extreme (without venturing too far into electrical
       | engineering):
       | 
       | First, work your way through Kernighan & Ritchie and do EVERY
       | exercise.
       | 
       | Then read Hennessy & Patterson (Computer Architecture).
       | 
       | When you're done, you'll understand exactly how a computer
       | executes instructions, and you'll have an abstract mental map
       | from C code to machine code.
        
       | narenkeshav wrote:
       | Try harvard's free CS60
        
       | mystickphoenix wrote:
       | I found The Imposters Handbook - Rob Conery to be a fantastic
       | overview of CS concepts. Taught me where my CS fundamentals were
       | deficient and gave me enough of the proper language to search
       | effectively and start filling in those deficiencies.
        
       | nomemory wrote:
       | I had a good relantionship with Segdewick's books, before being
       | turned off by Cormen a few times. They are less math focused, and
       | overall have a beginner friendliness to them. They won't take you
       | by the hand an explain things like you are 5, but nevertheless
       | they are more easy to digest.
       | 
       | Also as a non-popular opinion in this current age, I recommend
       | you to learn how to implement your algorithms in C, rather than
       | an easier to grasp programming language. Even if you are probably
       | not not going to program in C in your future career,
       | understanding how memory management works will give you an edge
       | later.
       | 
       | Also given C's loose style, you will also get some skills in
       | organizing your code in a language that doesn't impose a lot of
       | obvious constraints to the way you write your code. You will be
       | able to build your own conventions, and evolve them once you get
       | more skilled. Seeing what others are doing is also important.
       | 
       | Good luck!
       | 
       | PS: Don't fall into the macro trap, you will never get out.
       | (inside joke).
        
         | kevinventullo wrote:
         | I'll sort of second this by saying that Sedgewick's Algorithms
         | I/II courses on Coursera are top-notch and completely free. He
         | is a truly thoughtful educator.
         | 
         | Completing those courses was probably the most useful thing I
         | did when prepping for interviews as part of a career change 6
         | years ago.
        
           | willhinsa wrote:
           | Awesome!! Any other tips you have for someone going through
           | that career change as well? I have a Mathematics BA, and
           | worked as an actuary. I've self taught myself varying degrees
           | of SQL, Python, JavaScript, and C, but I've found it
           | difficult not to feel like an imposter without formal
           | qualifications, even though I know I'm a capable learner and
           | love solving challenging problems.
        
             | kevinventullo wrote:
             | I came from math as well! For what it's worth, I've found
             | that even the brightest computer scientists and software
             | engineers have a solemn respect for mathematics.
             | 
             | Don't worry about formal qualifications. This is an
             | industry where the largest and most successful companies
             | were started by college dropouts. It's still very young and
             | things are changing faster than academia can keep up. A
             | willingness to learn and relearn is critical.
             | 
             | My prep for big tech interviews basically boiled down to
             | those algorithms classes, doing ~150 leetcode problems,
             | slapping together a small junky android app, and perusing
             | undergrad CS material on Wikipedia. To be honest, the first
             | two are probably enough to get your foot in the door at the
             | biggest companies.
        
             | geoka9 wrote:
             | Software dev is a trade, not a science. With a math degree
             | and stats work experience, I'd say you're better qualified
             | as far as credentials than most of us professional devs.
        
             | aidenn0 wrote:
             | Discrete math is to Computer Science as Calculus is to
             | Physics. If you still remember any discrete math from your
             | Math BA, you should have zero issue consuming any
             | undergraduate textbook on theoretical CS.
        
         | Karsteski wrote:
         | I've actually implemented a few algorithms and containers in C,
         | I agree with your advice on that front!
         | 
         | Were you referring to [Computer Science: An Interdisciplinary
         | Approach](https://www.pearson.com/us/higher-
         | education/program/Sedgewic...)?
        
           | dkjaudyeqooe wrote:
           | He's more likely talking about "Algorithms": https://books.go
           | ogle.hr/books?vid=ISBN9780321573513&redir_es...
        
         | dS0rrow wrote:
         | this recent book published by No Starch implements everything
         | in pure c: https://nostarch.com/algorithmic-thinking
        
           | alleycat5000 wrote:
           | This book is a fun read too!
        
         | mindcrime wrote:
         | I'm a big fan of Sedgewick's books myself. I like how he has
         | parallel series of his books, for different programming
         | languages. So you get "Algorithms in Java" or "Algorithms in
         | C++" or whatever, depending on your preference. I think he has
         | at least C, C++, and Java versions.
         | 
         | https://www.cs.princeton.edu/~rs/
        
           | JeremyNT wrote:
           | Do you know if there's much difference between these beyond
           | the language used? It seems like he's only updating the Java
           | version these days, and that's what is used in the Coursera
           | course. From what I can tell he's collapsed it down to just a
           | java version entitled "Algorithms" that hit 4th edition in
           | 2011.
           | 
           | I'd rather have the exercises / examples in C but not if it
           | means swimming upstream.
        
             | mindcrime wrote:
             | It's funny, I have each book of all three of the respective
             | original series: Java, C, and C++. But I have never sat
             | down and done a "side by side" comparison. And I've mostly
             | worked through the Java version. I guess I had assumed that
             | the contents were largely the same modulo language oriented
             | variations, but I can't swear that that is the case.
             | 
             |  _From what I can tell he 's collapsed it down to just a
             | java version entitled "Algorithms" that hit 4th edition in
             | 2011._
             | 
             | I never got around to picking that one up, so I don't
             | really know anything about it.
        
         | tomhallett wrote:
         | I like how Segdewick's book comes with working examples in
         | java, which feels very approachable for a practitioner. In
         | comparison, Cormen's book has lots of pseduo code examples
         | where the indexing is 1 based. Cormen lays out the reasoning
         | for this early in the book, how 1 based indexing is clearer for
         | teaching, which sounds completely reasonable but is an
         | additional hoop to jump through when trying to build working
         | examples of the algorithms.
        
         | scns wrote:
         | CS50 from Harvard on https://edx.org used to teach Computer
         | Science using C and still might do so.
        
           | Karsteski wrote:
           | I've actually gone through CS50x, but I felt that was only a
           | base introduction compared to a regular old CS curriculum
        
         | cloverich wrote:
         | This was the book I used. It is more accessible yet
         | interestingly some comments seem to characterize it as
         | "beginner friendly" in a way that suggests it is less
         | canonical. Make no mistake, if you learn the material in
         | Sedgewick well you'd be light years ahead of 99% of your peers.
         | It likewise provides depth and foundations for things like
         | leetcode, thus far the majority of leetcode problems I've done
         | were toy versions of things covered in the book.
         | 
         | On a more personal / subjective PoV, IMHO its just a much
         | better book than the majority of the others. Its not as basic
         | as Grokking Algorithms nor as interview focused as Cracking the
         | coding interview. I would suggest the latter if you just want
         | to be good at programming interviews.
        
           | bennysomething wrote:
           | Interesting, I was working through sedgewick course on
           | Coursera, I hit a bit of a wall, it seemed like one of the
           | assignments was just really badly explained. However lots of
           | other students were fine so it's probably me. I considered
           | getting the grokking booking instead.
           | 
           | What's the main difference between sedgewick and the grok
           | algo book?
        
             | carabiner wrote:
             | Do you remember which assignment? I did the first one,
             | percolation and hooo boy, that was a trip. The problem
             | statement buries the key library that you use for
             | everything at the bottom of the page. Did get it eventually
             | though.
        
               | bennysomething wrote:
               | Hi, yeah week 3 collinear points, I had to post a number
               | of questions on the message board due to language being
               | ambiguous. In the end I could only get 74 percent and I
               | had no idea why. I spent hours and hours and hours on it.
               | 
               | Yes percolation was a tough first assignment.
               | 
               | Week two was linked lists and really straight forward.
               | 
               | Also I found Sedgwick's explanations too terse, I ended
               | up on YouTube countless times watching other videos that
               | helped me get what he was saying.
               | 
               | I think it's probably me though, it's a Princeton course
               | so I guess it's aimed at the very bright!
        
       | MediocreSysEgnr wrote:
       | I'm addition to all of the canonical texts folks have posted
       | here, it might be worth noting the ACM has a publication in which
       | they define what makes a complete Computer Science curriculum:
       | 
       | https://dl.acm.org/doi/10.1145/240483.240502
       | 
       | This is behind their paywall, and I would discourage you from
       | paying, but someone might be able to find the same document with
       | a simple web search.
        
       | JoelMcCracken wrote:
       | I'd advise SICP. Even though it is focused on functional style,
       | it really does apply to general programming.
       | 
       | It made me a far far better engineer when I was first starting
       | out.
       | 
       | There are lectures online for the book if you want to break up
       | the tedium of just reading it.
        
       | MediocreSysEgnr wrote:
       | I'm addition to all of the canonical texts folks have posted
       | here, it might be worth noting the ACM has a publication in which
       | they define what makes a complete Computer Science curriculum:
       | 
       | https://dl.acm.org/doi/10.1145/240483.240502
       | 
       | This is behind their paywall, and I would not discourage you from
       | paying, but someone might be able to find the same document with
       | a simple web search.
        
       | bennysomething wrote:
       | https://teachyourselfcs.com/
       | 
       | In particular they say if you can't take the time to do all of it
       | then there are 2 books that give most bang for buck: _Computer
       | Systems: A Programmer's Perspective
       | 
       | Designing Data-Intensive Applications
       | 
       | See hacker news thread:
       | https://news.ycombinator.com/item?id=22286340
        
       | comeonseriously wrote:
       | Algorithms + Data Structures = Programs by Niklaus Wirth.
        
       | pfarrell wrote:
       | The best book on programming for the layman is "Alice in
       | Wonderland"; but that's because it's the best book on anything
       | for the layman.
       | 
       | - Alan Perlis
        
       | ogsalmanxx wrote:
       | Textbooks are the old way to learn, but sometimes old is gold.
       | 
       | Use videos for faster learning though. It's pretty much learning
       | on cruise mode.
        
         | Karsteski wrote:
         | I like videos for small topics as well, but I find reading much
         | easier for hard to digest knowledge, personally
        
         | unmole wrote:
         | > Use videos for faster learning though.
         | 
         | I'm pretty sure I can read at twice the speed that an average
         | video is spoken.
         | 
         | And more importantly I can pause to think, re-read a sentence I
         | didn't grasp and pace myself. All of these are far more
         | cumbersome to do with video.
         | 
         | There my be entirely valid reasons to prefer videos. But I
         | strongly contest the claim that videos are faster.
        
         | tjr wrote:
         | Asking as an avid textbook fan -- what might be some videos
         | that you especially like?
        
         | mikkergp wrote:
         | I find the opposite, I can pace myself with books, take notes
         | in the margins, interact with the harder concepts, cruise
         | through the easier ones. Answer the questions at the end of the
         | book in-line, it feels much more interactive. Since I can
         | physically visualize all the sections/chapters it's easier to
         | skip around. Video is so linear and passive; I have to go at
         | the pace of the video and it's harder move alinearly. Also I
         | have much more stamina for reading than listening to audio, the
         | words start to blur together after a while.
        
           | randcraw wrote:
           | My chief problem with learning from videos is... videos
           | progress at a linear rate, but I don't absorb concepts at a
           | linear rate. And even when delivery_rate/absorption_rate is a
           | constant, it's rarely 1. I often have to stop, reverse, flip
           | pages back and forth to compare precedents with consequents
           | -- none of which is feasible with video.
           | 
           | With books I can also stop and take notes or reflect on what
           | I've learned. That's harder with video.
           | 
           | And of course fewer words are spoken on video than are
           | written in a book with fewer concepts and fewer
           | illustrations, and with more verbal miscues -- errors or
           | omissions.
           | 
           | I also rely heavily on the index of a book to look up related
           | topics and terms, as used by the author.
           | 
           | In subjects that are precise (like math or algorithms) I've
           | found learning from books to be far superior to video.
           | 
           | That said, some videos are great, especially those that
           | animate or visualize, like 3Blue1Brown and Khan Academy.
        
       | sadn1ck wrote:
       | A lot of recommendations here, so I would like to ask for some
       | (hope that's allowed).
       | 
       | - Operating Systems. I had a course on OS (I'm a student), but I
       | felt it was kind of lacking, and would like to explore more. -
       | Compilers? Seems very interesting
       | 
       | Also I've started with a bit of haskell to learn functional
       | programming, would love some pointers from the more experienced
       | people here :D
       | 
       | (Also networking?? So much to learn lol)
        
         | arghnoname wrote:
         | If you already know the basics of what an OS does, it's best to
         | just get into some more detail of how it does it. "The Design
         | and Implementation of the FreeBSD operating system" is a great
         | book for the structure of a *nix system. If you understand the
         | design of one of these systems, none of the others is hard to
         | figure out.
         | 
         | Beyond that, if you want a more academic read it's good to read
         | up on some other architectures. This paper on the history of
         | the L4 microkernel family is a really good discussion of the
         | design decisions and evolution of that system that gets into
         | some classic OS issues:
         | https://trustworthy.systems/publications/nicta_full_text/898...
         | 
         | Other kernel designs worthy of interest are exokernels and
         | unikernels. Also with regard to systems design I've always
         | liked arguments end-to-end arguments to system design (https://
         | web.mit.edu/Saltzer/www/publications/endtoend/endtoe...) and
         | another paper on the duality of OS structures (http://occs.ober
         | lin.edu/~ctaylor/classes/341F2012/lauer78.pd...)
        
         | samhw wrote:
         | I've done a moderate amount of compiler work, and the resources
         | I'd recommend are:
         | 
         | - "Compilers: Principles, Techniques, and Tools" (v popular,
         | generally referred to as the 'dragon book' on account of its
         | cover):
         | http://ce.sharif.edu/courses/94-95/1/ce414-2/resources/root/...
         | 
         | - "Parsing Techniques":
         | https://staff.polito.it/silvano.rivoira/LingTrad/ParsingTech...
         | 
         | - Not quite about compilers, but the website 'Crafting
         | Interpreters' touches on the pre-compilation parts of a
         | compiler (scanning, lexing, parsing, optimisation):
         | https://www.craftinginterpreters.com/
         | 
         | - If you're compiling a typed language, this blog post is a
         | good intro to type inference algorithms, esp with a view to
         | implementing a Hindley-Milner (bidirectional) type system:
         | https://eli.thegreenplace.net/2018/type-inference/
         | 
         | I highly, highly recommend at least trying to write a compiler
         | or interpreter. It's a fantastic way to understand more about
         | PL theory, and improve your proficiency with data structures
         | and algorithms.
         | 
         | As for functional programming, it's basically the art of
         | removing the word 'self' from your programs.
        
           | sadn1ck wrote:
           | Wow thank you very much!
        
             | samhw wrote:
             | No probs, best of luck!
             | 
             | If I have any advice, it's:
             | 
             | - Don't try to write a scannerless parser. It's a fool's
             | errand. Lex first into tokens (e.g. LEFT_PAREN,
             | KEYWORD(for), STRING_LITERAL("foo"), NUM_LITERAL(7), etc),
             | then parse that.
             | 
             | - By the same, uh, token: keep everything modular and
             | loosely coupled. Don't mix up parsing state into your lexer
             | (unless you're lexing C or Python, famously), don't mix up
             | lexing code into your interpreter, etc.
             | 
             | - For parsing, start with a simpler grammar. Parsing
             | mathematical expressions is a classic example. Avoid
             | complex grammars that require lots of backtracking or
             | lookaheads. If you want a real language, Go is a good
             | example - a large part of its famous compilation speed is
             | due to its simplicity (due to the fact that its authors are
             | old men who live in a counterfactual version of the 90s
             | imagined in the 70s).
             | 
             | - YMMV, but I find the best approach to parsing is a
             | packrat-inspired bottom-up parser. Iterate over the tokens,
             | and for each token filter your list of rules
             | ('productions') to those which match. 'Reduce' the simpler
             | expressions as you go, and build the more complex
             | expressions out of them (e.g. functions will typically have
             | several statements/expressions, expressions several
             | operations, etc).
             | 
             | - For the compilation step, unless you specifically want to
             | learn about writing object code, then target a 'backend' IR
             | like GCC or LLVM. You'll benefit from their optimisations,
             | and the vast number of platforms they support.
             | 
             | - Choose a language you're familiar with - ideally a simple
             | one - to write it in. You don't want to be learning a new
             | language as you're doing this, trust me.
        
       | revskill wrote:
       | Learn Haskell. Most of Haskell concepts have root in CS and
       | mathematics.
        
       | skripp wrote:
       | "Code: The Hidden Language of Computer Hardware and Software" by
       | Charles Petzold.
       | 
       | It will take you on a journey from a lightbulb to assembly
       | language. It's extremely well written and I wish there were more
       | books like it.
        
         | aklemm wrote:
         | Literally the perfect place to start.
        
         | irony123 wrote:
         | Second this. A great book for understanding how computers work
         | at a low level.
        
       | danans wrote:
       | I liked Algorithms by Dasgupta-Papadimitriou-Vazirani
       | 
       | http://algorithmics.lsi.upc.edu/docs/Dasgupta-Papadimitriou-...
       | 
       | It's written in an approachable, almost conversational style.
       | 
       | Beyond that, for a broader view of algorithms and computing that
       | includes AI, there's Artificial Intelligence: A Modern Approach
       | by Russell/Norvig. My favorite part of that book is actually the
       | "Foundations of Artificial Intelligence" which goes into the deep
       | history of computation (as far back as ancient and medieval
       | times).
        
         | jhgb wrote:
         | Upvote for P&D&V; a top-notch free (CC BY-ND 3.0 CZ) Czech
         | algorithm textbook (http://pruvodce.ucw.cz/) was based
         | primarily on their book (because it's excellent!).
        
       | randcraw wrote:
       | "Foundations of Computer Science" by Aho and Ullman might fit
       | your bill. Its focus is more on the concepts and principles of
       | computing rather than math-centric CS theory.
       | http://infolab.stanford.edu/~ullman/focs.html
       | 
       | Another nontraditional intro to computing worth mentioning is
       | "Structure and Interpretation of Computer Programs" by Abelson
       | and Sussman(s). It teaches programming concepts using the
       | Lisp/Scheme language (seldom used any more), but does so
       | brilliantly.
       | 
       | "Think Python: How to Think Like a Computer Scientist" by Downey
       | might provide the right mix of computing concepts and programming
       | practice.
       | 
       | If you do want a traditional intro to CS theory, two books that
       | cover that topic well are: "Introduction to the Theory of
       | Computation" by Sipser, and "Introduction to Automata Theory,
       | Languages, and Computation" by Hopcroft, Motwani, and Ullman.
       | 
       | Three very good books that introduce algorithms are:
       | "Introduction to Algorithms: A Creative Approach" by Manber, "The
       | Algorithm Design Manual" by Skiena, and "Algorithms" by Sedgewick
       | and Wayne.
       | 
       | Remember that CS theory doesn't age, so buying a used early
       | edition of a textbook should serve your needs just as well as an
       | new up-to-date edition.
        
         | pjmorris wrote:
         | I second the recommendation for "Foundations of Computer
         | Science." (and for the other books as well, but wanted to
         | highlight it.)
         | 
         | For a second or third book, consider 'Algorithm Design Manual',
         | Skiena. I find it more approachable than the MIT Intro to
         | Algorithms.
         | 
         | Also, 'The C Programming Language' remains one of my favorites
         | for a pragmatic approach to learning how to say things to a
         | computer, a great balance to learning the theory. There's a
         | reason 'Hello World' has become so widely known that it's a
         | cliche. But there is plenty of great advice there no matter
         | what language you're in.
        
           | chasil wrote:
           | Both editions of The C Programming Language are on
           | archive.org, by the way.
           | 
           | This is the second edition:
           | 
           | https://ia802802.us.archive.org/15/items/The_C_Programming_L.
           | ..
           | 
           | The Aho book also looks to have gone out of print.
           | 
           | http://infolab.stanford.edu/~ullman/focs.html
        
       | jonjacky wrote:
       | _Algorithmics_ by David Harel is not much mentioned anymore, but
       | it 's really good if you can find it. An easy and inviting read,
       | it was written as a popular book not a textbook but nevertheless
       | covers many topics with very thorough and clear explanations, and
       | also touches on history and culture. I recall there were several
       | versions with different titles - _Algorithmics: The Soul of
       | Computing_ was, I think, a cut-down version.
       | 
       | Seconding Petzold's _Code_ for hardware and low-level
       | programming. Also seconding Downey 's _Think Python_ (which has
       | appeared in several versions with different titles). It is an
       | easy read but is a bit deeper than many introduction to Python
       | books.
       | 
       | Also seconding Wirth's _Algorithms + Data Structures = Programs_
       | but it requires a lot more concentration and study than the
       | previous suggestions. It is also old-fashioned, from the late
       | 1970s I think, uses Pascal as its programming language. It
       | teaches and celebrates a rigorous, economical programming method
       | and coding style which is not much in vogue any more.
        
         | tzs wrote:
         | The Harel book is "Algorithmics: The Spirit of Computing", not
         | "The Soul of Computing".
         | 
         | The book was actually originally just called "The Science of
         | Computing" and published in 1987. The second edition in 1992
         | had the name changed to "Algorithmics: The Spirit of
         | Computing". The third edition in 2004 kept that name and had
         | Yishai Feldman added as coauthor. There was a 2012 reprinting
         | of that which had a new preface written for it that talked
         | about Turing (2012 was his centennial year).
         | 
         | I have the original 1987 edition. Comparing its contents to the
         | third edition's via preview on Amazon, it looks like the first
         | four parts are mostly the same topics.
         | 
         | The chapter on "Algorithms and Intelligence" had moved from the
         | fourth section to a new fifth section and been renamed to
         | "Algorithmics and Intelligence", and a new chapter,
         | "Cryptography and Reliable Interaction" has been added to the
         | fourth section.
         | 
         | Other new chapters, all in the fifth section are "Software
         | Engineering" and "Reactive Systems".
         | 
         | The second edition, according to the preface in the 2012
         | printing, had little change from the first as far as the
         | chapter content but added exercises and solutions.
         | 
         | From second to third chapter 3 changed from "Programming
         | Languages" to "Programming Languages and Paradigms" and dropped
         | APL and Snobol and added C, C++, and Java. Chapter 10 changed
         | from "Parallelism and Concurrency" to "Parallelism,
         | Concurrency, and Alternative Models" and added quantum
         | computing and molecular computing.
        
       | danjaninja wrote:
       | You should checkout https://teachyourselfcs.com/
        
       | whytaka wrote:
       | As a self taught dev myself, check out my comment here:
       | 
       | https://news.ycombinator.com/item?id=29366106
        
       | earthboundkid wrote:
       | Everything I took away from my 4 year degree in CS is in The
       | Practice of Programming by Pike & Kernighan.
        
       | tomstuart wrote:
       | I don't think you'll find a better return on investment than
       | working through _The Elements of Computing Systems_
       | (https://www.nand2tetris.org/) which recently got a second
       | edition. It won't teach you how to make a rendering engine, or
       | even necessarily any data structures or algorithms, but it will
       | give you a big-picture understanding of the practical
       | fundamentals (literally "what is a computer and how does it
       | really work?") which you can then use to direct your own learning
       | based on what you want to know next.
        
       | thesuperbigfrog wrote:
       | "Foundations of Computer Science" by Aho and Ullman is an
       | excellent book and freely available:
       | 
       | http://i.stanford.edu/~ullman/focs.html
        
       | bern4444 wrote:
       | My favorite CS book is structure and interpretation of computer
       | programs.
       | 
       | I used it for one of my college CS classes. The book was written
       | to be a semester class and MIT even has various offerings of
       | their version of the course recorded and available on YouTube.
       | 
       | The book is online and available for free.
       | 
       | https://mitpress.mit.edu/sites/default/files/sicp/full-text/...
        
       | marginalia_nu wrote:
       | I stumbled on this gem a while back.
       | 
       | https://www.personal.kent.edu/~rmuhamma/Algorithms/algorithm...
        
       | machiaweliczny wrote:
       | Not a book but https://teachyourselfcs.com/ if you want typical
       | curriculum and also not a CS book but good book "Computer Science
       | Fundamentals" (sneaky title, free online).
       | 
       | Although I recommend starting from "Code: The Hidden Language of
       | Computer Hardware and Software". Coolest book ever.
        
       | unmole wrote:
       | Take a look at the suggestions on https://teachyourselfcs.com/
        
       | yakubin wrote:
       | I'm currently going through _TAOCP_ [1]. So far, seems pretty
       | good (although I found one mistake in an exercise).
       | 
       | Also, I can never recommend _Computer Systems: A Programmer 's
       | Perspective_[1] enough. (Also features a rare mistakes in an
       | exercise or two, but that's detail.)
       | 
       | And for network protocols, Comer's _Internetworking with TCP
       | /IP_[3] was just great (you only need volume 1). I've read
       | Stevens' books on socket and IPC programming in Unix, but didn't
       | like them, so I also stayed away from _TCP /IP Illustrated_, but
       | others have different opinions.
       | 
       | [1]: <https://www-cs-faculty.stanford.edu/~knuth/taocp.html>
       | 
       | [2]: <https://www.csapp.cs.cmu.edu/>
       | 
       | [3]: <https://www.pearson.com/us/higher-education/program/Comer-
       | In...>
        
         | srcreigh wrote:
         | God bless you. I tried reading the AOCP books and it's
         | _hard_... and I have a degree in CS
        
           | stan_rogers wrote:
           | I found them _extremely_ accessible, and I was a high-school
           | dropout. (Admittedly a very late dropout, but a dropout
           | nonetheless.) That was back when volume 4 didn 't even exist
           | as listicles yet. And, let's face it, the sheer size (and
           | cost) of the thing, even then, was a bit intimidating, but
           | there's nothing in it that can't be followed with a bit of
           | algebra and the barest hint of what the kids these days call
           | "pre-calculus". While it may be a bit of a slog to _listen_
           | to Knuth, his writing is about as clear as it ever gets,
           | things are laid out in a clear progression, and nothing jumps
           | out at you suddenly without a clear buildup and foundation.
        
             | lanstin wrote:
             | And he is a funny writer. I didnt do the homeworks but
             | found it surprisingly accessible
             | 
             | IronicaLly, I put off reading Seminumerical Algorothms for
             | years because didnt understand it was numerical algorithms
             | for computers without reals. The random number chapter
             | alone is so awesome.
        
             | Jtsummers wrote:
             | _Concrete Mathematics_ , which isn't the easiest but also
             | not the hardest math textbook, developed out of a course
             | teaching the math from Chapter 1 of _TAOCP_. For people who
             | find the first chapter, in particular, intimidating because
             | of the math portions, it may be a good option to study
             | before resuming _TAOCP_ rather than just dropping _TAOCP_.
        
         | amackera wrote:
         | If you mail Don Knuth about the error you found in TAOCP, he'll
         | send you a check for $1 -- he used to do that, anyway. People
         | tend not to cash the cheque, but keep it.
        
           | modulusshift wrote:
           | It's a hexadecimal dollar, actually, $2.56.
        
           | hereforphone wrote:
           | I've read he stopped doing this because scumbags copied his
           | account information from an image of a check.
        
           | pfarrell wrote:
           | I have no idea if this is current info, but Don Knuth's
           | website describes what happened. He now issues checks from
           | the fictional Bank of San Serriffe [0].
           | 
           | This line is classic Knuth:                 only 9 of the
           | first 275 checks that I've sent out since the beginning of
           | 2006 have actually been cashed. The others have apparently
           | been cached.
           | 
           | 0: https://www-cs-faculty.stanford.edu/~knuth/news08.html
        
             | samhw wrote:
             | That's the current info, though it sounds like he didn't
             | _always_ do that:
             | 
             | > Knuth offers monetary awards to people who find and
             | report a bug in TeX. The award per bug started at US$2.56
             | (one "hexadecimal dollar"[41]) and doubled every year until
             | it was frozen at its current value of $327.68. ... Due to
             | scammers finding scanned copies of his checks on the
             | internet and using them to try to drain his bank account,
             | Knuth no longer sends out real checks, but those who submit
             | bug reports can get credit at The Bank of San Serriffe
             | instead.
             | 
             | (https://en.wikipedia.org/wiki/TeX - this is about TeX,
             | though most of it is generic over all his various cheque
             | schemes: https://en.wikipedia.org/wiki/Knuth_reward_check)
        
           | scns wrote:
           | People often frame the cheque to put it on the wall.
        
         | nickt wrote:
         | I'm 27 years out of Uni and it's great to see Comer's book
         | still being used and recommended, and updated of course.
        
         | decebalus1 wrote:
         | > I'm currently going through TAOCP[1].
         | 
         | When someone without a formal CS career is asking for a CS
         | fundamentals book and you're dropping TAOCP I'm not sure if
         | this is a humble brag or an attempt at trolling.
        
           | yakubin wrote:
           | I don't have a formal CS career either. In one of the other
           | comments someone wrote they read it being a high school
           | dropout. Different people like different things. Note also
           | that submission author studied chemistry, so they did get
           | their fair share of training in mathematics.
        
         | globular-toast wrote:
         | > although I found one mistake in an exercise
         | 
         | Check on Knuth's website to see if it's already been corrected.
         | If not, you could get a prestigious Knuth reward cheque for
         | finding an error.
        
         | commandlinefan wrote:
         | Hm - I've read all three books and even tried working the
         | exercises... I can't say I'd recommend TAOCP to somebody who's
         | looking for a book on the fundamentals of CS. The books are
         | fascinating, don't get me wrong, and I recommend every
         | programmer read them, but they go _way_ too deep into minutiae,
         | while simultaneously ignoring other important topics to be
         | useful as an introduction.
        
       | ChrisArchitect wrote:
       | Hope you're searching first, lots of book threads every few
       | months here:
       | 
       |  _a month ago_ Ask HN: What are some of the best well-written
       | books on computer science?
       | https://news.ycombinator.com/item?id=29182386
       | 
       |  _3 months ago_ Ask HN: What are your top 5 favorite computer
       | books? https://news.ycombinator.com/item?id=28308141
       | 
       |  _7 months ago_ Ask HN: Best book for software engineers (besides
       | the well-known ones)?
       | https://news.ycombinator.com/item?id=26833319
        
         | ChrisArchitect wrote:
         | Reminder: you can enjoy and contribute to the thread without
         | upvoting
        
       | Apreche wrote:
       | Maybe try the NAND to Tetris
       | 
       | https://www.nand2tetris.org/
        
       | dayvid wrote:
       | For formal resources:
       | 
       | You might like the Princeton Algorithms Coursera course:
       | https://www.coursera.org/learn/algorithms-part1
       | 
       | SICP is an amazing book, but I HIGHLY recommend you follow along
       | with a lecture video as the textbook was designed to go along
       | with lectures for electrical engineering computer science
       | students. Brian Harvey's lectures are fantastic:
       | https://www.youtube.com/watch?v=4leZ1Ca4f0g&list=PLhMnuBfGeC...
       | 
       | And maybe some math? All of this is kind of abstract to start out
       | with. It might be useful to combine this with youtube videos on
       | your project, because you may be discouraged with doing a lot of
       | abstract work and not concrete work on your project.
       | 
       | Also, freecodecamp and youtube in general is an excellent
       | resource if you're stuck on any particular part of CS.
       | Freecodecamp has compiled a lot of the best videos across the
       | internet on particular concepts and you can get a deep dive into
       | a topic if you're ever stuck. Nowadays, if you're stuck, often
       | viewing someone else's explanation can get you unstuck fairly
       | quick.
        
         | Turing_Machine wrote:
         | Harvey also has his own book, which is sort of an "intro to
         | SICP". Available free online:
         | 
         | https://people.eecs.berkeley.edu/~bh/ss-toc2.html
        
           | activitypea wrote:
           | I've found Harvey's lectures do a little too much, and risk
           | less motivated students missing the forest for the trees. In
           | my experience, SICP really focuses on the core points and
           | belabours them until it's 100% sure you got it.
        
       | kens wrote:
       | Most of the answers are covering data structures and algorithms
       | but I have a different direction. If you're doing VR/rendering,
       | you should also look at linear algebra if you don't know it
       | already. Specifically, make sure you're really comfortable with
       | matrix multiplication, matrix inversion, change of basis vectors,
       | cross products, etc.
        
       | watersb wrote:
       | Older books on computing can really help. When computers were
       | unfamiliar to almost everyone, the author took care to walk
       | through the fundamentals of computer science.
       | 
       | Jon Bentley. "Programming Pearls"
       | https://www.google.com/books/edition/Programming_Pearls/kse_...
       | 
       | -
       | 
       | (not about Perl the computer language, but rather pearls or
       | unexpected jewels of wisdom)
       | 
       | An accessible style, a collection from the Communications of the
       | Association for Computing Machinery (CACM). Also used in a first-
       | year course of computer science at US Naval Academy.
       | 
       | Simple problems are discussed in detail, often leading to subtle
       | insight that yields better performance.
        
       | tomxor wrote:
       | Interested in what gets suggested here...
       | 
       | There are a lot of "CS Course Online" type suggestions posted on
       | HN, which are great - but for those of us with full time jobs and
       | lives it's just a non-starter to approach that quantity of
       | material.
       | 
       | I'm also more of a hands on learner which is how I got to where I
       | am - but at the same time I can appreciate and happily absorb a
       | well written, thoughtful book... In other words, I only have time
       | for high quality, and high information density.
       | 
       | My meta suggestion in answer to the author: Not to downplay the
       | utility in general CS knowledge and fundamentals, but you already
       | sound like you are driven and have a direction - I recommend you
       | ride that wave and buy books or seek out material that's more
       | specific and relevant to what you are doing right now. You will
       | soak it up so easily when you have something right in front of
       | you to apply it to or think about - it's an opportunity, you will
       | work on different things throughout your working life and this
       | opportunity may pass. Personally, I have found CS fundamentals
       | work their way to the surface through research into these more
       | domain specific things - although I still recognise I could have
       | much better awareness if I tackled it head on as you are
       | suggesting.
        
         | omarhaneef wrote:
         | I want to underscore this suggestion for another reason:
         | computer science isn't one thing, but a whole host of related
         | disciplines. I think of medicine as an analogy. Even if someone
         | wanted "the basics", and you ask 10 computer scientists, you
         | might get different answers. Turing machines? Automata?
         | Compilers? Algorithms? Solve time?
         | 
         | What we tend to think of as "basics" happen to be what the
         | problems were 50 years ago in computer science. If you don't
         | have machines, you study the theory. If you have a very simple
         | machine, you study the solve time (big O notation type stuff,
         | although with exponential growth that is becoming more, not
         | less, important).
         | 
         | All this is to say if you want to study VR/AR, perhaps the most
         | important aspect is the relationship between the view angle,
         | and the object. You would need to know linear algebra,
         | transforms, the effect on the viewpoint and so forth. Linear
         | algebra is one version of "the basics".
        
         | Karsteski wrote:
         | Thank you for the great comment. I see what you're saying with
         | regards to focusing on domain specific material instead. I'm
         | leaning towards one of the CS algorithms books suggested here +
         | perhaps the 3D Math Primer book: https://gamemath.com/
        
         | throwawaygh wrote:
         | I'll second this -- just hack on things that motivate you and
         | you'll learn along the way. But working through at least the
         | first third of an algorithms course will pay dividends if
         | you're doing stuff with VR. Fortunately you can do these in
         | parallel -- work through one lecture or a half lecture of
         | "broccoli" and then go back to the meat and dessert of domain-
         | specific hacking/reading until you're ready for more veggies.
        
       | throwawaygh wrote:
       | Based on the description you give, you probably want a Data
       | Structures/Algorithms intro.
       | 
       | The canonical Algorithms textbook is _Introduction to Algorithms_
       | by Cormen et al. The MIT OpenCourseware course on Algorithms --
       | which includes videos and assignments -- follows along with that
       | book: https://ocw.mit.edu/courses/electrical-engineering-and-
       | compu...
       | 
       | Note: In your case, I'll recommend _against_ SICP as a first
       | resource, which is mentioned in some other comments. It 's more
       | of an introduction to functional programming. From your
       | description, I'm not sure you need an intro to programming. And
       | functional programming in particular is not really on the
       | critical path of knowledge you'll need to muck about in VR land.
       | It's not irrelevant, but it's not the critical path. An
       | algorithms course probably is indispensable for that endeavor,
       | though.
       | 
       | By all means, read SICP if you'd like. It's a great resource. But
       | if you're trying to get from "I can program" to "hardcore hacking
       | on VR stuff", step 1 is probably a decent algorithms course
       | taught in the imperative style.
        
         | nostrebored wrote:
         | CLRS truly is the canonical way to learn algorithms at most top
         | CS institutions. I can't upvote this enough.
        
         | Turing_Machine wrote:
         | CLRS is great, no doubt about it, but I think Sedgewick is
         | probably friendlier to someone studying on his or her own. Note
         | that there are several versions of Sedgewick, which use
         | different languages (I think there are at least C, C++, and
         | Java versions).
         | 
         | I'd go with Sedgewick, then get CLRS and Knuth for use as
         | reference material.
        
           | throwawaygh wrote:
           | Agreed. Are you aware of any recorded lectures / assignment
           | sets for a course based on Sedgewick? I tend to suggest CLRS
           | because the OCW lectures are so high-quality and most
           | learners want at least the option of watching lectures.
        
             | Turing_Machine wrote:
             | Well, there's apparently one by Sedgewick himself. :-)
             | 
             | https://www.youtube.com/watch?v=1QZDe28peZk&list=PLwwk4BHih
             | 4...
             | 
             | I can't vouch for it, as I haven't watched them.
        
               | throwawaygh wrote:
               | Nice! Those video titles are a hot mess :( I'll have to
               | go through them at some point over the break and figure
               | out if they're high enough quality to recommend over the
               | OCW videos.
        
               | tchalla wrote:
               | They are also available on Coursera.
        
           | warner25 wrote:
           | Yes, I'm not sure that CLRS "Introduction to Algorithms" is
           | approachable for everyone without prior exposure to formal CS
           | concepts, notation, etc. My undergrad CS curriculum used
           | "Algorithms in Java" by Sedgewick during our freshman year
           | while we learned to write our first programs. We didn't use
           | CLRS until a more in-depth algorithms class during our junior
           | year. I read much more of CLRS in a graduate-level algorithms
           | class.
        
         | commandlinefan wrote:
         | So my problem with CLRS is that a lot of the content is _in_
         | the exercises. There are places in the text where it says,
         | "refer back to solution to problem 34", etc. The problem is,
         | there are no answers to exercises to be found - and the
         | exercises are so open-ended there's no way to check to see if
         | you actually got the right answer or not. IMHO, CLRS (or any
         | educational text that doesn't make exercise answers available)
         | is one of the worst options for _self-study_.
        
           | 2c2c2c wrote:
           | i recall finding some published solutions manual to the book
           | 7-8 years ago when in college
        
         | kyleblarson wrote:
         | I was lucky enough to have Cormen teach my algorithms class in
         | school as well as a few other courses. He is a phenomenal
         | teacher.
        
         | jhanschoo wrote:
         | Note that a 4th edition of this book (frequently referred to as
         | CLRS) is coming out sometime early next year.
        
           | Tempest1981 wrote:
           | So this one? By Cormen, Leiserson, Rivest, and Stein (CLRS)
           | 
           | https://mitpress.mit.edu/contributors/charles-e-leiserson
        
           | dS0rrow wrote:
           | slightly unrelated : the javascript edition of SICP is also
           | coming in April 2022.
           | https://mitpress.mit.edu/books/structure-and-
           | interpretation-...
        
         | molsongolden wrote:
         | Grokking Algorithms is also a good quick read in this space.
         | It's a high level "here are some things you should know about
         | and how they might be used" which exposes the reader to
         | important algorithms and patterns without going too deep.
        
       | lcuff wrote:
       | I highly recommend "An Introduction to General Systems Thinking,
       | by Gerald Weinberg. An orthogonal piece of advice that I got from
       | a different book of Gerald Weinbergs' is to learn 3 or 4 Very
       | Different languages simultaneously, to grasp the enormous
       | difference between them all. In 2021 I'd recommend C (lowest
       | level other than assembler: 1st caveat, I haven't looked at Rust)
       | and then at least one Lisp-family language that has Lots of
       | Insane Silly Parentheses, which Paul Graham argues is the most
       | powerful language (by far). I'd also choose Smalltalk and Python.
       | Caveat 2: Every programmer will have an opinion on this list, but
       | the main point is to get exposed to the diversity of languages.
       | Also, I'd recommend listening to a lot of talks by Alan Kay.
       | There is lots of fun and interesting stuff to learn from lots of
       | different people, but Alan Kay has focussed on how do we develop
       | stuff that is radically simple, radically powerful, and
       | completely accessible to children as a tool for learning and
       | exploration. His notion of 'object-oriented' (a term he invented)
       | is completely different from how the term is used today.
        
         | pjmorris wrote:
         | First, I want to support any mention of any Gerald Weinberg
         | book. Every one is gold. IMO, Intro to GST is great for
         | developing a scientific mindset, something broader than
         | computer science itself.
         | 
         | I would suggest a grain of salt to go with the three-four
         | languages at a time recommendation. I'd have to dig up a stored
         | book to find the reference, but Weinberg typically suggests
         | learning two different languages, at least at the beginning. He
         | advocates for the benefits of recognizing it's possible to say
         | the same thing in different ways. My knee-jerk reaction,
         | knowing him, is that he picked two rather than three or four to
         | make things manageable for people getting started. If
         | programming becomes a hobby, vocation, and/or avocation you'll
         | likely wind up learning most of those languages eventually.
        
         | bmitc wrote:
         | I would personally de-recommend Python. It essentially has no
         | unique paradigm or even one that it does really well. I'd
         | replace the Python suggestion with an ML-dialect such as F# or
         | Ocaml. I agree with you though. I think everyone needs a bit of
         | experience with a Lisp/Scheme, an ML dialect, a Smalltalk,
         | Elixir/Erlang, Prolog, and Forth.
         | 
         | And I think it's better to think in paradigms rather than
         | languages in that you choose a new language to learn a new
         | paradigm.
        
           | kazinator wrote:
           | Python contains CS clusterfumbles like calling evaluated
           | expressions "literals", failing to distinguish between
           | variable initialization and assignment, and evaluating the
           | default expressions of optional arguments at function
           | definition time, rather than call time.
           | 
           | Someone learning CS who already knows Python has to unlearn
           | and relearn material in the area of programming language
           | semantics.
           | 
           | Python is fine for introducing complete beginners to
           | algorithmic thinking. Almost anything is.
        
       | Hayabusaa wrote:
       | Computer Science Distilled: Learn the Art of Solving
       | Computational Problems
       | 
       | Highly recommended for freshers, especially who had no academic
       | background on computer science and willing to start their career
       | as dev.
        
       | nayuki wrote:
       | "Introduction to Algorithms" by Thomas H. Cormen, Charles E.
       | Leiserson, Ronald L. Rivest, Clifford Stein.
       | 
       | "Algorithm Design" by Jon Kleinberg, Eva Tardos.
       | 
       | "Introduction to the Theory of Computation" by Michael Sipser.
       | 
       | "Course notes for CSC B36/236/240: Introduction to the Theory of
       | Computation" by Vassos Hadzilacos.
       | http://www.cs.toronto.edu/~vassos/b36-notes/notes.pdf
        
       | dmillar wrote:
       | K&R. It's short, quick to get through, and the exercises are
       | great for beginner CS. At the end you'll have a good working
       | knowledge of C, which will act as an excellent base to move into
       | other languages/disciplines.
        
       | 0x7E3 wrote:
       | Structure and Interpretation of Computer Programs, by Abelson,
       | Sussman, and Sussman.
       | 
       | Also known as "The Wizard Book" or "SICP".
       | 
       | The full text is legally available online[1], but I found it
       | worthwhile to buy a copy.
       | 
       | There are at least two really good sets of video lectures to go
       | with it if you are so inclined. Personally I enjoyed the ones
       | from Berkeley.
       | 
       | [1]: https://mitpress.mit.edu/sites/default/files/sicp/index.html
        
       | srcreigh wrote:
       | For my CS degree, the two classes that were most useful
       | foundations-wise were:
       | 
       | 1. Learning how to prove things with math
       | 
       | 2. "Baby compilers" machine code, building an assembler, building
       | a simple MIPS compiler, regular expressions, parsing, etc
       | 
       | There's a lot of other topics but those two really set the
       | foundation. All algorithms class and data structures are best
       | understood with a mathematical intuition. Not to mention you want
       | to go into VR, lin alg might help you.
       | 
       | YMMV. Lots of great programmers don't have a math background, but
       | for me that helped.
       | 
       | The CLRS book is pretty standard (but mathy).
       | 
       | You'll learn things as you work too so don't discount patience.
        
         | Mezzie wrote:
         | Also maybe formal and symbolic logic. I don't have a CS degree,
         | but I had a class where we, as a class, created an entire
         | analogue symbolic logic language from scratch and it's by far
         | one of the classes that's had the most value for me when doing
         | any kind of tech/dev work. No idea how/if that's approached in
         | CS programs, though...
        
         | srcreigh wrote:
         | As far as math proof books go.. I'd just check the library for
         | something which covers stuff like truth tables in the 1st
         | chapter and then lots of proof strategies (induction, breaking
         | down by cases, contrapositive, proof by contradiction) with
         | exercises. And find somebody to correct your mistakes which you
         | will make XD
        
           | srcreigh wrote:
           | I found one! OP, please check out this Mathematics for
           | Computer Science book from MIT. [1]
           | 
           | That book can be found on the Teach Yourself Computer Science
           | page. [2]
           | 
           | The TYCS page says this book is advanced... but they teach
           | this content to 1st years at University of Waterloo.. so
           | really it's just difficult beginner material.
           | 
           | [1]: https://courses.csail.mit.edu/6.042/spring17/mcs.pdf
           | 
           | [2]: https://teachyourselfcs.com/#math
        
         | jmkr wrote:
         | > All algorithms class and data structures are best understood
         | with a mathematical intuition.
         | 
         | It's funny, I like to say I program by intuition. Trying to go
         | through algorithms now, many years after college, makes me
         | realize some math shortcuts really help, and I no longer have
         | an intuition for that.
        
           | srcreigh wrote:
           | Would love to hear an example if you can share more!
        
       | mindcrime wrote:
       | Lots of good stuff in this thread already, so I'll just add a
       | thought or two. A lot of commentators here have picked up that
       | what you need is roughly the equivalent of a "Data Structures &
       | Algorithms" course. I agree with that sentiment. Whether you
       | actually take a course, or work through some books, or whatever,
       | so long as you acquire that knowledge you'll have a great
       | foundation.
       | 
       | The question then is "what next?" To which I would say that you
       | want roughly the equivalent of a course titled something like
       | "Introduction to Computation" or "Automata Theory & Computation"
       | or whatever. That is, you'll want to understand things like
       | Universal Turing Machines, Finite-State Automata, Formal
       | Grammars, and some basics of Computational Complexity Theory (the
       | same "Big O" stuff you'll hear mentioned in the Data Structures &
       | Algorithms class, but going a little bit deeper). This stuff
       | isn't necessarily _required_ to do a lot of  "grunt work"
       | programming, but it starts coming into play if you want to do
       | some more advanced stuff.
       | 
       | One of the classic texts in this area is by Hopcroft & Ullman.
       | 
       | https://www.amazon.com/Introduction-Automata-Theory-Language...
       | 
       | And on a semi-related note, there's a really good course on
       | Youtube: MIT 6.042J Mathematics for Computer Science, taught by
       | Tom Leighton[1], that you might find useful as well. A version of
       | the book[2] used in that course is freely available online as
       | well
       | 
       | https://www.youtube.com/playlist?list=PLB7540DEDD482705B
       | 
       | [1]: https://en.wikipedia.org/wiki/F._Thomson_Leighton
       | 
       | [2]: https://people.csail.mit.edu/meyer/mcs.pdf
        
       | tarkin2 wrote:
       | * The elements of computer systems
       | 
       | * The little schemer
       | 
       | * The c programming language (k&r)
        
       | kindalost wrote:
       | Concrete Mathematics: A Foundation for Computer Science, by
       | Ronald Graham, Donald Knuth, and Oren Patashnik.
        
         | Karsteski wrote:
         | Oh I know Donald Knuth from the Lex Fridman podcast. I am
         | noting that it was written in 1994. Would any problems result
         | from this?
        
           | pvg wrote:
           | No but it's a maths textbook more than anything else. Not
           | really a starting point for the sort of thing you're
           | describing.
        
           | ogsalmanxx wrote:
           | It's a fundamentals thing, you will have to practice it a lot
           | before it clicks and becomes practical for you to use on a
           | daily basis.
           | 
           | But it won't help you land a job at a startup, for that you
           | need to learn JavaScript or C++
        
           | [deleted]
        
       | isabellat wrote:
       | Bottom up cs is a great resource. https://www.bottomupcs.com/ It
       | might feel very low level at first but once you understand these
       | fundamental building blocks of computers you will be really well
       | equipped to build upon this knowledge and learn higher level
       | concepts. I also think the Rust Programming book
       | (https://doc.rust-lang.org/book/) is a great resource for general
       | programming knowledge. Some sections e.g. on the borrow checker
       | and lifetimes aren't 100% applicable to general programming
       | knowledge but I still recommend it. It is more of a 201 level
       | book instead of 101 though.
        
         | vecter wrote:
         | That website is poorly named. It's not about computer science
         | any more than a resource on anatomy is about medicine.
        
       | atsheehan wrote:
       | I liked "Algorithms Unlocked" by Cormen
       | (https://mitpress.mit.edu/books/algorithms-unlocked). It's the
       | same author that co-wrote "Introduction to Algorithms" (or CLRS)
       | that's referenced in a few other comments, but this one focuses
       | on the what and why of algorithms and pulls samples from a few
       | areas of interest.
       | 
       | It's not too long (~200 pages), so might be worth checking out
       | before diving into one of the more comprehensive textbooks.
       | 
       | If you're interested in 3D programming, I found "3D Math Primer
       | for Graphics and Game Development" to be the most accessible for
       | the math fundamentals. I just discovered it's now available
       | freely online as well: https://gamemath.com/.
        
       | projectileboy wrote:
       | SICP
        
       ___________________________________________________________________
       (page generated 2021-12-09 23:01 UTC)