Subtitles section Play video Print subtitles SEAN WALKER: Hello everyone, good afternoon. This is CS50, week 1, slash week 0, part 1, depending on how you're counting things. I'm Sean Walker. I'm a senior in Hopper, and I am your head teaching assistant. JANA VRANES: Hi everyone, my name is Jana. I'm the head course assistant for CS50 this year. SEAN WALKER: So yeah, we'll be seeing you guys in office hours. I'll be maybe seeing some of you in section. Can't wait to start the semester. We're very excited. There's so much cool things in store for you this semester, including this Saturday, there is a great event-- one of my favorite of the year-- which is called Puzzle Day. And maybe Jana will tell you a little bit more about that. JANA VRANES: So every year, CS50 partners with Facebook to organize Puzzle Day. Puzzle Day is this really fun event we put together. It's basically just like a fun afternoon slash evening that you can spend solving puzzles with your friends. This event is-- of course, all of you are invited and encouraged to come, but it's also open to anyone from Yale. So please feel free to bring your friends, bring your roommate. And the puzzles aren't CS50 or CS-related. So it's really open to everyone. And we will have super-cool prizes for the winners of the event, as well as a raffle. So yeah, make sure to come. It's this Saturday. It's going to be in Hillhouse 17, which I'm sure most of you know where it is. Yeah, it's right up there. And then one more announcement we have is that, next week, in the same time slot, Benedict, who is our professor of CS50 here at Yale, will be holding a-- he's right over there-- he'll be holding a hot takes CS50 tutorial right here in this room, from 4:00 to 5:15. So if you can come, please do. It's going to be just a lot of helpful advice, things you should know about the course. But it also should be recorded and available online if you can't come. Thank you, everyone. Have a great semester. [APPLAUSE] DAVID MALAN: So good to see everyone again. So this is a continuation of where we left off last week. Which, recall, was a look at computational thinking, where we tried to more methodically start thinking about problems, and start to leverage some of the intuition that you might have had with things like phone books and the like, to start solving more interesting problems. And in fact, Puzzle Day is ultimately about exactly that-- problem-solving. And indeed, as Jana said, it's not about computer science. There's no computers even required, or programming required. It really is just about taking input and producing outputs. And in this case, the inputs are the puzzles themselves. The outputs might very well be some fabulous prizes. But it really is meant to be an opportunity to bring you and some of your classmates together right at the start of the term, whether they're taking or not taking CS50, and really just think hard about some interesting, fun problems, and then sort of delight at the end as to who got as many of them as possible. But you'll recall that when we started framing problem-solving like this, it first required that we represent those inputs and outputs. And there's any number of ways we can represent inputs to problems. Like the number of people in this room, that's an input-- each of the bodies in this room. And we could count them sort of old-school like we did last time, or perhaps a little more methodically. We might think of the inputs, though, not as being physical as much as they are digital. Right? Recall, we introduced binary, which really is just an abstraction on top of electricity-- either being there or not being there, one or zero, true or false. And so we came up with a number of ways last time to represent information and recall this theme of abstraction we had the electricity sort of literally at the ground floor, then we had this layer of binary-- zeros and ones-- above it. From there, we could represent decimal, and another base system if we wanted. We could represent letters through ASCII, or we could represent emoji through Unicode. If we just thought about those bits in a different way, we could actually use the same zeros and ones to represent colors. And from colors, we get pictures. And from pictures, we get movies. And so there is this sort of hierarchy, this layering of one concept on another, so that we can start thinking about problems at this level, and just take for granted that someone else before us figured out how to actually map it to physical things like computers. So where does that leave us? Well turns out abstraction can be both useful and not so useful. And I thought we could explore this by way of just a couple of problems. The first of these requires that we take advantage of the white pieces of paper that hopefully you're holding in your hand. If you don't, any piece of notepaper suffices. Or just raise your hand, or one of us can run over with a piece of paper. You just need that plus a pen or pencil. And if we could ask for one brave volunteer who's comfy appearing on stage and the internet, we need you to come on up for just a moment. Can't distinguish hands asking for paper or hands asking for volunteer-- volunteer? Yeah, OK, come on up. What's your name? AUDIENCE: John DAVID MALAN: John, nice to meet you, David. All right, so John here is going to see in just a moment a picture. And John is then going to take on the role of a programmer, if you will, an expessify, step-by-step, how you all, as the computers, if you will, will execute that program by applying pen or pencil to paper. And the goal is for John to be as precise and as explicit as possible. You can say anything you want, but you can't make any physical gestures. And the goal is for all of us to transcribe, perfectly, exactly what it is that John is describing. So let me go ahead here and just temporarily mute my image, if I may, so that John and only John and I know what the picture is. And I'm going to ask that you draw this for the audience, verbally. Execute. And go ahead and right it into here. OK, just don't hit the keys, or this will spoil something. AUDIENCE: So start with the vertical line down the middle. DAVID MALAN: OK, a little louder. AUDIENCE: Start with the vertical line down the middle. Then two lines jutting out from the bottom-- well, start with one line at the right side, at an angle, about 30 degrees up-- 30 degrees from the horizontal. Just draw a line from the right, and then do the same thing on the left side. All the lines should be equal length. DAVID MALAN: By the way. [CHUCKLING] AUDIENCE: Yeah, after the fact, yeah. Then, at the end of those two lines that you drew, draw two more vertical lines, going straight up, yeah. Then, draw lines that will connect those two previous vertical lines, and connect them at a point. Then, draw a line that connects the three vertical lines together. DAVID MALAN: Good? All right, end program. So a big round of applause for John for coming on up, if we could. Thank you. [APPLAUSE] Give me just a moment to plug back in here. All right. So, if the staff wouldn't mind, could we just collect a random-ish sample of the answers here, just grabbing a few. We don't have to grab them all. No, OK, you're refusing. OK, who's willing? No? OK. Over here, thank you. Sorry for reaching. OK, thank you. OK, thank you. OK, little shy. Thank you. OK, sure. Thank you. OK. And let me get one more from the right-hand side. Thank you. All right. Thank you very much. So suffice it to say, at quick glance, it looks like there's been a number of interpretations of what John was prescribing.