Live data from Hacker News

Ask HN: How do I choose the right resource to learn CS fundamentals?

news.ycombinator.com

81–90 of 93 posts

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#81
I don't usually comment on HN, but I have to mention how amazing I found Tim Roughgarden's courses (Coursera's Algorithm specialization). The first course took me 1 month to complete, but that's because I wanted to make sure I truly understand the running time. Roughgarden does an amazing job of teaching you just enough math to ensure that you understand the entire conceptual picture.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#82
post #55

Earlier quoted context omitted.

Unpopular opinion: I have _never_ had any real use of TAoCP. I own all volumes and have really tried to make use of them but they feel more like a trivia book than something you can actually use in your work. Sure, it's cool to own and recommend it but have people actually used it? To end on a more positive note: I highly recommend "Introduction to Algorithms" by Cormen et al. Not as cool but very useful.

> Sure, it's cool to own and recommend it That's what it exists for. To build the street cred of people who own it and have read it. Notice how no one who has read it comes back with a comparison of TAOCP and CLRS. For example "learning bogosort from Knuth instead of Cormen is better because Knuth gives you xyz insight into it". No, they simply think it's better because it's harder. A rough comparison is On the Origi…

> a comparison of TAOCP and CLRS

The two are hard to compare, IMO, because their approaches and intended audience are different. CLRS is an undergraduate/graduate textbook on algorithms, where the authors have selected a broad range of topics based on things like their suitability for teaching or coursework. TAOCP on the other hand treats a narrower (and rather different) set of topics in greater depth, each section being essentially one person's excellent distillation of all published literature on the topic, passed through a tasteful interestingness+usefulness filter, and presented in expository style. To expand on that:

* CLRS treats algorithms as an academic subject in its own right, while Knuth is more concerned about what is actually useful to a programmer who is interested in writing efficient programs. For example, CLRS has an entire chapter on Fibonacci heaps (and the 2nd edition also had one on binomial heaps), which are great theoretically (amortized constant time for some operations), but impractical to implement and (because of the constant factors) hardly worth using in practice. In TAOCP you'll not find them mentioned. (Though there are Fibonacci trees, the search trees that arise as a result of a simple and easy-to-implement algorithm called Fibonaccian search.)

* Compare the table of contents: https://en.wikipedia.org/w/index.php?title=Introduction_to_A... versus https://en.wikipedia.org/w/index.php?title=The_Art_of_Comput... (Knuth wrote down the table of contents in 1962 and has been writing to it ever since; the ToC of CLRS is of course a function of present-day fashions among algorithms researchers.)

* Roughly, CLRS, like algorithms researchers, treat algorithms as a branch of mathematics, following the idea-theorem-proof structure (and sometimes overdoing it: https://www.goodreads.com/review/show/155959101), writing only pseudocode, etc. It is possible to go through the entire book without ever writing a program or even feeling the urge to write one. (Not saying that's wrong.) Your thinking stays at a uniform level, roughly the "idea" level of thinking about the algorithm and what it does, proving things about it, etc. In TAOCP it's common to find an idea/algorithm described on one page informally, then a page later (rarely, when warranted: https://news.ycombinator.com/item?id=14520230) have an implementation in assembly language (MIX/MMIX), with a pointer to an exercise that asks you to analyze how many times a certain register is modified or whatever. In TAOCP, we always have mathematics in the service of algorithms -- the idea is to take an actual algorithm/program that can be implemented, then analyze it using whatever mathematical tools it takes (many of which were invented by Knuth... in fact at one point he wanted to name the books "Analysis of Algorithms", but the publishers didn't think the title would sell).

* For a concrete example: just last week I read TAOCP's section on tries (Chapter 6 Searching (Vol 3), part 6.3 "Digital Searching"). In CLRS there's a passing mention of tries (radix trees) only in one paragraph (Problem 12-2 in Chapter 12 Binary Search Trees), which asks to prove that using this data structure a bunch of binary strings of total length n can be sorted in O(n) time. This makes sense I guess because mathematically/asymptotically there may not be much more to say about them. But they are an eminently useful data structure that are practical to implement, and can make programs fast (only by a "constant factor" but that's what a real programmer cares about). So TAOCP spends about two pages explaining tries (with a useful diagram) and in fact their implementation as a bunch of arrays (not as a tree), then gives a MIX program to make it even more concrete, then some concrete numbers and words about when they're appropriate, and some history, goes into more depth on the specialization to the binary case, proceeds to explain PATRICIA tries (another practical data structure). All this takes 9 pages. Then there are 7 pages of mathematical analysis (leading to conclusions like, for example, a trie search inspects an average of lg N + 1.33 bits for a successful search and lg N − 0.11 for an unsuccessful one). Then there are 6 pages of exercises giving further ideas, all of which have at least brief solutions at the back of the book (~8 pages). Any of these (the assembly program, the mathematical analysis) you can easily skip if you're not interested, and still get something something of value as a working programmer. (If you want to implement your own searches that is... if all you do is use libraries written by others for writing CRUD applications none of this may be relevant much but that's the same for CLRS too.)

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#83
post #56
post #3

Check out https://www.teachyourselfcs.com

How important is the programming section for a professional developer?

The website actually recommends using SICP accompanied by Brian Harvey's CS61A lectures. Highly recommended and then read The Little Schemer to get a strong grasp on recursion.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#84

For Algorithms, I know the amount of materials available online can be overwhelming, so here's an alternative: get a copy of "Algorithms, 4th Edition" [1] from Sedgewick and Wayne, and work through it cover to cover, ignoring any other resources. This book has very little in the way of prerequisites, and it covers a lot of fundamental algorithms and a little bit of Math, but it is a lot more accessible and didactic t…

I think I might go with this recommendation, maybe watch the CS61B videos as and when necessary. I did the intro course from the sedgewick and wayne from coursera along with their book and loved it. Would recommend it to anyone who likes a decent challenge while learning. The book is pretty dense.

I would second the Coursera course(s), which is one of the best MOOCs I've ever taken (Algorithms 1 & 2 from Princeton).

Watch the videos, then read the relevant section of the text book, and don't miss the assignments which were fantastic ways to learn about the nuances of writing efficient algorithms and data structures.

If only every programming MOOC put that much effort into their autograders...

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#86
post #66

You might want to look at Scott Young's MIT Challenge page. He set himself the task of working through "the entire 4-year MIT curriculum for computer science" in 12 months using only online resources. He completed the challenge in 2012 and then wrote a book titled "Ultralearning", which describes methods of learning valuable skills without spending a fortune at an expensive University. His MIT Challenge page: https:/…

If you want to learn the material of MIT courses, I would recommend working through the problem sets, not just the exams.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#87
post #57

Earlier quoted context omitted.

How would you compare Database Internals to Designing Data Intensive Applications? [1] https://www.amazon.com/Designing-Data-Intensive-Applications...

The book you refer to is really kind of system design for applications which handle large data volumes. OTOH, the book I refer to talks about how database software can be developed from ground up thus helping you understand the internals.

That book does cover many implemention details of a database. However, sometimes at a high level, and as you mention, specifically in the context of distributed systems.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#88
post #3

Check out https://www.teachyourselfcs.com

+10 for this. I will elaborate further, hoping this gives you a good starting template. - Programming: Learn two languages: Python and C - Algorithms and Data Structures: Implement each data structure in the two languages above and implement a few algorithms of each type. - Computer Architecture: For the referred excellent book, implement all assignments in any one language. Go head and burn the design on an FPGA, ge…

Thank you for your reply. It was very helpful. I will include your suggestions into my learning path.

I had difficulty implementing data structures in C, not in python. Python I was able to think in terms of classes and attributes. But I was finding it difficult to do the same in C since there is no concept of classes. I am still trying to learn pointers properly to have an understanding how to implement data structures and algorithms effectively.

I came across the book you have recommended and it is a very nice book. I would recommend that along with Designing Data Intensive Applications.

Thank you.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#89

For a stupid man like me, I think the "head first" series from Oreilly is the ultimate answer, you will be just able to understand all the things in the books, even stupid like me.

I like and recommend the head first java and design patterns books. They are wonderful for a beginner.

Re: Ask HN: How do I choose the right resource to learn CS fundamentals?

#90
None of these are bad choices.

I’d suggest checking out 5-10 min worth of material from each one and choosing whichever you find most accessible.

If after completing one course you don’t feel confident you’ve absorbed the concepts, try another. Otherwise move on to the next set of concepts.

Post reply on HN