Let's talk about our next developer fundamentals.
And this one is understanding data structures.
A really good programmer is a programmer that is able to decide what data structure to use when.
Up until now, we've learned about dictionaries and lists and we'll learn about a couple more throughout
the course.
But a really good programmer, a programmer who's experienced, is able to understand what the tradeoffs
are, when to use what.
And although I can give you a list of this is when you should do this and this is when you should use
maybe dictionaries.
The thing is, this takes practice and experience.
So throughout our course and then the exercises that we're going to do, the projects we're going to
build at the end, I hope that this idea of understanding when to use what data structure makes sense
to you.
But let's go back to our example.
When should you use a list and when should you use a dictionary?
Well, the first thing we have to realize that a dictionary is not sorted, right?
A list has order, it has zero one indexes, so on and so forth.
A dictionary has no order.
So maybe if you want to have a list of people in line your shop, well, you should probably use a list,
but maybe you have a user that is playing a game and that user has first name, maybe weapons, maybe
an H that doesn't have to be ordered.
So you might use a dictionary.
Also, you'll notice that dictionaries hold more information than lists.
Right?
Because lists only have that single value.
That is a list, has the index, and then whatever the value is.
And here we have a dictionary inside of a list which is holding a lot of information.
Deep down, a list is simply an index and some sort of value here.
Right.
Versus a dictionary that holds a lot more information.
It holds a key.
So this could be the weapons of that user.
Hello.
Can be the greeting of that user.
Maybe is.
Magic is another information about that user.
So we're able to have both keys and values in a dictionary.
So it holds a lot more information.
And as we learn different data structures, you'll have these different pros and cons, you'll start
to understand as to when to use what.
All right.
There's another developer fundamentals I'll see in the next one.
Bye bye.