Hacker News new | past | comments | ask | show | jobs | submit login
Ask HN: How do I choose the right resource to learn CS fundamentals?
328 points by 8589934591 21 days ago | hide | past | web | favorite | 89 comments
I am trying to learn CS on my own. But there are so many resources available online for every course from many of the top universities.

For example:

For intro courses:

* Computer science an interdisciplinary approach (princeton)

* CS61A - UCB

* Introduction to CS and programming (MIT)

* Stanford

* CMU

Data Structures and Algorithms:

* Princeton Algorithms

* CS61B - UCB

* Stanford Algorithms course

* MIT Algorithms

* CMU

Apart from this you have multiple books on each topic - Data Structures/Algorithms, Discrete Mathematics, Theory of Computation, Operating systems, Networks, and so on.

Apart from these you also have resources like teachyourselfcs, ossu, functionalcs.github.io/curriculum/.

I am attracted by the resources/online/books posted by courses in UCB/Princeton/MIT/Stanford/CMU. At the same time I get boggled down and overwhelmed that I have soooooooooo many materials to cover. Intro courses aren't that big of a deal since I am able to recognize/solve most questions fairly easily in multiple resources. But my next step of Data structures and algorithms is overwhelming that I am unable to start somewhere.

How do you recommend to choose the right resource (online/book) for each topic/course? Is it worth going through multiple university courses/books for the same topic?




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 than, say, the Cormen book. I don't think you need any other resource for studying the book (videos, forums, etc.) other than maybe the website for convenient access to the source code (and maybe some other Java reference, although you don't need deep Java knowledge to understand the code).

Note: I'm plenty biased for this resource... I don't know why, but I find the implementations so elegant an easy to follow, even though the source code is Java, a language I admit sometimes can look anything but elegant (in its production form with all those imports and redundant type signatures :-). Many algorithms are implemented using data structures introduced in previous chapters, so it makes sense to read it cover to cover.

For Computer Architecture, Nand2Tetris [2] is another resource that comes up often and for good reason. I only worked through half of this book but I really like it too and have it on my back burner to complete the second half of it: first part is about implementing a computer from the ground up (nand gates being the "atoms"); second part is about implementing a parser/compiler for a higher level language targeting the same computer.

1: https://algs4.cs.princeton.edu/

2: https://www.nand2tetris.org/


I did a similar thing with "The Algorithm Design Manual" by Skiena.

I really do not recommend videos/online classes for algorithms. The primary reason is that if you are learning them for the first time, there is a lot of information to get through and using the book format will force you to slow down and ensure you are learning things at your own pace.

I also highly recommend "Grokking Algorithms" as a easy primer. It seems a little "basic", but it really is a great way to quickly pick up the basics of algorithms, an a great refresher. I used it in parallel to TADM and helped me get unstuck a quite a few times.

http://www.algorist.com/

https://www.manning.com/books/grokking-algorithms


Second the recommendation to read Algorithms over CLRS; it’s significantly nicer in part because it uses actual code with good variable names instead of its own strange psuedocode dialect.


I didn't find the pseudocode to be a hurdle in CLRS. In fact, it was pretty useful to see some pseudocode shown in practice. What stung me in the book was how abstract it could get. It was clear that some of the authors wrote in a more approachable way than others when explaining the material.

Its also focused on how to solve problems than Sedgwick. Algorithms explains some elementary algorithms that noone is ever going to code themselves. CLRS teaches you what to look for in algorithms for solving particular problems.


I actually liked their psuedocode. It was always easy to translate to whatever language I was working with (the opposite can be said about TAoCP assembler).

Hence while it may be nice to see the Java code, I personally prefer pseudocode.


udi-manber’s “introduction to algorithms: a creative approach ” is one of my favorites (fwiw)


"Algorithms, 4th Edition" is demonstrated using Java. They make use of a graphical library that helps show different runtimes visually. I ported that library from Java Swing/AWT to Ruby (TK) if you'd like to go through the book using ruby instead of Java. Looking at the TK code you could probably also port it to Python pretty easily.

https://github.com/gregors/standard_draw_tk


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...


Just got my Raspberry Pi in the mail and I’ve been looking for a project-oriented way to learn computer architecture... looks like Nand2Tetris is going to be what I do on the pi.

Thank you!!!


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://www.scotthyoung.com/blog/myprojects/mit-challenge-2/

His Ultralearning page: https://www.scotthyoung.com/blog/ultralearning/


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


> I am attracted by the resources/online/books posted by courses in UCB/Princeton/MIT/Stanford/CMU. At the same time I get boggled down and overwhelmed that I have soooooooooo many materials to cover.

I think you'd be better served by doing a lot of courses from the same institution. If you choose courses that were designed to fit together, you'll have a lot less wasted time from overlapping material or holes from missing material.

> Is it worth going through multiple university courses/books for the same topic?

What is your goal exactly? Is it to evaluate and compare everyone's materials?

If your goal is your own learning, then why wouldn't you take a more advanced course from the same institution instead of repeating a slightly different version of what you've already learned?


> I think you'd be better served by doing a lot of courses from the same institution. If you choose courses that were designed to fit together, you'll have a lot less wasted time from overlapping material or holes from missing material.

I agree regarding choosing materials from a singular institution. Thing is, not all the institutions have all the courses and materials online. This in turn results in choosing specific courses from specific institutions which are available online. But the caveat here is that when I intermix the courses from different institutions, I find the prerequisites to be different since different institutions cover same/similar courses in different depths/breadths. For example, Databases in CMU are at a much higher standard than that of Stanford's.

> What is your goal exactly?

Goal is to learn since my undergrad is not in CS. I would not be able to afford a masters for the next 2-3 years so I am trying to use the intermediate time to get myself the undergrad curriculum knowledge I never had. I hope this would help me with enhancing my day to day job and also help me prepare when I apply for my masters/PhD.


>instead of repeating a slightly different version of what you've already learned

while I generally agree with your idea, a little counterpoint: it depends on a way you consume those materials. If you do that thoroughly, actually read and analyze source codes or examples, try things on your own as instructed, complete excercises and so on there is absolutely no point in doing multiple thins on the same topic. But if your preferred method is fast skimming, skipping some excercises and so on then skimming two or three books/videos/whatever on the same subject could make some sense. The latter method is very chaotic and is probably not the best idea to apply it for learning the fundamentals, but I just wanted to point out that such a learning technique does exist and sometimes makes sense, especially if just the general understanding is your goal.



+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, get the computer running on real hardware.

- OS: Having done ECS above, you should be in good shape to write your own OS: there is xv6, Xinu, Minix and many to choose from. Again have your OS running at least in a VM.

- Computer Networking: Write your own HTTP server in C.

- Math for CS: I would say focus on learning math essential for games, some linear algebra and leave it there. When you encounter a relevant field; AI or games, you should be in a position to pick up more math if required.

- Databases: Recently a book has been published on database internals, which is strongly recommended. Work through this book.

- Languages and Compilers: Learn a lisp, write a lisp interpreter (should introduce you to some FP concepts) and then working through Concepts, Techniques and Models of Computer Programming should be a good foundation.

Whether you are a student or working full time, these above are time consuming but well worth the ROI if you put in the effort. Be creative and ensure that you publish all your work as part of your portfolio. Good luck!!!

[1] https://www.amazon.com/Database-Internals-Deep-Distributed-S...


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.


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.


Seconding this - I've used it to teach myself a few subjects so far (a couple of subsections of Operating Systems and I've started on Computer Architecture) and their suggested materials have been good.


How important is the programming section for a professional developer?


The most important to simply get started, the others make you a better 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.


The more you engage with the content the more benefits you will get, the knowledge will stay longer.

By engaging I mean doing exercises, implementing algorithms in code, writing pet projects.

This will ensure you understand a topic, not have an impression that you understand. In past, I made a mistake to rush read textbooks till the point I feel I understood the content and ignoring most of the exercises - the exam showed me that I was wrong :)

At the same time, I would not suggest to apply engage mode for every book and chapter - your progress will be slow, and you may lose motivation deep in the middle of some thick textbook, as you may not be able to relate very detailed information there to your current expertise.

Personally, I apply the combination of skimming and engagement.


This advice is so much more important than which course or book you choose.

Don't sweat the choice too much, choose one of the canonical books, and commit to mastering the material by doing, not by (solely) reading.


When you study on your own, keep track of what your are learning.

What I do is to create spreadsheet with 4 columns:

- "Topic": the topic name, e.g.: "self balancing trees".

- "Material": did I read/watch the material for this topic.

- "Notes": do I have my own takeaways or notes about this material.

- "Code": do I have code for this? like a Jupyter notebook or source code, etc.

This approach worked for me, and helped me get better at online tests and interviews.

If you think you already understand a concept, you can just move on to another topic.


If you want to go it alone, I think you're going to have to give up on the idea that there is a "right" set of resources or an optimal path through the curriculum.

I would spend a bounded bit of time (maybe just 10 minutes) every day focusing on the meta question of "how can I make progress given the absolutely massive set of choices I have to make?" and relatedly "am I actually making progress?"

Then I'd just make an arbitrary choice. E.g. pick a topic that interests you, find the top two or three textbooks on the topic, choose one at random and start reading it.

Then keep going back to the meta question. Are you making progress? If not, try another path. If yes, keep going, but remember to ask yourself the meta question tomorrow.

If you do this, you'll get better over time at carving out your own way.

re: going through multiple university books on the same topic. I find it is useful to skim several university books on the same topic. They often have different perspectives, and this is useful for developing intuition. But after doing this I'd just do the exercises from the one I liked the best.


+ The foundation of computer science is Knuth's The Art of Computer Programming. Everything else is footnotes. Knuth is hard. And easy. And everything in between. You won't understand all of it. But you'll have to be ok with not understanding all of CS anyway. Nobody does. You can spend your time searching for a silver bullet. Or you can just read the manual. Knuth is the manual.

+ Bach's The Design of the Unix Operating System describes how operating systems and file systems work. Even Windows describes it's similarities and differences using the same terminology.

+ Hellerstien's Berkeley CS 186 Intro to Databases lectures. Databases get more love at Berkeley than elsewhere. https://archive.org/details/UCBerkeley_Course_Computer_Scien...


This is a poor suggestion, IMO.

OP is trying to get into CS, so they need something that's clear and approachable. By your own admission, it's possible even for experienced people to be stumped by TAOCP. It's simply too vast and too difficult for a beginner to finish. This fetishizing of difficult things doesn't help anyone, least of all people trying to get into the field.

The failure mode to watch out for here is not OP getting developing a small misconception about something, but that he finds the field too intimidating to continue.

It's far more likely that a beginner has success with the other suggestions from this thread - like Nand2Tetris, which is clear, explains the fundamentals, is accurate and most importantly, fun.


Knuth is clear and approachable. It's just not dumbed down. The theory that a beginner should 'finish' requires dumbing down. And then they haven't really finished anything. At it's core, your position infantalizes the OP instead of treating them as a full fledged intellect simply lacking knowledge.

Nand2Tetris is a great resource. There are lots of great resources: Let's build a compiler, SICP, Paradigms of Artificial Intelligence: Case Studies in Common Lisp, Code Complete, Code, etc. and on and on. What to choose is the OP's problem.

Nothing is as robust as Knuth. It's stood up longer than most Hacker News readers have been alive. And is still keeping up...or rather still at the sharp edge. The first edition of Volume I is more than fifty years old and still entirely relevant. Binary trees, queues, and stacks haven't changed. Neither has the math.

What has changed is that teaching computer science has become an industry. It perpetuates itself via gatekeeping. By withholding knowledge. An industry that parcels out knowledge in semesters. But CS is a lifetime field...Knuth started in 1962.


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 Origin of Species, which is a solid foundational text without being too arcane while Philosophiæ Naturalis Principia Mathematica is not. No sane person suggests that to learn the Newton's laws of motion you need to learn Latin and then read Principia (except the people who fetishize difficulty). Just read Resnick and Halliday instead.

By no means am I downplaying Knuth's genius. He is a stalwart without whom our industry would be worse. But TAOCP is not a good foundational text because it's not approachable.


> 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.)


I wouldn't argue against your experience. Or that people don't use Knuth much or at all in their work. Most people don't use textbooks much or at all in their work.

Per the question, the context of my answer is learning CS and in particular self-directed learning. If the question was about resources for work, I'd probably say "StackOverflow" and be done with it.


I would argue that Knuth is particularly bad for _learning_ CS.

(Based on my experience as CS undergrad and grad student later)


Knuth being impenetrable after six year or so years of formal study using other materials, doesn't seem like a strong case for those other materials. It smells more like six hours in the lab saving an hour in the library.


TAoCP is a terrible resource for a beginner.


Plus, Knuth, despite his accomplishments, is a terrible computer scientist and programmer in some capacities. TeX must be the most odious language not designed as a deliberate joke.


TeX is not a "language"; it's just a tool for typesetting when you want to go the last mile of achieving book-quality printing. The fact that it turns out to be possible to (ab)use its macros (originally designed merely to save the user some typing effort) to do "programming" shows only that it's easy for things to become "accidentally Turing complete" [1], and the cleverness/perversity of its user community.

> TeX was designed for typesetting, not for programming; so it is at best “weird” when considered as a programming language. — DEK, Digital Typography, page 235

> In some sense I put in many of TeX's programming features only after kicking and screaming. — DEK, Digital Typography, page 648

> So TeX is a programming language but I had to put in those features kicking and screaming. […] In a way I resent having every language be universal because they’ll be universal in a different way. […] I was really thinking of TeX as something that the more programming it had in it, the less it was doing its real mission of typesetting. When I put in the calculation of prime numbers into the TeX manual I was not thinking of this as the way to use TeX. I was thinking, “Oh, by the way, look at this: dogs can stand on their hind legs and TeX can calculate prime numbers.” — DEK, interviewed in Peter Seibel's Coders at Work

> Michael Plass, who was Don's student and worked with Don on TeX, told me once that "Don tried very hard not to make TeX a programming language. Unfortunately, he didn't succeed." — Norman Ramsey

I've written more about this verbosely elsewhere [2], but in any case even if TeX had been intentionally designed from the start for public consumption (rather than for just him and his secretary, as was his original intention), it hardly justifies something like "terrible computer scientist" — TeX/MF/CM was just his side-project; the computer science is different.

[1]: (Accidentally Turing-complete) https://www.gwern.net/Turing-complete http://beza1e1.tuxen.de/articles/accidentally_turing_complet... https://aphyr.com/posts/342-typing-the-technical-interview https://www.youtube.com/watch?v=uNjxe8ShM-8

[2]: https://tex.stackexchange.com/a/384881/48 , https://cstheory.stackexchange.com/a/40282/115


> + The foundation of computer science is Knuth's The Art of Computer Programming. Everything else is footnotes.

The foundation of computer science would be the work done by the likes of Alan Turing and Alonzo Church. They established foundations of CS before Knuth was born.


The two courses that give the basic CS foundation needed are:

nand2teris.org and cs50.net

See if you can solve all the projects & assignments in these courses.

These cover a lot of ground. Once you are done with these two courses end to end, you will get a fair understanding of many of the computing big ideas.


If the student knows almost nothing, these are really good as they cover the most simple things.

If you already programming, they may be too basic.


Yeah I think CS50 is too basic. The C part is interesting though, has some minor projects that worth working on. For anyone who has some programming experience (whatever language), I think CS61A is a better course.

I really wish there is a course that uses C (like first 4-5 classes in CS50) and uses C ONLY and then go as deep as possible, similar to CS61A, but apparently on other topics (one system programming project?)


The problem sets in CS50, at least the first half, are great and I would highly recommend. I ditched it when it moved to python and web, the problems were interesting but there was an added level of boredom in the 'now make it a website' approach.


It is valuable to get to know different approaches for the same algorithm from different sources. In general if you could learn about the same topic from 5 different sources it would be awesome.

That said, how much time do you want to spend on it? If you don't have all life to do it, pick 2 and stick to it. Just random ... MIT and Stanford, or Princeton and CMU, in the end there should be no fundamental difference. Stuff that you listed in any way will get you far enough, two approaches will be great.

In the end if you want to be realistic about your time, role the dice for one of those... I did not do any of those, I did small technical university in eastern Europe. I have well paying job in western Europe and have seen people who finished better universities that know less than me.

You know that 80% of the effects come from 20% of causes? Don't try to over optimize... No one will give a damn if you are self learning and you did MIT course over the internet. You are not getting MIT degree anyway. That said, I skimmed through some of MIT and Princeton lectures as well, and you know what? Those were not magically better than the ones from my small uni in eastern Europe... But you know if you have MIT degree it is still worth more just like Adidas shoes you walk with them the same as other sneakers...



Being self taught, I often wonder the same thing. I don't know that this is "THE ANSWER" but I was impressed by the job done here of curating a bunch of disparate CS materials (including some from the universities you mention) into some kind of structured learning approach https://github.com/jwasham/coding-interview-university

As the url suggests, it's got an agenda about interview prep but the materials do not - they're straight up CS resources. Like I said, this may not be exactly what you want, but it could be helpful.

On a different note, I have completed the Stanford Algorithms Course part 1 (currently working on part 2) and I can recommend it.


That's a very nice resource thank you very much.


Can you share your reason to go it alone, or why you ruled out a traditional learning option?

One of my favorite mentees came in to a software development job from a biochemistry background. She’s got a knack for it and did a great job self learning a lot of basics, but I really saw some awesome improvement after she did a “CS masters bridge program” through NYU- https://engineering.nyu.edu/academics/programs/bridge-progra...

I guess it’s really meant to get you into a grad program, but I know she got a ton out of it as a career programmer.


In my country I cannot go for a second bachelors since it is age restricted. The ones which I can attend are extremely expensive for which the ROI is not worth it. My undergrad is in EE.

If it's not too much to ask, would you mind being my mentor online in some way? I would really like to learn from someone with some direction and hold myself with some accountability too.


I'm surprised you didn't list CS50. That's one of the best intro to programming / CS courses around.

You can enroll for free at: https://www.edx.org/course/cs50s-introduction-to-computer-sc...

I never went to University and didn't take a lot of CS courses but since I create web development video courses I wanted to be able to reference other courses to folks who asked so I took CS50 a few years ago to vet it. It was a great intro course and I even learned a little bit of C in the process. David Malan (the head instructor) is also top notch.


CS50 should really stick with C and go as deep as possible. But it's good to learn multiple languages in the same course -- even then I prefer they put a functional language like Scala instead of Python. I mean once you know C it's really easy to pick up Python by yourself.

I'd say 50% C and 50% Functional, and remove the web part, really superficial and boring. And then go as deep as possible. Can even intertwine the C/Functional part, e.g. write an interpreter for a subset of the functional language in C as the last large project.


CS50 is good, but I personally don't like it. I prefer MIT/Princeton/UCB intro courses comparatively. CS50 starts off with C for 3-4 weeks IIRC. Then moves on to python/sql/webdev. Not only is this fast paced, but it also covers a lot of breadth in a short time. For a self learner who has a full time job without proper support structure like peers and office hours which you get in the on campus version, it is difficult (not impossible) to go with the pace of the course. I do agree Malan is a great instructor.

In contrast, I like the MIT/Princeton/UCB courses since they use an easier language to start with and also introduce C in the later courses for systems programming.


I found CS50’s schedule very difficult to keep up with while working full-time. I fell behind at points but I didn’t find much if any penalty in taking a little longer to finish the class. I was motivated and putting the time in to absorb the material to the point where I was satisfied.


edx still has last years version online (I think until like mid-January), so if anybody wants to start between now and then, use: https://cs50.harvard.edu/college/ for the latest Fall 2019 edition.

You can still switch to edx as soon as it's live there.


To be honest I think self study can only take you so far (unless you are incredibly self disciplined). I’d recommend trying to get into OMSCS. If you have an undergrad degree you can do some nano degrees in algo/ai then you should be able to get in. If you don’t have an undergrad degree there are a few high quality online undergrad degrees you can do part time - then do OMSCS. It’s a long journey but will get you to high CS mastery.


The bad news: you can't know what parts of what you don't know will be important. I can give you some recommendations, but so can everybody else, and they'll be different from each person. I'd look to high-level people in the field like Peter Norvig for recommendations, but that only narrows your options slightly. If you know what you want to do more specifically (i.e. security) try to find recommendations by an expert in that area (i.e. Bruce Schneier). But ultimately you're still hearing opinions, not facts.

The good news: It probably doesn't matter that much. Different programming books will give you different strengths and weaknesses, and that's a good thing because teams need diverse skillsets. It's been years since I wrote production code in a strongly typed, statically typed language, but I did that for so long that I still think in types, and I bring that structured way of thinking to the table in Python/Javascript, which means I avoid a lot of the mistakes those languages allow you to make. I've worked with people who were very comfortable with metaprogramming, which always feels messy to me because it inherently muddles types. It's not a tool I ever reach for, and I push back when people add metaprogramming to codebases, which is a good thing, because too much metaprogramming can be bad. But sometimes, judiciously used, it can be very effective, so people with metaprogramming skill will solve problems that would be very difficult for me to solve. If we had both read all the same fundamental programming books, we'd never have these diverse skills that make our teams effective.

TL;DR: Pick the first one from a reputable organization and do it. Time spent agonizing on this decision is time wasted.


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.


I always wonder this about other subjects and wish there were better guides listing the topics one needs to know — and how to learn them. Since I know a bit of CS, I’ll try to do my part here.

In college, I found this lecture series to be an excellent supplement to my autonama and formal languages course. I haven’t watched the whole thing, but it should check your “theory of computation” box. The lecturer is fantastic and thorough.

https://www.youtube.com/playlist?list=PL601FC994BDD963E4

The prerequisites for this should be discrete math, but to be honest, depending on how comfortable you are with math in general, you could probably skip it and look things up as needed.

Another person to look into is Scott Young who taught himself the MIT CS curriculum in a year. His book Ultralearning is excellent and contains many tips that would help with self-studying CS. Unless you just want to dive into the content, Ultralearning would actually be my first recommendation before learning CS fundamentals.


Of the intro-level courses I'm only familiar with CMU's 15-112, which I took as my own intro to programming a few years ago [1], and UC Berkeley's CS 61A (from hearing friends talk about it and looking at their assignments). But given the choice between just those two, I would definitely go with 112.

Compare the second homework assignments, which are supposed to be given after 2 weeks (~6 days) of instruction:

15-112: https://www.cs.cmu.edu/~rdriley/112/assignments/02/

CS 61A: https://cs61a.org/hw/hw02/

The 61A assignment forces higher order functions way too early, and it's often discouraging to people just starting out - and it's not even common (in my experience) to write code like this anyways. I also like the way that the CMU assignment writes tests as simple functions, without magic docstring tooling.

Don't skip the code tracing sections, where you read code and write the output by hand - it helps you understand and internalize what the code is doing, rather than just running code samples over and over again to see how it works.

Also, there's some nice notes on debugging https://www.cs.cmu.edu/~rdriley/112/notes/notes-debugging.ht...

[1] I took this version, which is ordered a bit differently http://www.kosbie.net/cmu/spring-16/15-112/schedule.html


I have found that it's easier to find all assignments/materials online for the later courses from UCB compared to CMU courses although I do find that the CMU courses to be at a much higher rigor than UCB.


Given the vastness of the field my advice would be to narrow your focus. And specifically, focus on an area that will hold your interest and seek out the best resources in that area. When I was younger I really wanted to make computer games and picked up Andre LaMothe's Teach Yourself Game Programming. I wound up reading it cover to cover and experimenting with many of the concepts. My career wound up going in a completely different direction but I learned more from that stint of sustained interest in a good book, than many of my university classes.

Second advice is that once you've done a rote exercise find some way to push the boundaries of it. I've found that anything I can do to extend or customize the example helps engage my brain with the material and often leads to learning new things.


MIT has entire courseware available for free.

https://ocw.mit.edu/courses/find-by-topic/#cat=engineering&s...

Introduction to Computer Science followed by Data Structures and Algorithms should give you a healthy start.

--

Learning these fundamentals is useful, but not necessarily immediately practical. Building and doing is the best way to learn. This is a good start, and the fundamentals will certainly give you an edge against most people graduating from a bootcamp, but after this I'd recommend finding a good tutorial, whatever the language that teaches you step by step how to build XYZ... I learned ruby/rails by doing Michael Hartl's tutorial building a microblogging platform like twitter.


I used MIT OCW several years ago, but found it frustrating for three reasons:

1. Following the courseware is not always free, starting with the textbook

2. There are no milestones or credentials to track your progress

3. I found little community to interact with

This is just anecdotal. Some of these may have changed, be different.

Has anyone here worked through many of these courses themselves?


You have one of the best universities in the world sharing their material for free. That's what's valuable, not the forums that can be attached to the platform or the certificate that no employer cares about.


I mean the professor or university could be the best in the world in terms of scientific discovery or university rankings criteria and this does not mean these materials are necessarily the best learning experience.

Did you even take courses there? Have a different experience?


Yes, I have, and my experience has been the exact opposite. Their courses on calculus and linear algebra are some of the best that I've come across.


Amazing inputs.

I'd also suggest a top-down approach where you start with a flexible end goal you'd want to achieve (e.g. be a full-stack dev), in which case you can start by babystepping a hands-on approach (e.g. learning javascript, learning client-side and server-side of things). Complimentary fundamental course outlines can also help, e.g. Comptia A+ gives you hardware fundamentals, Comptia Network+ gives you networking fundamentals, CloudAcademy can get you started on working with cloud providers like Azure/GCP/AWS, and so on and so forth.

It's easy to get lost in the theoretical side of things, being able to test them out in action as soon as you can could give you quite an ideal balance.


I had the exact same problem as you — and really, it’s not a problem at all! It’s one of the greatest things the internet’s given us.

Just remember that material is material. Fundamentally, all of these courses are pointing you towards the same basic core of knowledge, with only minor stylistic differences. I like using multiple sources, like you do. Just stick with one good one at first, and then once you finish it you’ll be able to go through five more in the same time, because of the overlap.


For data structures and algorithms, work through Introduction to Algorithms by CLRS and follow the video series from IIT Bombay, available here: https://www.youtube.com/playlist?list=PL7DC83C6B3312DF1E.

...or use any other book or lecture series. Stop worrying about choosing the "right" resource; just find a resource and start learning.


I did the first three in this series of online Coursera courses from UC San Diego and I thought they were quite good: https://www.coursera.org/specializations/data-structures-alg...

You end up implementing the algorithms and data structures yourself in your language of choice, which I find is a good way to learn.


Harvard’s CS50 [1] is where I started in my self learning journey. I found it very difficult but it’s given me a really good base to build upon.

CS50 hits the sweet spot of excellent online material, large online community and fun.

1: https://www.edx.org/course/cs50s-introduction-to-computer-sc...


Concerning computer science, you can find some interesting web discoveries here: https://turtle.community/topic/computer_science

In particular, I like 'Category Theory for Programmers' by Bartosz Milewski as a great theoretical foundation to functional programming.


I really recommend Lynda ( now linkedin learning) not free (but remaking accounts works ofcourse), unless you signup via new york or LA library. also khan academy: information theory is really great: https://www.khanacademy.org/computing/computer-science


Any specific courses that you'd recommend on LinkedIn Learning?


I'd recommend their course Programming foundations: Fundamentals. They update this one yearly I believe


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.


If you have a good verification method to see that you learned enough for a successful interview, it doesn't really matter which course you use.

Going through hackerrank tasks is a great way to practice. Also Cracking the Coding Interview and online interview questions.


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.


You need to define your goals, learn the CS you need for the projects you want to work on. If you find yourself at a point where that is not enough, you should get yourself into a CS program.


There's an abundance of material online to get through an entire CS program on your own, if this is your desire. The problem I've seen with self-study, unless you are disciplined, chances are you will not stay the course, even if you follow a plan, unless you're single, with plenty of time/energy to burn toward a program.

My suggestion would be to enroll in a college and pay for your education. This way, you'll be more motivated because the pace will be imposed and it will cost you more than your time if you don't do the work required to pass and more importantly, learn something of value.


I actually second this. I found it struggling to keep the pace, and the thing with study is, if you wait for a few days and try to pick up, you usually have to start over from a previous "milestone", which really sucks. That means unless you are really disciplined, it's difficult to learn the whole stuff by yourself.

But I think at least one should be able to learn 2 topics by oneself: A programming language, Basic data structure and algorithm as well. Then he can learn the others leisurely.


You need to narrow down what your goal is.

Trying to learn computer science is like trying to learn sports. Swimming and tennis have very little in common and you can spend years trying every sport and never becoming good at any of them (what traditional cs education does)

If your goal is to get a job, your best bet is web development or mobile dev.

The big picture is we have CPUs that have instructions. Instructions boil down to moving data to/from someplace and manipulation of data.

Moving is how monitors display stuff, data gets stored on disk etc. Moving is how a program gets loaded and executed.

Manipulation is how you get math operations. Programming boils down to math operations and conditionals (if this, then that, else something else)

Math operations have a few basic types for performance reasons - floats, ints, etc.

Because math operations on the CPU have types, programming languages have types. Because CPUs have conditional operations, programming languages have operations. See the pattern? Programming languages are just conveniences on top of the language the CPU provides (called assembly).

The most popular 'low level' language is C. C gives you functions and the smallest set of data types you can get away with. The big deal here is organizing code into functions. Functions allow re-use and programming is all about doing the least amount of work possible by the programmer to achieve a task, in the shortest amount of time and memory use possible.

The study of shortest amount of code to achieve the fastest result with the least amount of memory use is algorithms.

To achieve fast results with least memory used, you want a language that gives you access to memory manipulation directly. This is why C is still king for anything performance critical.

If you don't care for performance much, Java the language is king of corporate software and all Android software too. It handles memory for you and your types are clever - you don't need to say how big an array you want when creating it, you just create one and it gets magically re-sized behind the scenes for you as you add elements in. All modern languages have clever types and ways of helping manage memory for you. This is to make programming more newbie-friendly and theoretically to lower the number of bugs, at the cost of performance and memory use.

Phew, so we have CPUs, C and Java. Now where do we typically store data and how do we display it?

Data is stored in databases. Databases mere mortals use are all SQL databases - the most popular and robust being Postgres. Learn what an index is and why it helps stuff run faster. Learn joins and one-to-many and many-to-many. Build a photo-sharing site with user registration - this'll cover needing to know all the basics.

Oh, to build the site, you'll need to display it. You have 3 options - web, ios or android. I'd recommend web because it's the easiest of the 3 and there are tons of excellent resources to learn from.

It is extremely easy to get bogged down in libraries such as 'react' and all the rest. It is extremely easy to get bogged down in new Javascript features. Stick with the basics! Stick with simple html/css and flexbox for layout. Use node with the most popular and simple web framework as a web server. Use the simplest library to talk to the database and write SQL, don't use ORM because you need to learn SQL and'll be around for the next 50 years - your ORM won't.

Phew, you've spent about 6 months and have built a photo sharing site. You know html/css, some javascript, a web server framework, how to store stuff in a database.

You're another 3-6 months away from getting a job as a web developer. You'll need to learn react or whatever other junk framework of the year is most popular these days. You'll then be plunged into a world of mediocre software and writing code for projects that make no sense, with deadlines that make even less sense. There'll be a lot of meetings, incompetence and your posture will suffer.

The pay is good however, and it should double within the first 2-5 years if not triple. Switch jobs every year and try to do contract work as soon as possible - it pays way better.

This is the outline for going from 0 to hero, if getting a job is your goal. If you don't want to end up working on projects of questionable importance for the rest of your career and you want to build software that will drive the next car, operate the next robot, help us go to Mars etc - you should simply attend a good University. There is no shortcut and you'll avoid wasting hundreds if not thousands of hours chasing your own tail reading tutorials written by people who learned programming 2 years ago themselves.

You'll meet other smart people and you may even want to get a Masters and a PhD. Oh, you may get hired by a top company if you're good and the pay there is great, and that's where you'll get to do great work. They care about degrees and which University you went to, don't believe anyone who says otherwise.

Self-learning CS is only for the crazy ones, or those who want a high paying job quickly, are smart and don't care what they work on.

My 2 cents of course, having gone the self-learning route myself many years ago :)

Oh, one last thing - if you go the self-learning route, you need a friend who's a good established programmer to answer your questions for 5-10 min everyday. I don't know if there are services online that do this or if you know somebody but this is absolutely critical to avoid wasting your time without knowing it, which is inevitable but you want to minimize it.

Now that I think of it, if you go to University, you absolutely want a real programmer too, to know which courses to simply get a passing grade on, and which to focus on, depending on your ambitions.


A couple of things here: I do not think that there is a “right” set of resources. There may be a set of “right” resources for you personally but to explore or discover these you would have to explore your motivation and your personality further. Which learning styles do you favour? What are your long term goals? Somehow I liked how Jordan Peterson put it in his - Maps of Meaning- lecture: university should help students to get articulate. If you think about that, your self and um your goals it should help you to move forward.

Other wise you are just looking for an instruction manual for life, which doesn’t exist as such.


Go to school or do some online or part time degree on Coursera/udacity. Otherwise you waste more time and don’t learn anything.


n most elementary schools, high schools and colleges, computer science is still an elective course. However, a growing number of education institutions – at every level – are requiring their students to complete at least an introductory course in computer science in order to graduate. We live in a society driven by computer technology. From school to work to socializing, understanding how computers work and how to use them is becoming more essential in many areas of life. The field of computer science takes computing to the next level. More and more students are pursuing an education in computer science and turning their knowledge into lucrative careers in business, engineering, and health care, to name just a few.




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact

Search: