[MUSIC] One, two, three, four. Oh, hey. This week is about counting, so I, I need to use my fingers to count. These guys are a little bit better than I am. But this is an important topic, okay. And this seems silly right? Counting on my fingers, 'kay, why is counting important? And I think that's what we want to talk about here. And Joe what, how about you tell us why you think counting is important. >> First thing I just want to point is I can actually count to five. Scott got to four and ran out of gas. [LAUGH] So, I'm actually, and I, I bet, Louay probably can go to like six or seven in terms of that. [LAUGH] So why is counting important? So when you write code, when you click Run, something happens, and sometimes good things happen, sometimes bad things happen. And so part of this class' purpose is for you to understand what's going on when you write your code. Now, you don't have to understand at, like, incredible detail, but what you really need to do is develop some intuition about, what are practices that are going to turn out and lead you to a good result? What are practices that are going to lead to a bad result? For example, we talked about the importance of programming. I can't tell you every particular thing that goes on in a computer when you hit Run, but I can predict with fairly high accuracy what happens when I click the Run button for a particular program that I write. And I've developed a little bit of intuition that shouldn't be too hard for you to pick up, which will allow you to also predict, kind of what happens when you click Run on your computer. >> And I use my intuition as well, but I'm guessing that Louay, you know, he never uses intuition. That's not accurate enough for him, right? [LAUGH]. >> Yeah, so I use actually mathematics, which Scott cannot deal with, so we have this is why they introduced me into the sequence just so they can remedy stuff problem here. >> [LAUGH]. >> So the thing is that if I, if I ask you, what, how long would the program takes in terms of running time? How long a program takes in, in terms of running time, you might say five hours, five minutes, so in the sense that you think about once I run it, once I hit Enter and the program is running, how long does it take until the program terminates and gives us the output? Okay, but what if the program takes ten years to finish, right? We are now in the, in the era of big data, and, and, and computer scientists are running code on very large data sets, and you can write code that, once you run it, it might take ten years to finish. So are we going to wait ten years, until we know that it took ten years? So what we are talking about here, why, the importance of counting is that, we want to be able to get an estimate of how long the program would take before we even run it. Because, again, if it's going to take ten years and we cannot wait for ten years, we shouldn't be implementing it and running it, right? So the, the emphasis will be on, how do we use mathematical tools to get an estimate of the running time over an algorithm before it is implemented and run. >> So, this week, my goal is to be able to count to five. >> So, I, I'll actually add a comment on there, which I think is something that you'll see in this particular week, which is, Louay talked about it. Just, you click Run and it takes ten minutes, but that's really, there's a more fine grained analysis that we can do, and it doesn't have to be serious, which is, your, your program takes input, and that input has some size, maybe it's how big a number is, how many numbers are in a list, and when you click Run, your program does something with that data. And really what goes on is, your program typically does some computations depending on the structure of the data, and the time it takes to execute your program often depends on the size of your input. So you'll see, when you get to Louay's class, he's going to make this concept very precise. In this class we're going to just kind of settle for what I would call a ballpark estimate, which is, for example, what happens if we double the size of our input data? Do we double the time it takes to run our program? Maybe we quadruple it. Maybe we square the running time, 'kay? That's probably not going to be a very good computation. So when we, when Louay talks about ti, things that take ten years to run, one thing you should take into mind is, okay, on what? What kind of input do you have? So we're going to start this process of making some kind of formal, formal analysis with this, that then Louay will really actually kind of firm up an algorithmic thinking for helping you to understand kind of what the efficiency is attached to the code you're writing. >> This week we're going to actually step back, we're going to look at counting. We're going to actually try to count variety of different functions, and then we're going to try and give you this intuition, okay? We'll get back to Louay, and we'll get more mathematical formalisms later. >> How high can you count, Louay, by the way? >> Hm? >> How high can you count? >> I think ten, 15, [LAUGH] something like that. [LAUGH]