SPEAKER 1: This is CS50. So I was where you are now some years ago, and when I was a freshman at the time, I wasn't really on this path of doing computers science, of doing engineering. Indeed, I came into this place as a government concentrator. I'd been in high school a kid who liked things like history. I liked constitutional law, kind of English and math, so kind of well-rounded, but didn't necessarily know things that I hadn't been taught in high school. And so freshman year, I had this trepidation, whereby even though I liked computers, play computer games and the like, I certainly never thought of myself as a computer person, a computer scientist, and frankly, I thought my friends in high school who were taking computer science were a bit of a--geeks. And yet, when I got here on campus, there was this course, CS50, and at the time, it had this reputation of really being something to beware. It was a good course. It was a fun course. But you had to actually get that foot in the door. And even I did not cross that threshold freshman year. And I went on my way being a government concentrator, going through as many of the prerequisites as I could, cross counting things for gen ed or core and the like, and then sophomore year, for some reason, I got up the nerve to step foot in Science Center B, where CS50. A very famous computer scientist by the name of Brian Kernighan was teaching here that year, and even then, I was only willing to actually fill out my study card by taking this class pass/fail. I looked around me, and I figured everyone in this room's got to know way more about computer science, about programming, about computers. Everyone must be programming in this room since they were 12, but indeed, that wasn't the case. And so the very last day, the fifth Monday of the semester that I take this leap and change from pass/fail to a letter grade, and end up changing my concentration that same day to computer science. Now that's not our objective in this class, to turn you all into computer science concentrators, but really, to propose that there's this opportunity in this field and in other fields with which you might be quite unfamiliar, given that high schools typically follow a fairly standard curricular path, but to venture in, in CS50, into new waters. And if you are sitting here today thinking you don't actually belong, so do most of the people to your right and to your left. Indeed, last year, 76% of the students in this class had no prior experience. So contrary to what you might think, most of the people sitting around you today do not, in fact, have any prior experience. 18% have taken one CS class, and 6% have taken two or more. Meanwhile, we ask our students every year to describe themselves in terms of comfort level, and this is-- there's no one definition of this. You just kind of know it, if you're not very comfortable in CS50. And last year, we had 55% in this green pie slice here, self-describing as less comfortable students who frankly we had no idea why'd they shop the course on that first day, but the same 55% remained with us until term's end, as did 35%, who were somewhere in between those more comfortable and those less comfortable. So what is computer science? Well, in high school, and really, more generally out there these days, there's this perception or this misconception that computer science is programming. And that's absolutely one aspect of computer science, but programming, whatever the language is, is really just a tool that computer scientists use to solve problems, either in the domain of computer science or, increasingly these days, in the physical sciences, the natural sciences, in medicine, in the humanities, to analyze large sets of data. Anywhere now there is computer and data, there's an opportunity to apply lessons learned in a class like CS50. So let's solve a problem that a computer scientist might go about solving and try to put some jargon, put some conceptual framework, around what might otherwise be some fairly abstract ideas. So this is a telephone. You don't see these things too often. The college still seems to have these in the houses and dormitories, but back in the day, when you wanted to use a phone like this, there was no electronic address book in your cell phone. Rather, you pulled up something known as a phone book, and these phone books had about 1,000 pages typically. They were sorted from A to Z, and you simply had to find the right page to find the person you're looking for in order to find their name and their telephone number. Now how do you go about looking up someone in this book? Suppose my goal is to give my friend Mike Smith a call. Well, how do I go about finding Mike Smith? Well, a very reasonable approach, if naive and inefficient, would be start here, and start flipping to page four, to page five, to page six, and to sort of linearly, along a straight line, go through this phone book, and even though it's going to be incredibly tedious, if Mike Smith is in this book, I'm eventually going to reach him when I finally flip to the S section of this book. Now, of course, you don't need to be a computer scientist to know that this is a stupid way of solving this problem. What would a typical human being do? Well done. So you would flip to the middle, right? So you'd flip roughly to the middle, look here, and I seem to find myself in the M section. Okay, so M is clearly not what I'm looking for. Mike's to the right, so to speak, of this section, and as some of you have seen before, we can literally now proceed to tear this problem in a half. You really shouldn't be that impressed. Tearing it down the seam is actually not that hard. The real people do it this way, but down the seam, we now have two problems. Each of which is half as big, and we can literally throw that half of the problem away. Now we're left not with 1,000 pages, but say, 500. So now what do I do? Well, a typical human will go roughly in the middle again, and I find myself at the R section, so not quite there. So again, I can tear this problem in half. Thank you. So now I only have some 250 pages, and I can do this again, and again, and again, and go from 125 down to roughly 60, to 30, to 15, and so forth. And finally, I'll get whittled down to one of the S pages, on which, if he's in the phone book, Mike Smith should be. Now that's an obviously fairly reasonable algorithm, and it's a one-time use algorithm in this case, but what can we sort of take away from that? Well, the first approach, correct, if naive, though, it was, can be described by this straight line. So if on the x-axis, here we say, this is the size of the problem. So as the x-axis goes to the right, the problem gets bigger. What does it mean to be bigger? In the context of this problem, more pages in the phone book. There's more something we can quantify. On the y-axis, time to solve. So as the axis goes up, we presume it presumably takes more time. So that first approach of linearly searching from page one to page 1,000 is a linear procedure, a linear algorithm or process, and we can describe it by this straight line. If I add one more page to the phone book, it's going to, in the worst case, take me one more page flip to find Mike Smith. If I add 100 pages, 100 more flips, or units of time. Now I can be a little clever with this. I don't need to really turn it one page at a time. I can do things like two at a time or four at a time, but even that's not all that fundamentally better. Even if it's two at a time, yeah, that kind of moves this line down a bit, and it means that it takes less time, given the same number of pages, but it's not fundamentally better. But what do we just do, and what did all of you do instinctively? You actually achieved a little something like this, logarithmic time, whereby the problem can grow and grow and grow, but the cost of solving that problem, the time required to solve that problem, does not grow nearly as fast. This would be a logarithmic curve, log of n, where n is just in the size of the problem, the number of pages in this phone book. And what does this mean in real terms? Well, if we have, like, 500 people in this room right now-- or rather, if we have-- mixing metaphor-- didn't do that example yet this year-- so if we have 500 pages in the phone book, and we double it to 1,000, in this more intelligent model of flipping to the middle, how many more page-tearers does it take to go from 500 pages to 1,000? Well, just one additional page tear. If you handed me a 2,000 page phone book, no big deal. I'd just tear it one additional time. So in short, the size of the problem can grow much faster than the cost of actually solving it. Now this is just one such algorithm. There are others we can solve in this same way. And so why don't we do this-- if you would humor me, albeit awkwardly here in Sanders, go ahead, everyone, if you could, and stand up in place. As you see on the screen here, this is an algorithm, a process, a computer program, if you will, to be executed by humans, that has just three steps. We're already on step one, you've stood up. And now think to yourself the number one. That is your current number. Everyone here is number one. Step two, pair up with someone standing and your numbers together, and then adopt this sum as your new number. One of you should sit down, then repeat. At this point, fewer and fewer people should be standing. This is where it gets more awkward. Someone here, here. The worst part is, you also have to very verbally do arithmetic in front of hundreds of Harvard undergrads. Okay, bit of a bug here. Okay, what's your number? Nine. Okay. What's your number? 179. Okay, good. So 188. So you guys can sit down. What's your number? 118. Some smart undergrad start doing the math. Okay, 118, 188. What else we got? 71. 79. Okay. And? 47, which, teaching staff, that gives us how many? 705 is the answer. And that's, in fact, exactly correct. No, we were actually a little bit off there, but how should this have worked? What should have just happened? So on every iteration of this algorithm, we started with some number of people standing, and that was the total number, n, at first. Then half of you sat down, and we went to n over two. Then half of you sat down, we went to n over four, n over eight, over 16, and so forth, until, even though it kind of disintegrated there at the end, in theory, had everyone paired off in balcony, and mezzanine, and orchestra here, we would have had just one lone person standing, with a total value, in this case, of 705. Now what does that mean, though, for the running time? Well, think about if I, as the human, had done this manually. I would have started fairly naively but correctly with one, two, three, four, five, six, seven, eight, and so forth; takes quite some time. So I can do better, right? In grade school, you don't just count in ones. You count in twos. So two, four, six, eight, ten, twelve. And that gets much faster, but now fundamentally, by leveraging the collective intelligence of everyone in this room, we can achieve a curve much more like this, whereby now, the number of the people in this room could double, another 700 people walk into this room for 1,400 people, but it would only take us one more iteration of this algorithm to solve. And so increasingly, these days, when we have these huge data sets in Facebook, and Google, and the like, it's solving problems with this bit of insight, this bit of cleverness, that's allowing us increasingly to do much, much more powerful things with computers today. If you like these kinds of things, you might have seen on Facebook CS50's own Puzzle Day, coming up this Saturday. If you would like to participate in something like this, whereby you and two, or three, or four teams of four would like to solve some puzzles such as this one, you stand a chance to win some fabulous prizes, among which is a Wii, and some gift cards, and some other Facebook swag this Saturday, noon to 3:00 PM. Go to cs50.net/rsvp for such. And this slide is online if you'd like to play around. The puzzles this year shall be new. You may notice in the classroom, too, all the more cameras this year. So not only will the course be filmed in the usual way, CS50 may also be taking part in a documentary on higher education that's looking at the transformative experience that a student can have these days in an undergraduate course of study. So toward these end, not only we will be filming for that, we'll be filming as well for, increasingly, our online audience, as well as, on occasion, this audience here. So we welcome to the class this year our Harvard extension school students, graduate school of design, education, the business school, the Kennedy School, the law school, as well as a number of students from Belmont, Lexington, Newton, and Watertown High Schools. Welcome to you all. In addition, this year, as you may have heard, Harvard, and MIT, and Berkeley now have entered into a collaborative partnership on an initiative called EdX, which is an initiative to open up education to all the more people online and, fundamentally, start doing research on a much broader scale as to how people learn. And so CS50 will be the college's first course participating in that initiative, as well, which means you will have access to all the more tools, all the more curricular content, all the more video content as a result, as well as of yesterday morning, the 53,019 people who have registered to take CS50 along with you this year on the Internet. So what this means, in particular, is that the teaching staff and I have spent quite a bit of time this summer preparing for the fall, both on campus and off, so that we can begin to build up a corpus of interesting, of compelling, of engaging educational content, that focuses in particular on more intimate conveyances of fairly complex material. So in addition to the course's lectures, and sections, and things called walkthroughs, which we'll revisit in just a bit, we'll also have these shorts this year that allow you to engage with the course from a different angle all together. So let's use this as an opportunity to take a quick peek at one that discusses this notion of binary. So in computer science there are things called algorithms, two of which we just took a look at-- these procedures for solving problems. But at the end of the day, you need to represent information somehow, and you need to represent it in a way that a computer can understand. And even if you don't really understand computers, and you're in that 76% right now, you probably have some vague sense that computers somehow deal in zeros and ones, the binary system, so to speak. Now why is that the case? Well, turns out when computers first came about, if you needed to represent information, you could do it with electricity, and though this is a bit of an oversimplification, a very easy way of recording information is either by turning that electricity on, a one in binary, so to speak, or turning that electricity off. So Barry, if you wouldn't mind, could we dim the lights fully for just a moment? This here is a very gratuitous binary zero. All right, if we turn the lights back up, now Sanders Theatre is representing the binary value of one. Unfortunately, with just one bit, with just one set of lights, we can only represent two numbers in the world, zero and one, and it'd be nice if computers could count a bit higher than that, but indeed, they can. So let me pull up on screen here our friend, Nate Hardison, who will give us a quick look over the course of just a few minutes at this notion of binary. NATE HARDISON: Back when you learned how to read and write numbers, you learned about the digits zero to nine. To write whole numbers larger than nine, you learn that all you had to do was use some combination of these digits, as in 52 and 437. So this way of writing numbers has a name, decimal notation. Why decimal? Well, the Latin root of decimal, deca, means 10, and when you have 10 digits in your notation system, 10 becomes a rather special number. Let's look at the number 437 written in decimal notation to understand why. We can first break up 437 into 400 plus 30 plus 7. We can take it apart even more, so that we've got four times 100 plus 3 times 10 plus 7 times 1. remember learning about the ones place, the 10s place, the 100s place, and so on? This is exactly where that comes from. And finally, we can see how we've got a bunch of powers of 10 embedded in here. We've got 4 times 10 to the 2 plus 3 times 10 to the 1 plus 7 times 10 to the zero. So now you see why 10 is a special number in decimal notation. In fact, we've got a name for it. It's called the base, since it's the base of the exponent in our arithmetic here. Decimal notation is not the only way to represent numbers. In fact, even if we get rid of the digits two through nine, we can still represent all of the numbers that we could with decimal. So now that we have two digits, zero and one, two is our special number, the base of our notation system. The name of this notation system is called binary, since the prefix bi means two. So instead, now, of having a ones place, and 10s place, and so on, we now have a ones place, a twos place, a fours place, and so on, going up by powers of two. So let's see this by doing some counting. So zero is still zero, and one is still one. However, now that we've got a twos place instead of a 10s place, 10 represents the number two. To get three, we add one to that, and get 11. Four, since there's now a fours place, is represented by 100. Five is 101. Six is 110. Seven is 111. Eight, again, has its own place. So it's 1000. And I think you get the point. SPEAKER 1: So this is to say what computers do and what binary is is actually not that dissimilar from what we've been taking for granted for some years, right? Back in grade school, you learned to count precisely in the fashion that Nate proposed, but you probably haven't really thought about it since, the fact that there is this ones place, 10s place, and 100s place, and that's pretty arbitrary. And indeed, computers simply use this different base. But at the end of the day, to actually physically represent this notion of a zero and one, you obviously don't just turn the lights on and off necessarily. You need to do it on a much finer grain scale. And by finer grain, you might remember this silly little toy from childhood, Woolly Willy and these little magnetic particles. So magnetic particles are something that you can align in a couple of different directions, perhaps north-south or south-north. And so a lot of physical incarnations of technology these days that use binary, that use zeros and ones, simply have magnetism on the inside that aligns things up-down or down-up, thereby representing a zero or a one, respectively. So indeed, let's move away from the abstract here, and look at the inside of what's a more traditional computer hard drive. This one happens to be a bit larger on screen, in that it's from a desktop computer, but laptops today still have this same technology, but is gradually being replaced by more sophisticated things that have actually no moving parts-- the inside, then, of a hard drive. SPEAKER 2: The hard drive is where your PC stores most of its permanent data. To do that, the data travels from RAM along with software signals that tell the hard drive how to store that data. The hard drive circuits translate those signals into voltage fluctuations. These, in turn, control the hard drive's moving parts, some of the few moving parts left in the modern computer. Some of the signals control a motor, which schools metal coated platters. Your data is actually stored on these platters. Other signals move the read-write heads to read or write data on the platters. This machinery is so precise that a human hair couldn't even pass between the heads of spinning platters, yet it all works at terrific speeds. SPEAKER 1: So we now zoom in on what's actually happening on top of these platters in terms of the magnetism, we have this second of two looks. SPEAKER 3: Let's look at what we just saw in slow motion. When a brief pulse of electricity is sent to the read-write head, it flips on a tiny electromagnetic for a fraction of a second. The magnet creates a field, which changes the polarity of a tiny, tiny portion of the metal particles which coat each platter's surface. A pattern series of these tiny charged up areas on the disk represents a single bit of data in a binary number system used by computers. Now if the current is sent one way through the read-write head, the area is polarized in one direction. If the current is sent in the opposite direction, the polarization is reversed. How do you get data off the hard disk? Just reverse the process. So it's the particles on the disk that get the current and the read-write head moving. Put together millions of these magnetized segments, and you've got a file. Now the pieces of a single file may be scattered all over a drive's platters, kind of like the mess of papers on your desk. So a special extra file keeps track of where everything is. Don't you wish you had something like that? SPEAKER 1: Indeed. So we have this ability to represent this information, numbers at a very low level. We have a physical way of representing that same thing, but we can't really do all that much of interest yet, other than perhaps some arithmetic and mathematics. We have no way of representing thus far things like alphabetical letters, so that we humans can communicate, using these same devices. But thankfully, there exists encodings, patterns of zeros and ones that represent higher level constructs like A, and B, and C, and entire sentences, and paragraphs, and the like. And so ASCII, which is an acronym that refers to this coding system whereby one number represents a given letter-- for instance, the number that we know as decimal value 65 is known as the capital letter A to computers. The decimal value of 97 in computers is known as a lowercase a. And what does that really mean? Well, even though Nate, a moment ago, only counted up from zero to eight, if we were to continue counting up to 65, or further, to 97, the pattern of zeros and ones that he would have drawn on the screen would be exactly what a computer uses to represent the letter A in all caps, or the letter a in lowercase. And indeed, there's a whole scheme to this. This is, at first glance, overwhelming chart of encodings, but if you focus just on the right half here, notice in this middle column, we have this notion of numbers followed by letters. And at top, we have 32, and the character char, to which 32, the integer, now refers, is apparently the space bar character. When you get the space bar character on your laptop, what you're really sending is a number, a pattern of zeros and ones, a flow of electricity, if you will, representing those zeros and ones, that the computer then interprets as a space character on the screen. An exclamation point is 33. Double quotes is 34. And if we scroll down here over to the right, we see that 65 is indeed A, and 97 is indeed lowercase a. So now that we have this encoding scheme, we can start to spell things out. Indeed, computers typically express themselves in standard units, not using an individual bit, which again, is not all that useful to just represent zero or one, lights on or off, but rather, using sequences of bits. And the most common unit of measure, as you probably know, or at least inferred, is a byte. A byte is just eight bits, eight zeroes or ones in a row. So we can start spelling things out. And so if we could, why not try this a little bit collectively here? Are there eight people in this room who would be willing to come up on stage? You have to be comfortable appearing on camera, but you don't really need to know otherwise what's going on just yet. I see one person being volunteered over here. Two, three, four, five, six, seven, and how about eight? Come on up. So you are about to represent a byte of people. Let me have you been the 128s place, you the 64s place, you the 32s place. But we're going to very rapidly have to reverse this. So let me meet you all over there. And you should be in the 128s place all the way over, here much like the hundreds place or the thousands place would be farther to the left, we want the biggest placeholder to be here on the left as well. We have 64s, 32, 16s, 8s, 4s, 2s, and 1s-- excellent. So now we have-- okay, you can help me. So now we have-- what's your name? JOANNE: Joanne. SPEAKER 1: So Joanne and I are now going to advise these guys on how we can go about spelling something out. So on the backs of their sheets of paper, they have a little cheat sheet that's going to tell them whether they were representing a zero or a one. And why don't, for simplicity, we'll represent zero by just standing there awkwardly. Very good. Or a one by raising your hand, representing a one. And let's see if we can't spell out a four character phrase here. So go ahead now, volunteers, and execute round one by raising your hand if you're a one, or keeping it down if you're a zero. So now that we have these three hands up, what number, everyone else, are they actually representing? Okay, 67. Why? Well, quick sanity check. 64s place, because it's a one. That's like one times 64, plus 1 times two, so that's 66, plus 1 times 1. That's plus 1, so 67. So now these guys are collectively representing 67, which apparently represents what here in ASCII? Okay, so a C. All right. So now let's proceed to round two. Everyone starting with their hands down, and then round two. Actually, there's not much of a role here, I suppose, but we'll pretend. So round two, raise or lower your hands. All right. Audience, what are we now? Expressing is 83. So you can do the mathematics. But for anyone whose hand is up, you add in the number that they represent. So now we have 83. Let's expand the cheat sheet a little bit, and we now have-- this might be obvious where we're going here, but nonetheless, round three. Okay, round three's good to go down there, so round three, what number are these guys now representing? Okay, I heard 53, which now represents--interesting. Now why this sort of counter-intuitive result, right? If we want to represent five-- we all probably know where this is going-- why don't I just raise the fours place and the ones place? Well, we realize that there's a difference, fundamentally, between how a computer interprets these bits. If you're trying to represent the number five, then absolutely, we just raise your hand number four and raise hand number one. But we're not representing numbers here. The context here on stage is that we're representing characters or chars, and in this context, the computer has to realize that oh, this pattern of bits is not a number alone. It's actually representing a higher level concept. In this case, an alphabetical letter. So the fact that it is now representing the number five with the value 53 is because in ASCII, the thing we aesthetically see as the number five itself needs a pattern of bits-- because why? Well, the world just decided to use the lower numbers, zero, one, two, three for what looked to be fairly cryptic things. And indeed, these are the characters that aren't on a keyboard. Special expressions that you need in a computer to do interesting things, but humans never actually type them. So 53, indeed, represents five. Now just as a final sanity check, what number should they represent in just a moment? Okay, so 48. And indeed, go ahead, round four. 16 plus 32 is indeed 48. And so a big round of applause, if we could, for our eight volunteers here. Very well done. Any direction is fine. So we now have a way not only of thinking about how to represent data, and actually representing it physically, but also doing higher level things on top of. And indeed, this is going to be a theme throughout computer science of building more and more interesting and complex things on top of fairly simple ideas-- in this case, just zeros and ones. In terms of why this is useful, well, even though in a course like this, we'll focus on fundamentals, and on programming, and on solving of problems, you can go off in computer science in any number of directions. In this case here, this is a chart that you have at the back page of your unofficial guide to CS at Harvard, one of today's two printouts. This suggests the many different directions in which you can go after a course like this-- learning about artificial intelligence, about graphics, about machine learning, about language itself. Realize, too, that there are yet other paths. There are more mathematical paths in computer science. If you're not even able to take something like CS50 this fall, there's introductory courses in the spring, Computer Science 1, for instance, is yet another on-ramp to this new world. Now as an aside, in the interest of solving problems related to courses, realize CS50 set out some time ago to try to solve one of these problems, a problem known as my.harvard, which many of you might be using to actually shop for courses, but if not, check out a tool like this, as well as other descendants that some of our past students and staff have created. But in Harvard Courses, which is a web-based tool, something that you will be capable of designing and deploying yourselves, as well as yet other things as well by the end of the semester, realize that this builds upon an open data set. In this case, of course, catalog, and allows students in this case to explore a fairly complex data set. We dug up last night a few statistics based on the few thousand folks who have been using this over the past few days. If you've been curious to know how many courses your friends actually tend to shop, well, today this data suggests that 7.6 is the average number of courses on someone's shopping list. And now I'll give you also the statistic of the most number of courses on someone's shopping list-- and we all probably know someone like this. 201 is this year's record. Now some of our former students and staff actually put together a clip to paint a picture for you of what this path of computer science and CS50 itself is. Let me go ahead and pull up, thanks to Mr. Harvahd here, a video produced by some of your predecessors, if we could keep the lights up for this. [MUSIC PLAYING] SPEAKER 1: I had no idea that was going to happen. So a more serious look at what lies ahead. So in terms of the expectations of this course, you're indeed expected to attend or watch the course's lecture, submit eight problem sets, take two quizzes, submit a final project. In terms of grades, realize that my comments at the opening about pass-fail, something that we very much take to heart in CS50--there is not nearly enough of a culture at Harvard of trying something and risking failure. Indeed, we had numbers of students, and myself in particular, who was worried about hurting your GPA, or getting a B in something like CS50, and the opportunity to take a course like this and other gateway courses at the introductory level pass/fail is a very underutilized opportunity at this college in general. And so please know, even I enrolled in this course initially for pass/fail credit alone, and even though I did switch at the end of the day, it was those five initial weeks, up to the fifth Monday of the semester, which is the cutoff, that allowed me to actually put foot into these new waters, and actually try something very unfamiliar and very uncomfortable for me at the time. So in terms now of what role the various angles by which you can approach this course serve-- so lectures. It's up to you. If you engage with us in person at this venue, indeed, we know statistically that roughly 40% of you will kind of come and go over the course of the semester, and 10% of you we will never see again after today. And that's perfectly fine, to be honest. One of the defining characteristics of CS50 is that there are these innumerable resources, some of which we'll rattle through in just a moment, including lectures and sections, and things called walkthroughs, and office hours, and the like, and it's more resources than the typical student should have to or could physically take advantage of, but that's because of the disparate learning styles that any student body manifests. And so in lectures, the primary role as I see it is not to verbally push out fairly complex material and to necessarily deliver all of the intricacies of the fundamentals that we'll explore this semester, but rather, to do things like we've been doing thus far already, these examples involving humans on stage trying to paint a mental picture, and also create, dare I say, some of these memorable moments, so that even as you struggle with certain topics, you have these memories, like oh, even though that was fairly abstractly, the math, I got lost with carrying a one, like, it really, at the end of the day, is not all that dissimilar to something I already know. And so the role that lectures will serve either in person here in Sanders or online on video is really to set the stage mentally for you each week for the various concepts and problems that we'll be diving into. In terms of the high level concepts, most of these words might flow over your head for the moment. And that's fine. Those of you who will come into the course more comfortable will know of some of these topics, but typically for that 10% of the class for which they have much more background, taking AP computer science, programming since they were 12, realize that there will be opportunities in sections and problem sets to go all the more depth into various topics, filling in whatever gaps you might have from your high school or prior background. In terms of the languages, realize that what language we use in CS50 is largely irrelevant at the end of the day. We happen to use primarily a language called C. Toward the end of the semester, we introduce web-centric languages, like PHP and JavaScript. But we and others could teach a course like this in most any modern high-level language-- Python, and Ruby, and others are quite popular these days, because realize, at the end of the day, you're not learning in this C. You're not learning PHP or JavaScript. You're learning how to solve problems, whether web-based, computer-based, or data-oriented itself, using these simply as tools. Now in terms of the logistics, you'll use something eventually called the CS50 Appliance. Does not matter if you have a Mac, a PC, a Linux computer, or the like, you'll have freely available software starting next week with which to use the CS50 Appliance, a virtual environment that you'll use on your own computer, so that you and all of your classmates have a uniform Linux desktop in this case. It's the problem sets, though, in which you'll really get your hands dirty in the course. And at the end of the day, it's the problem sets, I think, that really define a student's experience in this course. Realize that many of the problem sets will be released in two editions-- a standard edition that we expect and encourage 90% of the class to dive into. But we also released some problem sets in so-called hacker editions, and you know it's the hacker edition, because on every page with a watermark, it says hacker edition on it. And that's for this demographic of you who have AP computer science with 10 years of programming under your belt, and are looking to fill in those gaps, and to have more formal, rather than self-taught training perhaps, realize that there is a very substantial demographic in the class that has precisely that same goal. You'll have five late days. Problem sets are generally due on Thursdays, but you can extend five of those deadlines using these things called late days, and we'll also drop your lowest score at the end of the semester, per the particulars in the syllabus. But another defining characteristic of CS50 over the years has become office hours, an opportunity that you saw visually in photos a bit ago in which we gather previously in the house dining halls, prior to that in the basement of the science center, and this year in Annenberg Hall, four nights a week from 8:00 PM to 11:00 PM, where you'll have this very much shared experience of working on, struggling through certain problems, but with a substantial support structure in place. Indeed, the way this will work is you'll arrive at Annenberg if you have some question during the week. You'll bring your laptop, you'll sit down, grab some food, and you'll log in to CS50 Discuss, a web-based utility that the teaching staff has developed that will allow you to post questions and see followups in a typical discussion forum sense, using labels and the like, and auto-complete to search the data. But you'll also be able to, during the hours of office hours, have your questions escalated to actual human beings. Indeed, the goal ultimately is so that one, we begin to build up over the course of the semester a corpus of hopefully really useful information, common answers to common questions, so that you yourself can solve problems and get unstuck as quickly as possible, while having the teaching staff--usually 20% to 30% of the teaching fellows and course assistants on staff at once. We will have what's called the CS50 Greeter in Annenberg, and when we determine that, you know what? This question, we really answer effectively online. We need to see your computer. We want to talk to you one on one. You're really struggling, and you therefore want to talk one on one alongside someone, you'll be dispatched to the CS50 Greeter, a teaching fellow holding, literally, an iPod that has students' names on one side, teaching staff's names on the other. We will collect your name, followed by the name of a teaching staff, and your computer screen will start blinking, saying please go see Alice or please go see Bob at the staff table. And so in this way, we'll be able to dispatch things as efficiently as possible, as well as guide you toward solutions all the more readily. In sections, these will be opportunities for more intimate hands- on opportunities with one of the teaching fellows and 12 to 16 or so of your classmates, in which each week, we'll have problems in the problem set that ask a number of conceptual questions, and a number of bite-sized programming questions that you could figure out on your own, and you could work on your own, but in the context of section, we'll work through collectively some of those problems and go where the conversation takes us. In addition, in section will you have opportunities to review submissions of homework that you've made, your classmates, sometimes anonymized, always by an opt-in, if you would like to share the work that you've submitted. So it'll really be a two-directional conversation, and opportunity to review your own work in a much more dynamic sense, rather than simply looking at a PDF or printout and thinking about it for a few seconds and not necessarily absorbing the feedback that the teaching staff have provided. And you'll use a tool here called CS50 Spaces. For those unfamiliar, this is the language known as C at top left, and you'll get to know this over time, but this is a web-based utility that we'll use in section that will allow you and your 15 or so classmates to log in with your teaching fellow at the front of the room. You'll be able to write code in this window. You'll be able to chat electronically if you're not actually at section at that particular moment, and your teaching fellow, when it comes time to discuss Alice or Bob's solution in class, the teaching fellow can click a button, and voila, project onto the screen whatever that student has been working on at that particular point in time. So for those of you have friends who have taken CS50 in the past, realize that sections have been significantly rebooted this year to be all the more active, all the more dynamic, and really, a two-way conversation between teaching staff and students. And walkthroughs. So for these problem sets, we also offer not only the specification itself, which is generally a fairly detailed PDF, but also things known as walkthroughs, whereby one member of the teaching staff will lead a weekly session that literally walks you through the problem set, giving you hints, and advice, and starting points, and is meant to ask the very frequently asked question: where do I begin? Well, you begin either by diving into the spec on its own, or by attending or watching these walkthroughs. The first walkthrough, in fact, will be this Friday. They'll be on Fridays, not so much because we think it'll be a popular time, but because we can then film them very early in the week and get them online by the weekend so that you have as many days as possible to actually engage in that content as well. But more on that in lecture this Friday. Now in terms of the support structure, the most significant statistic is perhaps the 108 teaching fellows and course assistants that this course currently has. If some of you who don't have conflicting classes would like to join me up here on stage, it is these guys who will ultimately really define your experience in the course. I had a lot of teaching fellows teaching me classes in the day, and I remember very few of those, frankly, but to date, I still remember among those few my CS50 TF, who really helped me answer questions, who really helped me when I was struggling, and really was a partner in this experience of learning a very new world. In a little bit, all of these guys will join you outside for cake, which is a tradition of CS50, in the transept of Memorial Hall, but let me first introduce you to Nate Hardison again, Rob Bowden, and Tommy McWilliams, this year's course heads. If you guys would join me here in the middle. They have all prepared some inspirational remarks. TOMMY MCWILLIAMS: I didn't prepare anything inspirational. But my name is Tommy. I'm a senior in Mather. I'm studying computer science, really excited to be on the heads team and going through the CS50 journey with you. What I really love about CS50 is how it really teaches you to think about problems in a new way. This is really a skill that's going to be invaluable, no matter what field you go into. And not only that, but we offer more free candy than any other course on campus. So I'm just really looking forward to seeing what everyone builds this semester. And if anyone has any questions now or throughout the semester, definitely feel free to reach out to me, and I'd be happy to help. ROB BOWDEN: Hi. I'm Rob Bowden. I'm a senior in Kirkland. Yeah, that's right. We're all really excited for this next semester. We hope you're all excited. I wasn't expecting that. Yeah. So we put so much effort into making this semester really great, and as long as you're willing to put in the effort, there's so much you can get out of this course. You can get a lot of fun out of this course. We wouldn't have a staff of 108 if you couldn't get a lot of fun out of it, so just try to be involved, and you won't regret it. NATE HARDISON: Hi, guys. I'm Nate. I'm the preceptor for the course. I'm really excited to be here as well. This is my first year here. I hope you all take this course, and enjoy it as much as I've enjoyed it so far. And if you ever want to learn how to come to nine or ten in binary, come talk to me. SPEAKER 1: So at the risk of leaving these guys here on stage a bit awkwardly, let's whirl through just a few of the things that await before we adjourn for cake. What is it that lies ahead? Well, if we take a quick look back at last year, in problem set zero, your predecessors dove into a programming language called Scratch, a graphical programming language you'll use in the first days of the course, starting this Friday, to learn some concepts unfamiliar to some of you, but realize there will be an advanced aspect of this for those of you with prior background. In last year's problem set two, students dove into the world of cryptography, the art of enciphering or scrambling information, implementing programs that encrypted data, and in the hacker edition last year did students proceed to crack or decode the passwords in a typical computer's .xc password file by coming up with algorithms and heuristics for brute force figuring out what someone's password on a computer system was. Last year or two, in problem set four did students implement the game of Sudoku. And the hacker edition that year did students not just implement how to play the game, but actually a solver, whereby the computer can provide you, the human, with hints, by more rapidly than you solving that particular problem. In problem set five, we did forensics, this art of recovering information that was accidentally or very deliberately deleted from the computer. Last year, the teaching staff and I strolled around campus taking photographs of people, places, and things and then accidentally formatted the media card on our camera that had all those photos. But no problem, we made a forensics image of this media card, handed it out to all students in the class, and challenged them to write programs that recovered all of the JPEGs from that card. And this is actually one of our favorite problem sets, and I dug up an old email from one of your predecessors which was great fun to read sometime ago. This is from Matt. Dear David, yesterday my sister accidentally formatted her camera's SD card and lost a year's worth of memorable photos. She unfortunately isn't the best at backing up her data. But this situation reminded me of p-set five, so I thought I would try to run her SD card through the recover program that I wrote all the way back in October. So after four hours of figuring out how to create a raw image from the formatted SD card-- Google prove to be pretty helpful in this regard, until I ironically happened to come across your instructions on the Internet-- after tinkering around with some of the command line arguments, I managed to create the forensic image, and after installing and configuring the CS50 Appliance, I managed to run the forensic image through my program and recover all 1,027 of my sister's photographs, writes Matt. In last year's problem set six, we gave the students a dictionary of 150,000 English words and challenged them to write a spell checker that answered queries of the form, is this word spelled correctly or incorrectly as fast as possible. And on opt-in basis were students allowed to then challenge classmates by posting their results, the amount of RAM that they use, the number of CPU cycles or seconds that they used, so that students were then ranked on the course's website-- again, purely optional aspect of it, but great fun in that very often would a student get to position number 10 or so on the big board, on the website, go off to dinner and then come back, and realize his roommate had just edged in front of him or her on the big board, thereby pouring another two or three hours just to one up his or her roommate. So we look forward to something similar this year as well. In problem set 7 did we steer in the direction of web programming, actually solving problems in the ever-increasingly common environment of a web browser. Know then decreasingly do we download software on Macs and PCs, but increasingly, do we do it all within the web. And indeed, last year, some 88% of students' final projects in the course were web-based. And those, too, are skills that you will derive from this class by course's end, because what awaits at course's end is the CS50 Fair, this exhibition that's based on the idea of a science fair, but in this version of a fair do all students in the class bring their laptops, and their friends, and family, and others to Northwest Science, a large building on campus, set up their laptop, get some food, get some popcorn and drink, and then exhibit their final projects for all those in attendance, who last year numbered some 2,500 attendees from across campus, and expressions like this, and like this were not uncommon at the fair. Leading up to the fair is the CS50 Hackathon, an opportunity to hop on a Harvard shuttle, head down the street to Microsoft at 8:00 PM, and not go home until 7:00 AM. We serve first dinner at 8:00 PM, second dinner at 1:00 AM, and for those still standing at 5:00 AM do we treat to pancakes at IHOP. And the Hackathon is an opportunity, as pictured here, to dive into your final projects, whether working on your own or with friends in a collaborative environment, where the entire teaching staff is working well into the night with an ample supply of Hong Kong Chinese food. At 5:00 AM will such images as these be quite common this year as well. So as we adjourn in a moment for cake, keep in mind that 76% percent of the people in this room have no prior experience, and as per the syllabus, what ultimately matters in this course is not so much where you end up relative to your classmates, but where you, in week 11, end up relative to yourself in week 0. This is CS50.