[MUSIC] Greetings, I'm Professor Seth Frey. Now we're going to give you your first introduction to thinking in code. Some advanced notice on sort of what that's like, what that involves. Now there's a lot of left brain stuff, a lot of rationality. There's logic and precision. You're going to tap into your inner pedantic jerk and you're going to really learn what it means to go step by tiny step. That said, it's not all left brain stuff. There's a certain amount of letting things go that you're going to kind of get used to. So take it one thing at a time. What do I mean by logic and precision? A lot of learning to code is just like explaining things to a child. You learn that the computer only does what you tell it to, every little detail matters. If you leave out a little decimal point, a little closing parentheses, then the computer is going to do sometimes something completely different from what you intended and from what you told it to do. And so you're going to learn to tell the difference between what your intentions are inside and what's actually going on. And with your goal being to make the difference between those things, your intentions and what actually happens, smaller and smaller and smaller. And is continuous away as possible until you feel more comfortable with the sort of logic and precision required to explain things step by step to a computer. At the end of the day, you can't blame anyone but yourself and this is why I emphasize a lot of learning code is learning to thinking code. Learning to almost simulate the computer in your head so that you can really meet the computer halfway. Its meeting you halfway, Python is a lot closer than the zeros and ones that the computer is really the most comfortable with. So the computer is meeting you halfway, you meet it halfway, and you can successfully create the human computer interface necessary to get things done and code. Now a pedantic jerk is someone who's always correcting you. You say something, they know what you meant, but it's not what you said, and you said something different. And now we all know that person, I'm going to encourage you a little bit to become that person. Tap into your own inner pedantic jerk. So for example, you got told to run to the store, pick up a loaf of bread, and if they have eggs, grab a dozen. I want you to be the person that says, a dozen eggs or a dozen loaves of bread. Yeah, I know [LAUGH] it's obnoxious. It's super obnoxious, but this is [LAUGH] how you start to learn the thing. Am I saying you should be this? No, you should be able to turn it off. And the people who do that, you can tell them, save it for the code, be normal in society. Don't do this to me, you know what I meant? That's a reasonable demand to put on someone in society. Honestly, the computer came by honestly, the computer didn't know what you meant. You had to be precise, a dozen loaves of bread or a dozen eggs. Similarly, I'm driving you and we hit the intersection left or right. It's entirely rational, logical, and reasonable to answer, yes, we should either go left or right. It's a three way intersection, we just hit the end. One of the ways we're going to go is left or right, so good question. Left or right? The answer is yes. You're going to tap into this. This is part of what I mean biologic by precision by being a pedantic jerk. And what do I mean by going step by step? So let's let's call this a complex expression, 9 + 2- -3 all multiplied by 2. So solving this expression, maybe you can do it in your head, [SOUND] but the computer is going to go step by step. And for you to reach a point where your intentions are matching what's happening, you have to be able to go step by step the way the computer is going. You have to be able to imitate its process down to the tiniest little step. So rather than taking all this at once, what the computer is going to do and what you're going to get better at, it's just okay, let's just do one thing. Let's take that 2- -3, let's switch that to 5, we'll leave everything else the same. Let's turn that previous statement into this second statement. Okay, now we have the second statement. What's the smallest thing we can do? Let's add 9 and 5, but we're leaving the parentheses. Getting rid of the parentheses is a different step for the computer. So we're real, this is what I mean, we're like decomposing this and just doing the tiniest incremental thing. Things that don't seem like steps to a person are discrete steps to a computer. And recognizing that more and more and more until you get the right answer, is going to prepare you as much as possible for meeting the computer halfway. So we've got logic and precision, we've got being a pedantic jerk, we've got going step by step. These are all very rational left brain activities, but there is some right brain stuff in code. So what you're going to discover is what this code, you're eventually you get into abstraction where instead of manipulating numbers, you're manipulating units of meaning. And what your combination of those meanings means depends on the meanings of each little abstraction. But you want to remember all that so you can start to feel sometimes like there's no solid ground under you. Like you're you're building clouds on clouds, like it's a sand castle that could crumble at any moment. If you demand to know what every little abstract unit, how it decomposes down to the ones and zeros, you're just going to get overwhelmed. A lot of the beauty and power of code is the ability to work in abstractions and build new bigger abstractions for more basic abstractions. Which means taking those more basic abstractions kind of on faith and just sort of being comfortable that, yeah, I don't know what this is under the hood, but at this abstract sort of black box level. When I say black box, I know it went into it, I know it came out of it, I don't know what happened in between in the middle, but it doesn't really matter. That being able to work at that level, taking a certain amount of complexity and structure and abstraction for granted, not getting too into the details, this is actually a valuable skill and a valuable source of competence at code. So the great metaphor is going to be your car. You don't have to know how your car works to to be a good driver, to be a bad or illegal driver. You know what the steering wheel does, you don't know how it does it, you know what your parking brake does, you don't know how it does it, you're comfortable operating in these abstractions without going deeper down. Now that is arguably as much a left brain as a right brain activity. It's as much an act of creativity and creation as it is a logical procedure. And it's, again, super important basic part of learning code is assembling abstractions on top of each other. So all of these are aspects of learning the thinking code. Is this the whole thing though? This is a good sort of first step as you're dipping your toes in and getting a sense of things, tapping into your own capacity for logic, for precision, for being a pedantic jerk, but also for letting things go.