WEBVTT

00:01.400 --> 00:08.960
In this lecture I want to go over mental models a mental model for me is an abstract picture in my head

00:09.290 --> 00:13.210
that completely sums up an idea or a concept.

00:13.280 --> 00:17.870
It's an easier way of remembering and understanding something.

00:17.940 --> 00:24.430
For example let me draw my mental model for her gamming in general.

00:24.480 --> 00:35.270
So in my head I have this picture of a box in that box label Tran's for

00:39.620 --> 00:41.290
on the left.

00:41.570 --> 00:49.950
I usually have lines in the label this inputs or data

00:54.130 --> 00:55.390
in on the right.

00:55.810 --> 00:57.430
I have the output

01:00.010 --> 01:09.080
or results.

01:09.130 --> 01:16.090
It's a very simple picture but in fact it represents at least to me what programming is.

01:16.090 --> 01:23.240
You have this box that I label transport and this transform is really

01:25.760 --> 01:27.480
the algorithm.

01:31.360 --> 01:43.810
Now we have been talking about it will take that data or the input and transform it somehow into the

01:43.900 --> 01:47.460
output or result that we want.

01:47.460 --> 01:50.620
Now you may ask why is this useful.

01:51.560 --> 01:58.520
Anytime you get stuck on a problem or I don't know how to program something I can always go back and

01:58.520 --> 02:04.670
think about this mental model in my head and ask myself what do I want the result to be.

02:04.700 --> 02:14.000
Is always the first thing I think and then I'll skip the algorithms and transport part and all think

02:14.080 --> 02:14.750
OK.

02:15.570 --> 02:17.160
What do I have as the date.

02:17.220 --> 02:18.160
OK.

02:18.210 --> 02:24.750
Can I have and then I'll think about the output.

02:24.850 --> 02:34.260
Because if I know what I want the result to be and I know what kind of data should be in input into

02:34.500 --> 02:43.300
my algorithm Usually that makes or at least clears up the algorithm enough so I know how to start.

02:43.300 --> 02:57.220
So for example in our gaves let's say we want the player to move to the right

03:00.070 --> 03:01.740
that is the result.

03:03.300 --> 03:10.110
Well what is our data but say we have keyboard

03:16.100 --> 03:19.490
and the key we care about is the right key

03:24.200 --> 03:28.040
and we have a player let's say.

03:28.040 --> 03:31.810
And in that player we have his position.

03:34.940 --> 03:36.860
And maybe his velocity

03:42.890 --> 03:52.360
and of course since we have velocity will probably need time because velocities product time.

03:52.450 --> 03:59.040
So we know then that somehow we need to map the keyboard right.

03:59.040 --> 04:07.250
He to somehow change the position and velocity of where.

04:07.270 --> 04:14.960
So you see how this really helps you demystify the algorithm that we need to write.

04:15.460 --> 04:21.610
And later in the course I'll be showing you more of my mental models for different concepts that will

04:21.610 --> 04:31.770
go over in the next lecture will finally start coming up with a language to start to make these algorithms.
