In this lecture I want to go over mental models a mental model for me is an abstract picture in my head
that completely sums up an idea or a concept.
It's an easier way of remembering and understanding something.
For example let me draw my mental model for her gamming in general.
So in my head I have this picture of a box in that box label Tran's for
on the left.
I usually have lines in the label this inputs or data
in on the right.
I have the output
or results.
It's a very simple picture but in fact it represents at least to me what programming is.
You have this box that I label transport and this transform is really
the algorithm.
Now we have been talking about it will take that data or the input and transform it somehow into the
output or result that we want.
Now you may ask why is this useful.
Anytime you get stuck on a problem or I don't know how to program something I can always go back and
think about this mental model in my head and ask myself what do I want the result to be.
Is always the first thing I think and then I'll skip the algorithms and transport part and all think
OK.
What do I have as the date.
OK.
Can I have and then I'll think about the output.
Because if I know what I want the result to be and I know what kind of data should be in input into
my algorithm Usually that makes or at least clears up the algorithm enough so I know how to start.
So for example in our gaves let's say we want the player to move to the right
that is the result.
Well what is our data but say we have keyboard
and the key we care about is the right key
and we have a player let's say.
And in that player we have his position.
And maybe his velocity
and of course since we have velocity will probably need time because velocities product time.
So we know then that somehow we need to map the keyboard right.
He to somehow change the position and velocity of where.
So you see how this really helps you demystify the algorithm that we need to write.
And later in the course I'll be showing you more of my mental models for different concepts that will
go over in the next lecture will finally start coming up with a language to start to make these algorithms.