1 00:00:00,300 --> 00:00:06,660 Let's talk about our next developer fundamentals, and this one is understanding data structures. 2 00:00:08,150 --> 00:00:16,340 A really good programmer is a programmer that is able to decide what data structure to use when up until 3 00:00:16,340 --> 00:00:22,070 now we've learned about dictionaries and lists and we'll learn about a couple more throughout the course. 4 00:00:22,790 --> 00:00:28,970 But a really good programmer, a programmer who's experienced is able to understand what the tradeoffs 5 00:00:28,970 --> 00:00:30,350 are, when to use what. 6 00:00:30,650 --> 00:00:35,900 And although I can give you a list of this is when you should do this and this is when you should use 7 00:00:35,900 --> 00:00:36,900 maybe dictionaries. 8 00:00:37,430 --> 00:00:40,370 The thing is, this takes practice and experience. 9 00:00:40,700 --> 00:00:45,080 So throughout our course and then the exercises that we're going to do, the projects we're going to 10 00:00:45,080 --> 00:00:51,440 build at the end, I hope that this idea of understanding when to use what data structure makes sense 11 00:00:51,440 --> 00:00:51,760 to you. 12 00:00:52,220 --> 00:00:53,930 But let's go back to our example. 13 00:00:54,470 --> 00:00:58,490 When you use a list and when should you use a dictionary? 14 00:00:59,330 --> 00:01:07,670 Well, the first thing we have to realize that a dictionary is not sorted, write a list has order, 15 00:01:07,700 --> 00:01:12,820 it has zero one indexes, so on and so forth, a dictionary has no order. 16 00:01:13,550 --> 00:01:20,630 So maybe if you want to have a list of people in line at your shop, well, you should probably use 17 00:01:20,630 --> 00:01:21,170 a list. 18 00:01:21,230 --> 00:01:29,270 But maybe you have a user that is playing a game and that user has first name, maybe weapons, maybe 19 00:01:29,270 --> 00:01:31,640 an H that doesn't have to be ordered. 20 00:01:31,670 --> 00:01:33,410 So you might use a dictionary. 21 00:01:34,220 --> 00:01:38,480 Also, you'll notice that dictionaries hold more information than lists. 22 00:01:38,690 --> 00:01:47,570 Right, because lists only have that single value that is a list has the index and then whatever the 23 00:01:47,570 --> 00:01:48,320 value is. 24 00:01:48,890 --> 00:01:54,290 And here we have a dictionary inside of a list which is holding a lot of information. 25 00:01:54,590 --> 00:02:00,230 Deep down, a list is simply an index and some sort of a value here. 26 00:02:00,590 --> 00:02:00,980 Right. 27 00:02:01,280 --> 00:02:04,220 Versus a dictionary that holds a lot more information. 28 00:02:04,550 --> 00:02:05,790 It holds a key. 29 00:02:05,810 --> 00:02:10,220 So this could be the weapons of that user. 30 00:02:10,670 --> 00:02:11,150 Hello. 31 00:02:11,150 --> 00:02:15,170 Can be the greeting of the user maybe is. 32 00:02:17,000 --> 00:02:24,320 Magic is another information about that user, so we're able to have both keys and values in a dictionary, 33 00:02:24,320 --> 00:02:25,920 so it holds a lot more information. 34 00:02:26,840 --> 00:02:32,630 And as we learn different data structures, you'll have these different pros and cons, you'll start 35 00:02:32,630 --> 00:02:35,030 to understand as to when to use what. 36 00:02:35,780 --> 00:02:40,150 All right, there's another developer, fundamentals I'll see in the next one by.