Two Online Classes that Got Me A Job

Hello again, World.

Today we’re going to talk about the online courses that made it possible for me to get a programming job. Back in Year 2, Coursera was my job, and this post is the job description.

Princeton Aglorithms:

Algorithms, Part I is the first course that I took. The first time I took this course, the learning curve was a little bit, efficient, as I like to say. The course description happily tells you that you need to know Java in order to take the course. I am happy to report that if you stubbornly fight the course for higher grades by retaking it as needed, you will come to know Java.

The best thing about this course is that it makes you write to an API, and it actually grades your code. The homework will be like, “write a class that exposes the following public methods; make sure it has the following performance and memory usage characteristics; here are the style rules.” Then you zip up your .java files, upload them to the server, and boom! It will grade you. It runs some kind of style cop program, and complains about lines being too long, or bad casing of variable names. It compiles the code. It runs everything. It tests how much memory your program allocates. It times your program as it completes the code. It is very rigorous.

Two remarks here: first, this is a lot like actual programming in real life for real software companies. You have some requirements. You are not at liberty to re-architect the whole server because you think your classes should look different. Your code has to perform well, be memory efficient, and (hopefully) pass some automated tests. Second, if your code is getting good grades in this class, you probably implemented the algorithms you’re learning correctly, and wrote reasonably good code. 

This course is fair, challenging, and I learned a ton. Just don’t take it before you’ve done any programming at all. I had done a reasonable amount of hobby JavaScript before I tried to tackle this course, and it was hard. I had to take it twice.

There is also a follow up course which, thankfully, is more of the same. I wrote some really interesting, challenging code for this course. The first time I got to stay up all night debugging some graph search algorithm was during this course. Highly recommended.

Stanford Algorithms:

Algorithms: Design and Analysis, Part I (and II) were the other courses that helped me get my job. These courses cover a lot of the same material as the Princeton courses discussed above, but from a much different angle. Briefly: more math, less autograding. But first, a story:

I still remember, sometime during my non-internship, reading an answer on StackOverflow that referenced big-O notation. I remember being mystified. The answer basically said, “you could do it this way, or that way, but that way will be O(n^2), and this way will be O(n * log (n))”.

“Magic” I thought, “That person has somehow miraculously predicted how the computer will behave.” Then I remembered that we’re not allowed to believe in unicorns any more, and made up my mind to go find out how this magic worked. I learned the answer during this course.

The best thing about this course was the programmer-specific math; that is, learning to reason about how algorithms scale. During the first few weeks of the course, you will learn a proof that randomized quicksort runs in O(n * log (n)) time. Not a guess, not a hunch, not an experiment, but a proof like from high school geometry that this algorithm’s running time would be bounded above by y = c * x * log(x) [with really high probability. It is a randomized algorithm, after all.] This was one the moments when I really fell in love with computer science.

Unlike the Princeton version, this course does not have an auto-grader. The programming assignments are basically, “here’s a text file. In it is a math problem far too long for you to do any way besides writing a computer program. What’s the answer?” Then you write the program and find the answer. The plus side is that you can use any language you like. The downside is the you don’t get the specific feedback on your code that you did in the Princeton version. Also, the quizzes are much harder in this course than they were in the Princeton course.

Closing thoughts:

I loved both of these classes, and they were both challenging. I took the Princeton ones first. I think that fighting with the autograder is a little bit easier than just trying to be right on a quiz. The autograder will tell you which test cases your code passed, and which ones your code failed, which is a great head start towards finding bugs.

You should take and pass both parts of both these classes if you want to be a professional programmer. I can hold a decent conversation about algorithms and data structures with any computer science major in the room, thanks to these courses. Simple Programmer lists “can you solve algorithm-type problems” in his list important traits for a good programmer, and these courses are why I can do that.

Bonus: both the professors are excellent lecturers, and occasionally say something truly hilarious.

Till next week, happy learning!




Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s