Vaidehi Joshi

co-host, developer, author

Saron Yitbarek

co-host, developer, founder

#### Description

We continue our talk about Dijkstra's algorithm, which can be used to determine the shortest path from one node in a graph to every other node within the same graph data structure, provided that the nodes are reachable from the starting node.

#### Show Notes

This episode of the Basecs podcast is based on Vaidehi's blog post, Finding The Shortest Path, With A Little Help From Dijkstra from her basecs blog series.

#### Transcript

[00:00:02] SY: Welcome to the Base.cs Podcast where we explore the basics of computer science concepts. I’m your host Saron, Founder of CodeNewbie.

[00:00:09] VJ: And I’m Vaidehi Joshi, Author and Developer.

[00:00:12] SY: And she is the brilliant mind behind the Base.cs Blog Series. Today, we are continuing our conversation on…

[00:00:18] VJ: Dijkstra’s Algorithm.

[00:00:20] SY: This season of the Base.cs Podcast is brought to you by Educative. Educative has a ton of online coding courses, including how to become a machine-learning engineer and a practical guide to Kubernetes. Active text-based courses give you in demand tech skills. And since it’s text-based, there’s no scrubbing back and forth video to find the content you need. So learn better and faster with Educative and get a 20% site-wide discount by going to educative.io/basecs.

[00:00:56] So let’s do a quick recap. What is Dijkstra’s algorithm?

[00:00:59] VJ: So Dijkstra’s algorithm is a way of determining the shortest path in a graph from one node to every other node within the graph data structure. And it’s pretty cool because it lets us find not just one shortest path, but every shortest path from one node to every other node, which is kind of what makes it unique.

[00:01:25] SY: Okay. And I hear that you’ve got a song for us, a Dijkstra’s algorithm song.

[00:01:31] VJ: Yeah. The other day I was like reminding myself about the algorithm, so that I could remember what to say when we record. And I was just like reading it, and then I just started singing and it goes a little something like this. “Dijkstra’s algorithm. Dijkstra’s algorithm. Everyone thinks that it’s so hard, but really it’s just fun. Dijkstra’s algorithm. Dijkstra’s algorithm.” That’s it.

[00:02:10] SY: Vaidehi, that’s like the worst song ever.

[00:02:12] VJ: I know.

[00:02:14] SY: You don’t even rhyme anything.

[00:02:15] VJ: I know. I mean, but there’s a melody.

[00:02:18] SY: The melody was really cute. I like your melody.

[00:02:20] VJ: It’s got a good message.

[00:02:23] SY: It does.

[00:02:24] VJ: It’s not hard, but it’s fun.

[00:02:26] SY: It is. And it is accurate. It is accurate. Okay. All right. All right. You get points for that. Well, thank you for your song. I really appreciate it.

[00:02:34] VJ: I thought you were expecting something way more.

[00:02:37] SY: I was. I was expecting something a little bit more lyrically interesting. But you know, we have a song. We have a song and I think this is our first Base.cs Podcast song. So thank you for that.

[00:02:53] VJ: Yeah.

[00:02:53] SY: Yup.

[00:02:54] VJ: It only took eight seasons.

[00:02:56] SY: My God! We’re on eight seasons. I’m so grateful.

[00:02:59] VJ: I’ve thrown all my shame out the window.

[00:03:00] SY: Yeah. You get it all. Okay. So Dijkstra’s algorithm comes with a couple steps. I think it comes with, is it four, four steps, four rules that we’re following?

[00:03:11] VJ: Yeah. It’s basically four steps that we take every time we visit a node effectively. We sort of went over this last episode. But as a quick reminder, the rules for running Dijkstra’s algorithm, those four steps are basically when we set out to visit a new node, we always want to choose the node that has the smallest cost or the lowest distance. And we talked about this previously in the context of weighted graphs. When there’s a weight associated with an edge, that’s basically our cost. So when you’re picking a node to visit, when you’re running Dijkstra’s algorithm, you want to pick the node that has the least cost. That’s basically rule number one.

[00:03:50] SY: Yeah. And rule number two?

[00:03:52] VJ: Rule number two is that once we’ve moved to the node that we’re going to visit, we’re going to mark it as visited and we have to check each of its neighboring nodes. That’s probably the simplest rule. We’re going to check its neighbors.

[00:04:06] SY: To check its neighbors. Okay. And then rule number three.

[00:04:09] VJ: Rule number three, for each neighboring node, we need to calculate the distance or the cost for that neighboring node by summing the cost of the edges that led to the node that we’re currently checking. And that means basically, if we’re looking at a node and we’re checking its neighbors, we need to figure out the cost to get to its neighbor and not just like the cost from where we are from the node that we’re checking, but from where we came from previously.

[00:04:39] SY: All the way at the beginning. Yeah.

[00:04:41] VJ: Yeah. So we’re cumulatively adding basically the cost to get deeper and deeper into the graph as we check more and more neighbors.

[00:04:47] SY: Okay, cool. And then last rule, what’s that one about?

[00:04:50] VJ: The last rule is that if we find a cost to a node that is less than some known distance to that node, we need to update it with the shortest distance that we have on file. So what that basically means is as we run this algorithm, we’re basically keeping track in like a little cheat sheet or like a table or some sort of object structure basically. You’re keeping track of what is the shortest known path to get to every vertex from the starting node. So as we go through and we run this algorithm, if we find a path that is shorter than the one we know about, well, we found a more efficient way of getting to that node, so we should scratch it off and update it with the newly discovered shorter path.

[00:05:39] SY: Okay. Cool. Those rules don’t sound that bad, but we will see if that’s true by looking at an example. So last episode we did a pretty simple example. I think we just did a little triangle graph, right? A, B, C, and they’re all connected to each other. But this time we are going to build a house with our graphs. So are you excited for this? Are you excited for this? Okay.

[00:05:59] VJ: I’m excited.

[00:06:00] SY: Our first Base.cs Podcast house. Okay.

[00:06:03] VJ: House and a song.

[00:06:05] SY: House and a song.

[00:06:06] VJ: We’re not one-trick ponies.

[00:06:07] SY: We are spoiling our listeners. So this graph basically looks like a house. It has a roof, which is made of that triangle, A, B, C. Then A is at the very top and then the B and the C are at the corner. Then B and C are connected to basically the bottom, the foundation of the house, which are D and E. So we have a little square going on. So we have C, B, D, E as a square, but then there is a… is it a crossbeam? What is it? What is it called?

[00:06:35] VJ: Yeah, crossbeam.

[00:06:41] SY: Your boyfriend is an architect. You should know this.

[00:06:43] VJ: I know. And I forgot. I don’t think about crossbeams. It’s only when he talks about them and obviously I don’t think about them enough.

[00:06:49] SY: Okay. We want to call it a crossbeam going from B.

[00:06:51] VJ: Yeah, that sounds right.

[00:06:52] SY: It’s always right. It sounds right. Going from B to D. So that’s our diagonal connecting our B to D. So just to review, we have a little house, structure that looks like a house. We have A at the top, B and C as the triangle of the roof then we have C, B, D, E as our square with D and E sitting as the foundation and then we have a beautiful crossbeam connecting B and D. So hold that in your minds and we’re going to walk through how to do Dijkstra’s algorithm on our house graph. Okay. So we’re going to start with Node A and we’re going to start with, I believe we need a table, right? Because we need to keep track of distances and vertexes and who we visited and all that stuff, right?

[00:07:36] VJ: Yeah. This is that cheat sheet thing that I was talking about earlier, how we are going to track these distances as we go along in the algorithm. And so if you’re implementing this in code, you probably just have some sort of object in memory that you are updating as you go along, but because we aren’t doing this in code, we’re just talking it through. I like to imagine it as a little table and we’re just going to like update it as we go.

[00:08:00] SY: Okay.

[00:08:00] VJ: And this is kind of like our cache of information. And what’s really nice about this is if we ran Dijkstra’s algorithm on this graph and nothing about this graph changed, we could just use this cheat sheet and get all the important information and we don’t really need to think about the graph again, right? Because once we run through the algorithm and we have all of our shortest distances at the end of this episode, we basically know like the shortest way to get from our starting node to anywhere. So what we need is like our cache/cheat sheet/table. So maybe we should describe that first before we really start running through this algorithm.

[00:08:37] SY: Yes. So what are the columns of our table?

[00:08:40] VJ: Column number one is whether or not we have visited a node. And this is pretty simple because basically we’re going to have a row for every single node and for each node when we visit it, we want to mark it as visited. So we know not to repeat ourselves. So column one is basically like, is it visited or not?

[00:09:00] SY: Okay. Cool.

[00:09:02] VJ: Column two is, what node are we visiting? So if we imagine that we have a row for every node, each row will have the value of the node. So for example, Node B, Node C, Node D, Node E, we will have five rows, and in this column, we’ll just have the name of the node so we can keep track of what node we’re looking at.

[00:09:24] SY: Okay. Cool. Next column.

[00:09:27] VJ: The next column is going to be where we’re going to record the shortest known distance from our starting node. And I think the last episode we started with A, do we want to start with A again?

[00:09:39] SY: Yes.

[00:09:41] VJ: In this case, this column is where we’re going to store the shortest known distance to each node from A, because A is our starting node.

[00:09:49] SY: Right. Okay.

[00:09:51] VJ: And when we start out, this column actually we’ll have some values in it and we’ll get to that in a minute. The last column is also important. It’s the previous vertex to get to the shortest path.

[00:10:06] SY: Okay.

[00:10:07] VJ: So right now the previous vertex is going to be empty because we haven’t actually started this algorithm, but eventually we will fill it and that’s where we’re going to update the vertex of how we figured out the shortest distance to a node.

[00:10:20] SY: Yeah. We want previous vertex because we want to know where we came from.

[00:10:24] VJ: Exactly.

[00:10:25] SY: Okay. So you mentioned that the column for shortest distance was going to be filled out before we really start traversing and going anywhere. What would be the values for that column?

[00:10:37] VJ: So initially, if we’re starting with Node A, the only thing we really know is how to get to know to Node A and that’s because we’re starting with it. And the shortest known distance to A from A is zero because you are literally at the starting node. So there is no distance from A to A because you’re there. So the value in the first row for Node A is going to be zero. However, every other node in our graph, we don’t know anything about it. Everything’s very unknown. It’s a dark abyss. It’s very spooky. So because we don’t know how far it takes to get from Node A to anything else or what the shortest possible path is, all the other nodes, their shortest known distance from A is infinity because we literally have no information to go on.

[00:11:31] SY: Oh, interesting.

[00:11:32] VJ: It could really be infinity. We will update it as we go along. But to start, it’s going to be infinity.

[00:11:37] SY: All right. So we are starting with Node A and I guess we’re going to be updating our different columns. So what do we do first?

[00:11:46] VJ: So the first thing we’re going to do, we’re going to visit Node A.

[00:11:50] SY: Yes.

[00:11:50] VJ: And the first thing we get to do is update that it’s visited, which means in the column where we’re recording if a node is visited or not, right now, all of them are not visited, but we’re finally starting this algorithm. We’re visiting Node A, so we can mark it as visited and say, “Yes, it’s been visited,” in the visited column. Now we know that after we visit a node, we also need to check who its neighbors are and we also need to calculate the distance to get to those neighboring nodes. So we need to look at our graph and see first, who are A’s neighbors.

[00:12:27] SY: Yeah.

[00:12:27] VJ: And do we have a shorter path than what we already know for both of them.

[00:12:32] SY: Okay. Cool. So the nearest neighbors for A are C and B because remember they make up our little triangle roof.

[00:12:39] VJ: They’re the only neighbors really.

[00:12:41] SY: Yeah, that’s true. They’re the only neighbors. But there’s something that we didn’t tell you. We didn’t tell you that to get from A to C costs us three. And then to get from A to B costs us seven, which is very important. So knowing that, I would update my, let’s see, what would I do? I would go to my Vertex B column and I would say, “The shortest assistance from A is seven.” And then I would, I guess, I can update my previous vertex column too, right?

[00:13:16] VJ: Yeah. So you would go to the row that has B in it.

[00:13:19] SY: Yeah.

[00:13:19] VJ: And you would say, “What is my currently known distance from A to B?” And currently it’s infinity. Except now, aha, you’ve found a shorter path.

[00:13:29] SY: Right.

[00:13:30] VJ: And now you can update it.

[00:13:31] SY: So we update that to seven, and then in that same row, we update previous vertex to A because that’s where we just came from. Okay.

[00:13:40] VJ: So basically you’ve recorded one important piece of information in this step. You’ve recorded that the shortest known distance from A to B is seven and the shortest like the least cost to get to B is seven and the least cost comes from A. That’s what that previous vertex is because right now it seems like a little silly. We’re like, “Oh, obviously it’s from A to B.” But if we find another shorter path to B, then now we need to know, how do you get to B from there?

[00:14:09] SY: Right.

[00:14:09] VJ: Like what node will get us the shortest distance. So that’s why we’re keeping track of that.

[00:14:14] SY: So we have the other nearest neighbor, which is C, and to get from A to C costs us three. So then we go to the row with the Node C in it. We see that the current shortest distance is infinity, but we just found a new shorter distance, which is three. So we can update that column to B three. And then for previous vertex, we can update that to say A since we just came from A.

[00:14:44] VJ: Yup. You got it. And we’re basically done dealing with Node A.

[00:14:49] SY: Right.

[00:14:50] VJ: We sort of did all the important steps.

[00:14:53] SY: Right. Right. Right. Yeah. We walked through those four steps. Okay. That wasn’t too bad. Okay. So now we have to pick which node we go to next. Now based on the table, we know that it takes or it costs us seven to get to B, but it only costs us three to get to C. So the next node I want to visit is C.

[00:15:12] VJ: Right. And this is because of our first rule in Dijkstra’s algorithm, which is that whenever we’re visiting a node, we choose the node with the smallest known distance.

[00:15:21] SY: Right.

[00:15:22] VJ: In this case, that’s C.

[00:15:24] SY: Okay. Cool. So C, we are now going to look at what are the neighboring knows that we haven’t visited yet. So we haven’t visited B yet. Remember we’ve looked over at B as a neighbor. We haven’t actually gone to B, and then we have Node D, which is kind of making up our wall, like our side of the house. So we have our two nodes, B and D. Now to go from C to B costs us one. To go from C to D costs us two. So in our table, we’re going to go to row B and we’re going to look at the last shortest distance that we have. And the last shortest distance, the value that we have for that is seven because remember to get from A to B costs seven. But now to get from A to B through C costs us a total of four because to get from A to C is three and then C to B is one. So we add those together, we get four.

[00:16:22] VJ: Yeah. And now you’ve found, like you’ve done the work of cumulatively… oh, that’s a hard word. Now you’ve done the work of cumulatively figuring out the path from A to C to B.

[00:16:36] SY: Right.

[00:16:36] VJ: And you’ve figured out that that path is shorter than the one we have recorded because seven was how we got from A to B, but it turns out A to C to B is only four and so now we’ve figured out a shorter known path. And actually we did this sort of last episode and that’s when you asked me, “Okay, this seems easy. Why are we doing this ever?” And then I was like, “Wait until it gets hard with big graphs.”

[00:17:02] SY: It’s true. And now we got our little house to dust it on. Okay. So I’m going to update my value for shortest distance from A for the row B. I’m going to update that value to four and I’m going to update my previous vertex column to B, C because now I’m coming from C.

[00:17:21] VJ: Exactly.

[00:17:23] SY: Okay. Can I do next one?

[00:17:24] VJ: Yeah. Do it. You’re on a roll. I love it.

[00:17:26] SY: I’m on a roll. Okay. So now we’re going to look at our nearest neighbor D. And actually, we haven’t talked about D yet, right? I’m looking at our table and we don’t have any value. Well, we have infinity for shortest distance from A. Okay. Let’s see if we can update that. So to get from C to D costs us two and to get from A to C to D costs us a total of five because A to C is three, C to D is two. So three plus two equals five. And that is much shorter than infinity. So we’re going to go to our D row and we’re going to update our shortest distance column to B five. In our previous vertex to B, C because we just came from C.

[00:18:16] VJ: And now basically we’ve only visited two nodes. We visited A and then now we’re visiting C, but we’ve already found some short paths to get to B, C, and D just through this, like we’re not even halfway through the algorithm. We’re like two-fifths away.

[00:18:35] SY: SO now we are at Node C and we’re trying to figure out, should we go to Node B or should we go to Node D? Now to go from C to B costs us one. To go from C to D costs us two. We’re going to pick the shortest one, the shortest distance, the shortest path. So we’re going to go to B.

[00:18:52] VJ: Yup. And by go to we mean visit because we basically are done with C, right? We visited C. We checked out its neighbors. We updated the shorter paths. So now the next thing to do is sort of start all over.

[00:19:05] SY: Yup.

[00:19:06] VJ: Pick the node that has the shortest cost, the least weight associated with it. Go visit that. In this case, it’s B.

[00:19:14] SY: Okay. So we’re at Node B. So we’re starting all over again. We’re going to look at its nearest neighbors, D and E, because remember B is at the bottom of my roof, connecting to my crossbeam, D, and my foundation, E. So now we’re going to figure out how much does it cost us to get to each of these nodes. So to get from B to E costs us six.

[00:19:40] VJ: It costs us six, but how much does it actually cost to get to B itself? There’s a price associated with that.

[00:19:47] SY: That’s true. That’s true.

[00:19:48] VJ: So really it costs us six to get from B to E, but we have to first get to B, right? Because we’re starting from A. So we need to sort of cumulatively think about this. So to get to B, it costs us four, and we know that because we have that recorded in our table. The shortest known distance to B from A is currently four. So we have four. And then if we want to get to E, we need to add the cost of getting from B to E, which is six. So four plus six gives us ten.

[00:20:21] SY: Okay.

[00:20:22] VJ: So that tells us to get from A to E through B currently will cost us 10.

[00:20:29] SY: Okay. Yeah.

[00:20:30] VJ: However, 10 is less than infinity.

[00:20:33] SY: That’s true.

[00:20:35] VJ: And currently in our table, we say that it costs infinity to get to E because we just have no idea. So we can actually update that, which is kind of nice.

[00:20:44] SY: Okay.

[00:20:44] VJ: We can say, “Hey! To get to E, the shortest known distance from A is not infinity. It’s actually 10.”

[00:20:52] SY: Cool.

[00:20:52] VJ: And the way we get there is through Node B. And so we put B in our previous vertex column and we change our shortest known distance from infinity to 10.

[00:21:02] SY: So now we are looking at how much it costs to get from B to D, but we really care about how much does it cost to get all the way from A to D. So we know that to get from A to B, the shortest distance is four and then to get from B to D is two. So four plus two equals six.

[00:21:23] VJ: Yeah. So the get to Node D through Node B costs us six.

[00:21:31] SY: Right.

[00:21:32] VJ: Now the question is, is this the shortest path we found?

[00:21:35] SY: It is not.

[00:21:36] VJ: Oh, it’s not. Why not?

[00:21:38] SY: No. We already have a five there because we were at Node C previously before we jumped over to B and we were looking over at its nearest neighbor, which is also D and we calculated that it would take five to get from A to D and five is less than six, and we’ve already done that math. It’s already recorded in our table. So we actually already found the shortest distance from A to D.

[00:22:05] VJ: Great. So we don’t actually care about the information.

[00:22:08] VJ: We just discovered.

[00:22:09] SY: Yeah. Interesting.

[00:22:10] VJ: Yeah. I guess that makes sense because if it costs more to get to D from B, we don’t want to know that, like we don’t ever want to take that path. We know that it’s easier to get to D from C.

[00:22:20] SY: Right. Right. So no update for row D. So we’re pretty much done with B, right? We looked at its nearest neighbors, E and. D. we made one update. We didn’t make the other one. So now we’re going to ask ourselves, which one is the shorter path? Is it going from B to E or going from B to D? Now to go from B to E costs us six and to go from B to D costs us two.

[00:22:45] VJ: Ding! Ding! Ding! It’s D.

[00:22:49] SY: Surprise! Okay. So now we’re going to hop on over to Node D and we’re going to look at its nearest neighbors that have not been visited yet. It actually has three nearest neighbors. It’s connected to the roof so it’s connected to C. It’s connected to the crossbeam, which is B, and then it’s connected to the other foundation corner, which is E, but E is the only node we have not visited yet.

[00:23:16] VJ: Yeah. That’s right. So we know that D is connected to C and B, but we don’t really need to do anything with them because we know from looking at our table, we’ve already visited them.

[00:23:26] SY: Right.

[00:23:27] VJ: So the only thing we haven’t really visited is E so we really just need to look at that edge and how much it costs.

[00:23:33] SY: Okay. Cool. So going from D to E costs us four, but really we don’t care about going from D to E. We care about going from A to E through D.

[00:23:43] VJ: Yes.

[00:23:44] SY: So we can use our table to figure out what is the shortest distance from A to D. So we look at row D and we will find the value five.

[00:23:52] VJ: Which we just determined in the last round.

[00:23:56] SY: So we take that five and we add the cost to go from D to E, which is four, and we get a total of nine.

[00:24:04] VJ: Oh, wait. Nine is less than the shortest path we already know to E. Nine is less than ten. We currently have 10 in our table.

[00:24:16] SY: Yes, we do.

[00:24:18] VJ: It turns out there's a better way to get to E than what we knew.

[00:24:23] SY: Nice. So we go from A to E through D. That’s nine. So we go to row E. We update our shortest distance from A to B, nine, and then our previous vertex is D.

[00:24:37] VJ: Yes. Instead of B, which we previously thought was the shortest known way to get to it, but that’s not really our fault because we hadn’t finished running the algorithm.

[00:24:47] SY: Yes.

[00:24:47] VJ: It’s what we knew at the time.

[00:24:48] SY: Yes.

[00:24:49] VJ: We were sweet summer children.

[00:24:52] SY: Okay. So we’re at Node D. The only place, the only nearest neighbor that we haven’t gone to is Node E. So we’re going to hop on over to Node E. And then from there, we continue running our algorithm and we’re looking around for its nearest neighbors, but we don’t have any. We visited everybody.

[00:25:08] VJ: Yeah. It’s two neighbors, D and E, we already visited. So there’s no cost calculation. There’s nothing to do.

[00:25:14] SY: Yeah.

[00:25:15] VJ: Have a nice day. Bye. We’re done.

[00:25:19] SY: We are done visiting the house. Now you got to go. Okay. So basically if we look at this table, so what we care about is the shortest distance from A to any other node. And through Dijkstra’s algorithm, I can answer that question. I can answer it for any node so I can look at.

[00:25:35] VJ: Yeah, you can.

[00:25:35] SY: Right. I can look at B and say like, “Ooh, it costs me four to get from A to B.” That’s the shortest distance. I can look at D and say, “It costs me five to get from A to D.” I can look at E and I can say, “Oh, it costs me…” Now I can basically look at any node and I’ll know the shortest distance from A.

[00:25:54] VJ: Yeah, and it’s really powerful because we ran this algorithm once, but now you have like this documentation of every potential path you might want to take, especially if you’re concerned with the shortest path and you don’t need to run this algorithm again because we saved all that data. And again, it’s not just the shortest distance from one point to another. It’s the shortest distance from one point to every other point, which is really cool. I think that’s what makes Dijkstra’s algorithm so fun and it can be really intimidating. I was super scared of it when I first learned about it mostly because I was like, “Oh my God! What’s Dijkstra for? What is this thing?”

[00:26:33] SY: Yeah. Who is Dijkstra? What does it want? Yeah.

[00:26:38] VJ: Turns out it just wants you to get to where you’re going in the fastest way possible.

[00:26:44] SY: Oh, that’s so sweet. And that is Dijkstra’s algorithm.

[00:26:49] VJ: Hopefully it wasn’t scary.

[00:26:50] SY: Hopefully it wasn’t scary. I think it wasn’t too bad. I think once we broke it down to its four steps and we just iterate, iterate, iterate, I think it ended up just fine.

[00:26:59] VJ: Yeah, and if you get too scared, just sing the song and remember, it’s not that hard. It’s just fun. This is really just all a plug for my singing career.

[00:27:08] SY: You mean mixtape? Dropping soon.

[00:27:12] VJ: I need help with my songwriting skills.

[00:27:17] SY: And that’s the end of today’s show. If you liked what you heard, please leave us a review and make sure to check out Vaidehi’s blog post. Link is in your show notes. I also want to give a huge shout-out to Educative, the text-based online coding course platform. My producer and I got a chance to give it a try. I took “become a front-end engineer”. And Levi, what did you take?

[00:27:38] LS: I took “Learn Python from scratch”.

[00:27:41] SY: And what do you think?

[00:27:42] LS: I thought it was really great. So I’ve been learning Python a little bit and this sort of like…

[00:27:47] SY: Because I’m making you.

[00:27:48] LS: Because you’re making me. True. You’re not making me learn Python specifically.

[00:27:52] SY: That’s true.

[00:27:53] LS: But it is what I chose. So I was a little bit familiar, but I found that these courses, they’re laid out in a really intuitive way, there’s like the sections that lead seamlessly one into the other, the Python 1 goes from data types and variables to conditional statements, functions, loops, and then each section has a quiz to make sure that you’re not just blasting through and like the information is going one way and not the other.

[00:28:22] SY: I love the quizzes.

[00:28:23] LS: Yeah. It really called me out on my BS.

[00:28:25] SY: Yes.

[00:28:27] LS: I was like, “Yeah, yeah, I get it. I get it. I get it.” And then I took the quiz and they’re like, “You don’t get it.” And I was like, “Aha!”

[00:28:33] SY: You got me.

[00:28:34] LS: You got me. And then throughout all of these different sorts of sections, you can code within the service itself. So you don’t need like an external coding thing. I should know what that’s called. Do you know what that’s called?

[00:28:50] SY: I’m not going to tell you. I’m not going to give you an IDE.

[00:28:51] LS: No. Yes. That’s what it says, an IDE. Did you know I’m a producer for a coding podcast?

[00:28:58] SY: A technical podcast.

[00:29:00] LS: Yeah.

[00:29:00] SY: Two actually, two technical podcasts.

[00:29:02] LS: That’s true.

[00:29:03] SY: So if you are interested in learning how to code, make sure to check out Educative and you can actually get 20% off by going to educative.io/basecs. That’s B-A-S-E-C-S. Check it out. This episode was edited and mixed by Levi Sharpe.

[00:29:20] VJ: Bye everyone.

[00:29:21] SY: Thanks for listening. See you next week.

Thank you for supporting the show!

Thank you for supporting the show!