This course has been updated! We now recommend you take the The Good Parts of JavaScript and the Web course.

Check out a free preview of the full JavaScript the Good Parts course:
The "The Way We Think" Lesson is part of the full, JavaScript the Good Parts course featured in this preview video. Here's what you'd learn in this lesson:

Our process of thought stems from two separate systems: System 1: Our Gut and System 2: Our Head. Visual processing is something human brains do better than the fastest super-computers. However visual processing can create conflicts between our two different systems. An illusion is an example of what is seen by System 1 (our gut) but may not make sense logically to system two (our head). Advertisers have always attempted to sell products to our Gut not to our Head. They try to appeal to us visually, not logically.

Get Unlimited Access Now

Transcript from the "The Way We Think" Lesson

>> [MUSIC]

>> Douglas Crockford: So we're gonna start with programming style and your brain. Now this is two topics which would appear to have nothing to do with each other, right? Programming style is the part of a program that a compiler ignores. So a lot of feeling is, well, it doesn't matter what you do in terms of style because it's not significant.

[00:00:26] You can do anything you want, in one style's as good as another. I'm gonna try to convince you that that is not true. Some styles are profoundly better than others, and I'll show you why. Your brain is that big wad of meat in your skull that you think with.

[00:00:44] How are these topics connected? Well, turns out they are connected in a really interesting and unexpected way. So I'm gonna be misrepresenting the work of Daniel Kahneman, the noble winning psychologist. Nobel doesn't give it an award for psychology, so they gave him the award for economics, but he's not an economist.

[00:01:05] He showed that one of the fundamental assumptions of economics is not true, which is that any party can be expected to pursue its own best interest. He shows that this is not necessarily the case if a party is a human being, because people do not think the way economists think we think.

[00:01:23] In fact, generally, we don't think the way we think we think. The more you study Kahneman, the more surprised you are that we ever get anything done. Because what we're actually doing is really different than what we imagine we're doing. So Kahneman described a model of gut involving two systems.

[00:01:43] The are system two which is the higher level thing it's analytical, it's where we do reasoning, where we do logic, where we do mathematics. It's amazingly powerful but it's really slow. And because it's slow we had to invent computers, because we can't rely on this sack of meat to generate all the numbers that we need.

[00:02:09] It's just not fast enough. It requires a lot of effort but we have thought of amazing things using system two. And system one is associated, it's theoristic, it's very fast, it's approximate, and you cannot turn it off, it is always running all the time. And what it does is, it will recognize a problem that's too complicated for to handle, and it will instead solve a simpler problem.

[00:02:38] Which is easier for it to solve and supply that as the result. And it's approximate, so it's often right enough and everything goes, and sometimes it's just completely wrong, but that's how it works. Now everybody is aware of this, you can think of system two as being the head, and system one as being the guts.

[00:03:00] And we're always saying things my heads telling me this, my guts telling me that. So that's not new, the thing that's new is the connection between the two. It turns out that system one provides the working assumptions to system two. And system two is unaware that, that happens.

[00:03:19] And as you know, if you have any logical system with invalid inputs, you're likely to get invalid outputs. And because system one is approximate, that happens all the time, and we're not aware of it. So let me give you an example of this, from visual processing. Visual processing is the opposite of computer graphics, it's where you take a signal from a camera.

[00:03:44] And analyse all the pixels, and try to like identify all of the objects in the scene, and how they're all moving relative to each other. This turns out to be a really important, skill for any animal, right? Because you're moving through the environment and you need to recognize what you can eat, and what's coming after you, and ways to safety and all that.

[00:04:04] And you need to solve those problems really fast. Super computers have a really hard time doing this. But we all do it all the time without even thinking about it. For us it's an easy problem, this is like a system one kind of thing. And it does that by not solving the hard problem, and instead solving easier problems.

[00:04:25] And sometimes that causes incorrect results. So this is an optical illusion designed by Edward Addison of MIT, we've got a chess board or checker board with white squares and black squares. And there's a cylinder on there, and two of the squares are labeled A and B. And it turns out A and B are exactly the same color.

[00:04:46] You can take this image, and put it in Photoshop, and put the dipper on them, and they are both exactly the same pixel value. Some of you may have trouble seeing that because one is obviously black, and one is obviously white, but they are both exactly the same.

[00:04:59] So to demonstrate that, I'm dropping a solid colored square to connect them, and you can see there's no break, they are the same color. Now some of you may be seeing a gradient there, does anybody see a gradient. Your brain is lying to you, you know the truth of this image that is a solid card square.

[00:05:18] There's another system in your head which is trying to deal with inconsistency. And that turns out to be really important, because if a computer system becomes inconsistent, there is a really good chance it's gonna fall over, right? And so we work really hard in our programs to try to keep everything consistent.

[00:05:39] But here is a place where we are inconsistent, we already says one thing, and our algorithm say another in a wrong. So we get this kind of thing, and so we are inventing the gradient in order to try to make sense out of this. And we do this all the time, not just individual system, but in all of the stuff that we're doing.

[00:06:01] So you listen to like political debates in how can we be this is what's going on, okay? That we will reject the evidence of our eyes if it's inconsistent with what we're thinking. And so we are really good at filtering stuff coming from the world, and trying to make sense out of it, and sometimes we're doing the opposite.

[00:06:22] So turned out this was not news to the advertising industry. They had known for long before Kahneman about how we think. And that they could draft messages, and have bypass the head and go straight to the gut, and convince us that we desperately want things that we don't need.

[00:06:40] They've been doing this for years and years. And you can see once you recognize it, it's everywhere. When you walk into a store, you see lots of products for 199, you never see something for 201, right? There's only 1% difference there, it's not a significant difference. But the gut goes, that's a great deal.

[00:07:01] Whereas 201, that's a terrible deal, okay? And so most of us shop with our guts, that's how pricing's done. The advertisers have always known this. And nobody was better at this than the tobacco industry. Cuz you think about, how do you sell tobacco? Okay, what does tobacco do?

[00:07:21] It makes you smell bad, it turns your teeth yellow, it makes you sick, and then it kills you, okay? So how do you sell a product like that?
>> Class: [LAUGH]
>> Douglas Crockford: You're not selling to the head, right? The head is not gonna buy that, you sell it to the gut.

[00:07:35] You can present images which are confusing but pleasant and acceptable, and the gut will buy them. So the gut will see pictures of healthy, happy, people, and associate that. And so you can confuse the gut, it'll confuse good for you with slow death. And the tobacco industry has been doing that forever.

[00:07:58] And they're still doing it, and they're really effective at it. So we still have people continuing to smoke and to start smoking. Despite all of our knowledge that it's very easy to get system one to override reason, and fact, and knowledge about something. And system two were actually work against you in some cases.

[00:08:21] Like you can ask a smoker, why do you smoke? And so why do you? That's an analytical question. So that engages system two, but the input is smoking is obviously good for me. So system two will start rationalizing and coming up with reasons.I really enjoy the flavor of burning weeds in my mouth 20 times a day.

[00:08:44] I really need to experience that, and thinking hotter it makes me popular. They can say that sitting in a restaurant where all the healthy good smelling people are trying to get away from them, so stink doesn't get in their food. You can say it makes me popular while seeing everybody running away.

[00:09:00] That sort of the way we work.