How to Build Your Own Computer Science Degree

August 29, 2020

Note: You can find the video lecture for this article at



Summary of the video:

The following books can be used to study core computer science topics at the college / university level, to prepare yourself for machine learning, deep learning, artificial intelligence, and data science.

These are the books I recommend for building your own computer science degree. Remember! The goal is to do as many exercises as you can. It’s not to just watch 5 minute YouTube videos and then conclude “I understand everything! There’s no need for exercises!”

This quote from the video sums it up nicely: if you don’t find the problems, the problems will find you.


These books cover common core courses that are relevant for many sub-fields of Computer Science and Engineering, including Machine Learning et. al., but also related fields such as operations research, statistics, quantitative finance, software engineering, digital communications, wireless communications, control systems (e.g. autopilot), robotics, and many more.

To recap, these are the courses and why you want to take them:



Nearly all machine learning algorithms boil down to optimization problems. What is optimization? Generally speaking, it’s when you have a function and you want to maximize or minimize that function.

If you’ve taken calculus, then you should recall that this is exactly what you learn how to do in calculus.

Therefore, calculus is an essential tool in artificial intelligence, data science, etc.


Linear Algebra

In machine learning and deep learning especially, we work with vectors, matrices, and higher-dimensional objects. This is the realm of linear algebra.

Luckily, you don’t have to go that far in linear algebra to get what you need for deep learning and AI.

For example, the concept of spans, subspaces, rank, etc. rarely show up in machine learning.

On the other hand, the basics, such as matrix and vector multiplication and eigenvalues and eigenvectors, show up often.



Probability is the language you must speak if you want to do machine learning and AI.

Recall above that machine learning often boils down to an optimization. What are we trying to optimize? Often, it’s an expected value. What is an expected value? Well, you have to learn probability to find that out.

For a time, “probabilistic graphical models” were the state of the art in artificial intelligence. Clearly, probability would be a prerequisite.

Probability shows up nearly everywhere in machine learning, from soft k-means clustering to hidden Markov models to artificial neural networks and beyond.

Side note: if you were thinking earlier, “who needs calculus when Tensorflow can do it for me!?”, think again. Calculus is a prerequisite to probability. So if you want to learn probability, you still need calculus anyway.



Obviously, at some point, you need to be able to actually write a computer program in order to use machine learning.

Nowadays, things can seem very simple when all you need is 3 lines of boilerplate code to use scikit-learn.

However, that’s not really what one should imagine when they think of “learning machine learning”.

Check any college-level machine learning course (not that bullshit being sold by marketers online) to confirm what I am saying.

As the great physicist Richard Feynman once said, “What I cannot create, I do not understand”.

In order to best understand a machine learning algorithm, you should implement it.

No, you are not “reinventing the wheel”. This is called “learning”.

I would posit that if you can’t implement basic algorithms like k-means clustering, logistic regression, k-nearest neighbor, and naive Bayes, you do not understand those algorithms.

So why do I suggest Java over something like Python, which has easily become the most popular language for doing data science.

The problem with Python is that it’s too high level. It doesn’t make you think about the program you are writing at the algorithmic level.

You should understand the difference between an efficient and an inefficient algorithm. (No, that doesn’t mean memorizing facts like “Python list comprehensions are better than for loops”).

In fact you should recognize that list comprehensions have the exact same time complexity as your for loop.

Java, being slightly lower level, forces you to think algorithmically.

That brings us to the final topic.


Algorithms and Data Structures

In order to really understand algorithms, you should study… algorithms.

There are many famous algorithms contained in the book I’ve suggested below.

Realistically, you are not going to use these in your day to day work (a very common complaint from software developers seeking employment).

However, that’s not really the point.

The point is exercising your brain and learning how to think in certain ways that help you write better code.

Also, you should understand the pros and cons of basic data structures such as lists, sets, dictionaries, and trees.

If you’re coding up some algorithm, why might a set be better than a list? Algorithms tell you why.

One major data structure you might want to learn about is graphs (along with their associated algorithms). Graph neural networks seem to be picking up steam, and they are being used for all kinds of interesting problems like social network analysis, chemistry, and more.


To summarize: the core courses I would consider essential for building your own Computer Science degree in preparation for machine learning, deep learning, data science, and artificial intelligence are calculus, linear algebra, probability, programming, and algorithms.

Don’t just watch a bunch of videos on YouTube or Khan Academy and then proclaim you understand the subject. The reason I’ve suggested books is because they contain exercises / homework problems. These are what you must be able to do in order to claim that you understand something. It’s not about “absorbing information”, it’s about “producing useful output”.

Common question: What about C++? Yes, C++ is excellent! Ideally, you will learn both C++ and Java, but obviously, these are not hard prerequisites for machine learning or data science.




Calculus: Early Transcendentals by James Stewart

Introduction to Linear Algebra by Gilbert Strang

Introduction to Probability by Bertsekas and Tsitsiklis

Big Java by Cay Horstmann

Introduction to Algorithms by Cormen, Leiserson, Rivest, and Stein

Disclaimer: this post contains Amazon affiliate links.

Go to comments

Why does “how to succeed in this course” exist?

August 21, 2020

This lecture will answer a common beginner question: why does the lecture “how to succeed in this course” exist?

Note that in some courses, this may have been replaced with the alternate lecture, “anyone can succeed in this course”.

Every now and then, this lecture really offends someone (probably because it hits one or two of their “sensitive spots” and they know that they are making some of the mistakes I mention in that lecture). But I’d rather not speculate, and furthermore, there is no reason to.

Let’s get down to business:

Your interpretation of this lecture is wrong.

Your main mistake is that you haven’t thought of your fellow students (and there are thousands of them).

Obviously, this lecture wouldn’t have been made if it were not deemed necessary.

Common sense (hopefully) should tell you that these “strange statements” (yes, someone really called them that, haha!) weren’t invented out of thin air.

Clearly, based on this lecture, you can conclude that:

– there are students who don’t follow instructions and need a reminder

– there are students who don’t meet the prerequisites and need a reminder

– there are students who believe all the prerequisites can be included in this course (not true)

– there are students who believe they can understand this course without meeting the prerequisites (not true)

– there are students who make up self-defeating excuses not to use the Q&A

– there are students who don’t know that coding is an exercise

– there are students who don’t know about the speed changer

– there are students who forget things and don’t realize that taking notes would have prevented them from forgetting

– there are students who believe their PhD absolves them from following the instructions or meeting the prerequisites

– etc.

Need I say more?

Finally, understand that the course is not personalized for you. It’s for everybody.

Therefore, if you find a lecture that doesn’t contain content you want to learn, simply skip it.

It should be very easy. Let me know if you can’t find the “skip” button.

In fact, this is stated in this very lecture, so maybe you should have watched it more carefully. 😉

The lesson is: be kind, courteous, understanding, and accommodating to your fellow students. Hopefully, this makes sense.

Common assertions:

it is patronizing

It’s only patronizing if you believe you are “above” this advice, in which case, you should double check that the problem isn’t that you think too highly of yourself. 😉

it is negative

Is today backwards day?

“Anyone can succeed in this course” is a negative statement?

The opposite of that is “Nobody can succeed in this course”. I suppose that would be positive?



Nobody to this date has ever been able to provide a direct rebuttal to any of the points I have mentioned above.

If you think you can rebut anything I have said, I am actually so eager to hear what you have to say. I have been waiting years for someone to tell me why any of the above points are wrong!

Go to comments

Deep Learning and Artificial Intelligence Newsletter

Get discount coupons, free machine learning material, and new course announcements