Check out a free preview of the full Practical Problem Solving with Algorithms course

The "Introduction" Lesson is part of the full, Practical Problem Solving with Algorithms course featured in this preview video. Here's what you'd learn in this lesson:

Kyle Simpson begins the course by comparing the algorithms courses on Frontend Masters and shares a couple of recommended computer science books that outline data structures and algorithms.

Preview
Close

Transcript from the "Introduction" Lesson

[00:00:00]
>> I'm thrilled to be back. Thank you for joining live, online. Thank you for joining virtually later through recordings. It's fantastic to have you here. Thank you to the Frontend Masters' staff who I quite literally owe my career to because I got my start teaching because Mark called me up one day and he was like, come up here and teach.

[00:00:18]
And it took me a few weeks to convince myself I'd come up to cold Minnesota in November, December. But I came up here and my whole career blossomed from doing that. So, I thank Mark and his staff for all the fantastic stuff that they've done. They're the best in the business.

[00:00:37]
I teach exclusively at Frontend Masters. I don't record anywhere else because they're the best. So, there's lots of my courses on here that you can find and some really fantastic other courses on Frontend Masters. I watched some of the algorithms courses that other teachers have done, just to get a sense of what's being presented, making sure that I'm presenting things both consistently but also in my own voice.

[00:01:01]
So there's some really fantastic ones. I think one actually just came out recently, ThePrimeagen how to algorithms course, it was really fantastic. So, check out all of those great resources on here as well. All right, so just as some recommended reading, depends on kind of your background with computer science.

[00:01:25]
I feel like a lot of times people get upset with this general topic, because the first Google that you do and you land on a Wikipedia page, and they start throwing a bunch of mathematical symbols or complex terminology. And it might feel like this general idea of algorithms and data structures is hard unless you have some sort of formal background.

[00:01:45]
I do have a computer science background, but it's 25 years old at this point. So, I think at least half if not the majority of my skills in this area are the practical on the job skills rather than all the theoretical stuff you get taught in school. And what I hope you take away from that is that not that education isn't helpful, but that it's not requisite.

[00:02:07]
It's not a requirement that you've gone through some sort of hardcore course to be able to learn this stuff. And I found these books a couple of years ago. I've started with the Computer Science Distilled and then a couple years later, the unleashed one came out. I'm not even gonna try to pronounce this guy's name because I'm sure I'll butcher it.

[00:02:24]
But the books are fantastic, especially the Computer Science Distilled, it really is like, if you have a computer science background then it's a review of those things it sort of hits the high topics. And say, yeah I remember, red black tree or I remember this kind of sword or whatever.

[00:02:43]
But it doesn't get too into the weeds, it's an outline. It's a roadmap of the things that you might wanna go back and check on. If you don't have a computer science background, it's actually a really fantastic outline of things that you could go dig into to learn computer science without having gone through, say a four year college degree.

[00:03:02]
So, I really highly recommend that book. And a lot of the things that I use in sort of a practical sense are founded in things that you might read in this book. So, by the name, it's both theory and practice and I think that's really kind of the way to go with this stuff.

[00:03:19]
So, I recommend those books. I don't have any affiliate links, I'm not getting anything for it. But I do think those are very useful books to read. A couple of disclaimers, I kind of already have hinted at this. But the other courses that Frontend Masters has and other resources that you find out there in the world, tend to take a pretty straightforward, what I would call almost an academic lecture approach.

[00:03:43]
And I don't mean this in a disparaging way, but there's kind of a standard set of topics that you're supposed to go over that map similar to what you learn in, your first couple of semesters of a computer science degree, taking data structures courses. And I want you to think of this course as not that.

[00:04:02]
There are other great courses, again, Theprimeagen and others, other great courses on those topics. This I want you to think of more like your lab course. If you've taken a college course where you had to do a lecture and a lab, I want you to think of this one more like the lab course.

[00:04:18]
Second disclaimer might ruffle a bit of feathers. But we're using JavaScript, but I'm like, we have to use JavaScript. I'm not like, I want to use JavaScript, this is absolutely the right language for this. It's the most widespread language, and I don't think anybody can deny that. And I've built an entire career being happy with JavaScript.

[00:04:45]
Personally, I kind of consider myself in a transition point to post JavaScript. But JavaScript is gonna be around, and I'm gonna be writing JavaScript until the end of my career, I'm quite certain. So, we have to use JavaScript, it's a great language. There are pros and cons to us taking on a topic like this in a language like JavaScript.

[00:05:04]
One of the pros is its accessibility, is how easy it is to get things done. How much of the underlying mechanisms you don't have to worry about because JavaScript the language is taking care of those things for you. And that goes for garbage collection, it goes for typing, it goes for all kinds of things.

[00:05:22]
The downside to that is that most of the theory behind data structures and algorithms is based on you being able to have control over those things. So, it doesn't mean that none of its applicable to JavaScript. But for example, there are algorithms that are written specifically because they know that in a language where memory is contiguously marked and you go from one place to another in an array, then those are contiguous memory segments.

[00:05:48]
And accessing the next element in the array is basically a no-op, it's just a single addition of a pointer. They're based on that sort of internal knowledge. And we would apply the same algorithm to JavaScript, and while we might get great performance, we're not gonna get the performance that the algorithm designers intended.

[00:06:07]
Because we're not using at all the same kind of mechanism, we're several levels higher in abstraction at that point. So, do take with a bit of a grain of salt when you get into those hardcore algorithms. I'm talking about things like quicksort and stuff like that. If you get into the deepness of these algorithms, you do have to take with a grain of salt that what you are coding in JavaScript may functionally work, but may not have the same kind of characteristics that the original design intended.

[00:06:38]
Another example is, it may be easy for you to code an algorithm where you create an array and return it and then spread that array into a bigger array. And that's just sort of, it seems in the JavaScript world as a free operation, but you're creating a tremendous amount of garbage collection pressure.

[00:06:56]
And that's something that the designers of many of the classical algorithms never had to worry about. They did not worry that, right in the middle of my really fast operation, it's gonna throw up a garbage collector that blocks the thread or something. So, there are lots of balances that we have to take, which is again why I treat this more like a lab course than a theory or academic course.

[00:07:15]
Lots of balances that we have to play between the processing and the memory. In fact, we'll get into some of that kind of memory management stuff in a garbage collected world. Those are things that, the original founders of, data structures science and computer science, they wouldn't have even needed to concern themselves with because they used systems that didn't have those same properties.

[00:07:36]
So, that's what I mean when I sort of shrug and say, man, we have to use JavaScript, we're gonna use JavaScript. I don't have anything, I don't hold any grudges against JavaScript, but in a perfect world, you'd probably be tackling the learning of this through one of those lower level languages.

[00:07:53]
But then again, 99% of us aren't gonna go learn those languages. So, we don't wanna be stuck and gate kept out of the knowledge of this and there's plenty to be gained from applying proper thinking in whatever layer of abstraction you're working in, okay? So just, so you're aware, keep those caveats in mind as we go forward.

Learn Straight from the Experts Who Shape the Modern Web

  • In-depth Courses
  • Industry Leading Experts
  • Learning Paths
  • Live Interactive Workshops
Get Unlimited Access Now