Skip to 0 minutes and 9 seconds[SOUND] So now we're gonna talk about Python as a programming language. You probably noticed that I'm wearing a sorting hat. The reason I'm wearing a sorting hat is that where I work at the University of Michigan School of Information. We are in a building called the North Quad, and you can look it up on Google and find a picture of it if you like. And I think it's designed to be like Hogwarts. It's got a little center, it's got this outside bit. It's got a really cool cafeteria that looks like owls might fly through it. And so we moved to this a few years back when I started teaching Python.
Skip to 0 minutes and 50 secondsAnd I was teaching my very, very first class in this building which we sort of lovingly call Quadwarts cuz it's North Quad. And we thought it was kinda like Hogwarts. And so I'm joking, and I wore my robes to class. And I said, welcome to QuadWorks and you have to wear your robes every time to class, and I was being funny. And I said, okay, it's our first class, we're teaching Python, and let's do a sorting ceremony. I didn't have the sorting hat back then, so I have a sorting hat now. And so that's cool, and I'm like, I think I'm going to be in Gryffindor. And they told me, the students said I couldn't be in Gryffindor.
Skip to 1 minute and 34 secondsAnd I'm like, why can't I be in Gryffindor? Everybody wants to be in Gryffindor. And they told me that I was teaching Python. Python is a programming language that's based on a snake. And even worse, my name's Charles Severance, and I'm like Severus Snape. And so they basically told me that I had to be in Slytherin. And so, since then, I've bought many Slytherin items, I got Slytherin wands. When I graduate, you'll see my Slytherin wand, I got a sorting hat. So you'll see me drinking tea throughout the class.
Skip to 2 minutes and 12 secondsFrom my Slytherin cup, and so I guess I'm just doomed to be in Slytherin. I don't know if that means I'm a good guy or a bad guy, or a good guy that seems like a bad guy, or a bad guy that turns to be a, right, it's a lot of books. So the whole thing about being in Slytherin is that you can talk to snakes, because you can talk this weird language that others don't understand. Python's like that, Python's a language that most don't understand. You, of course, will begin to understand. It's a weird language, it's strange. It's not easily understood by others. We call ourselves Pythonistas.
Skip to 2 minutes and 50 secondsAnd Guido van Rossum, over 20 years ago, invented this Python language that we have grown to know and love, and has become so important. And while I'm going through all this snake stuff, it turns out that that is not at all why Python was named Python. Python was not named for a snake, even though we use the snake motif all the time. It turns out that what Python was named for was Monty Python's Flying Circus. And the reason was, is that Guido was trying to capture an air of play. Most programming languages in the 80s, when Python started, were very, very serious, and very complex.
Skip to 3 minutes and 30 secondsAnd you had to be really serious to figure them out, a lot of math geniuses. And Guido thought, I could probably write a programming language that wouldn't be that hard, would be fun actually, would be enjoyable to use. But let's not make it bad, let's not make it weak, let's make it both powerful and enjoyable. And so that's why Python turns out to be such a perfect language to use as your first programming language, is that it's designed to be your first programming language, but it's also powerful. So many times you build a first programming language that's weak and not capable of doing a lot of stuff. But Python has this wonderful easy to learn, and powerful and useful.
Skip to 4 minutes and 10 secondsAnd so there we are, welcome to being a Pythonista. Now, As you learn Python, remember you're talking to a snake and this is a language that you don't already know. You are going to make lots of mistakes. And the computer is going to seem to judge your mistakes harshly. You will learn the word, syntax error a lot. And if you are like me, I mean I think back to the first time that I was programming, I was typing stuff on cards. And you'd bring your card deck up and you would hand it to the computer, and you'd read it through the computer. And then the computer would come back and say syntax error.
Skip to 4 minutes and 52 secondsAnd sometimes it took several hours to get back the results of your program. You're gonna get to do it in seconds, but in the old days, when I was young, it took hours sometimes. And then all you get back is the syntax error. And when I first started programming, I grew to kind of hate the creature that lived inside the computer, because I thought that the creature didn't like me. I thought the creature was value judging my programs. I mean, I would write this thing and I think it's perfect. And I would hand it in, and the computer would say syntax error. I'm like?
Skip to 5 minutes and 25 secondsWhat's up, syntax error, and then I would like, okay I'll make my program better and here you go. It'd say syntax error again. And the thing that you're going to have to learn is that,
Skip to 5 minutes and 38 secondsSyntax error doesn't mean that Python thinks you're bad. It is not a judgement of your ability as a programmer. It is not a judgement of your potential to be a programmer. Syntax error means that Python is lost. You are learning Python's language because Python can't learn your language. You're smarter than Python, we can teach you, you can learn but Python can't. So when it says syntax error even though you feel like it's a rejection. Syntax error simply means that python is lost. It just doesn't have really friendly words when it's lost, it just goes syntax error, which literally is exactly what's happening. Your syntax is not something that Python does, it's not something that Python understands.
Skip to 6 minutes and 25 secondsSo just understand as you go through the next couple of weeks that you will be frustrated. It's not because you're a bad person, it's not because you're never going to figure it out. You will figure it out and you will get it. And you have to sort of trust us as we go through the first few weeks and learn the basics. And then as we connect the basics together, then this thing will make a lot more sense. I remember when I was first learning to program, I would be like, lost, lost, lost, lost, lost. Wow I love this. And I expect that many of you will go through that exact same feeling, so you have to trust us.
Skip to 7 minutes and 1 secondSo up next we're actually going to talk about the Python programming language.