1 00:00:19,994 --> 00:00:22,760 SPEAKER 1: This is CS50. 2 00:00:22,760 --> 00:00:27,120 So I was where you are now some years ago, and when I was a freshman at the 3 00:00:27,120 --> 00:00:32,000 time, I wasn't really on this path of doing computers science, of doing 4 00:00:32,000 --> 00:00:32,490 engineering. 5 00:00:32,490 --> 00:00:35,780 Indeed, I came into this place as a government concentrator. 6 00:00:35,780 --> 00:00:38,910 I'd been in high school a kid who liked things like history. 7 00:00:38,910 --> 00:00:41,940 I liked constitutional law, kind of English and math, so kind of 8 00:00:41,940 --> 00:00:45,840 well-rounded, but didn't necessarily know things that I hadn't been taught 9 00:00:45,840 --> 00:00:46,520 in high school. 10 00:00:46,520 --> 00:00:49,570 And so freshman year, I had this trepidation, whereby even though I 11 00:00:49,570 --> 00:00:53,400 liked computers, play computer games and the like, I certainly never 12 00:00:53,400 --> 00:00:57,120 thought of myself as a computer person, a computer scientist, and 13 00:00:57,120 --> 00:00:59,610 frankly, I thought my friends in high school who were taking computer 14 00:00:59,610 --> 00:01:03,990 science were a bit of a--geeks. 15 00:01:03,990 --> 00:01:08,880 >> And yet, when I got here on campus, there was this course, CS50, and at 16 00:01:08,880 --> 00:01:12,620 the time, it had this reputation of really being something to beware. 17 00:01:12,620 --> 00:01:13,690 It was a good course. 18 00:01:13,690 --> 00:01:15,360 It was a fun course. 19 00:01:15,360 --> 00:01:18,970 But you had to actually get that foot in the door. 20 00:01:18,970 --> 00:01:22,090 And even I did not cross that threshold freshman year. 21 00:01:22,090 --> 00:01:25,590 And I went on my way being a government concentrator, going through 22 00:01:25,590 --> 00:01:28,787 as many of the prerequisites as I could, cross counting things for gen 23 00:01:28,787 --> 00:01:32,340 ed or core and the like, and then sophomore year, for some reason, I got 24 00:01:32,340 --> 00:01:35,580 up the nerve to step foot in Science Center B, where CS50. 25 00:01:35,580 --> 00:01:38,970 A very famous computer scientist by the name of Brian Kernighan was 26 00:01:38,970 --> 00:01:44,020 teaching here that year, and even then, I was only willing to actually 27 00:01:44,020 --> 00:01:47,720 fill out my study card by taking this class pass/fail. 28 00:01:47,720 --> 00:01:50,140 I looked around me, and I figured everyone in this room's got to know 29 00:01:50,140 --> 00:01:52,880 way more about computer science, about programming, about computers. 30 00:01:52,880 --> 00:01:56,090 Everyone must be programming in this room since they were 12, but indeed, 31 00:01:56,090 --> 00:01:57,470 that wasn't the case. 32 00:01:57,470 --> 00:02:01,600 And so the very last day, the fifth Monday of the semester that I take 33 00:02:01,600 --> 00:02:05,300 this leap and change from pass/fail to a letter grade, and end up changing my 34 00:02:05,300 --> 00:02:07,730 concentration that same day to computer science. 35 00:02:07,730 --> 00:02:10,630 >> Now that's not our objective in this class, to turn you all into computer 36 00:02:10,630 --> 00:02:14,600 science concentrators, but really, to propose that there's this opportunity 37 00:02:14,600 --> 00:02:18,630 in this field and in other fields with which you might be quite unfamiliar, 38 00:02:18,630 --> 00:02:21,920 given that high schools typically follow a fairly standard curricular 39 00:02:21,920 --> 00:02:26,170 path, but to venture in, in CS50, into new waters. 40 00:02:26,170 --> 00:02:30,460 And if you are sitting here today thinking you don't actually belong, so 41 00:02:30,460 --> 00:02:34,110 do most of the people to your right and to your left. 42 00:02:34,110 --> 00:02:39,970 Indeed, last year, 76% of the students in this class had no prior experience. 43 00:02:39,970 --> 00:02:43,510 So contrary to what you might think, most of the people sitting around you 44 00:02:43,510 --> 00:02:47,130 today do not, in fact, have any prior experience. 45 00:02:47,130 --> 00:02:52,030 18% have taken one CS class, and 6% have taken two or more. 46 00:02:52,030 --> 00:02:55,300 Meanwhile, we ask our students every year to describe themselves in terms 47 00:02:55,300 --> 00:02:57,760 of comfort level, and this is-- 48 00:02:57,760 --> 00:02:59,010 there's no one definition of this. 49 00:02:59,010 --> 00:03:02,480 You just kind of know it, if you're not very comfortable in CS50. 50 00:03:02,480 --> 00:03:07,250 And last year, we had 55% in this green pie slice here, self-describing 51 00:03:07,250 --> 00:03:10,640 as less comfortable students who frankly we had no idea why'd they 52 00:03:10,640 --> 00:03:14,800 shop the course on that first day, but the same 55% remained with us until 53 00:03:14,800 --> 00:03:19,270 term's end, as did 35%, who were somewhere in between those more 54 00:03:19,270 --> 00:03:22,100 comfortable and those less comfortable. 55 00:03:22,100 --> 00:03:23,490 >> So what is computer science? 56 00:03:23,490 --> 00:03:26,630 Well, in high school, and really, more generally out there these days, 57 00:03:26,630 --> 00:03:29,740 there's this perception or this misconception that computer science is 58 00:03:29,740 --> 00:03:30,400 programming. 59 00:03:30,400 --> 00:03:33,550 And that's absolutely one aspect of computer science, but programming, 60 00:03:33,550 --> 00:03:36,490 whatever the language is, is really just a tool that computer scientists 61 00:03:36,490 --> 00:03:39,890 use to solve problems, either in the domain of computer science or, 62 00:03:39,890 --> 00:03:42,990 increasingly these days, in the physical sciences, the natural 63 00:03:42,990 --> 00:03:45,890 sciences, in medicine, in the humanities, to analyze 64 00:03:45,890 --> 00:03:47,320 large sets of data. 65 00:03:47,320 --> 00:03:51,070 Anywhere now there is computer and data, there's an opportunity to apply 66 00:03:51,070 --> 00:03:54,400 lessons learned in a class like CS50. 67 00:03:54,400 --> 00:03:57,490 >> So let's solve a problem that a computer scientist might go about 68 00:03:57,490 --> 00:04:02,370 solving and try to put some jargon, put some conceptual framework, around 69 00:04:02,370 --> 00:04:05,420 what might otherwise be some fairly abstract ideas. 70 00:04:05,420 --> 00:04:07,370 So this is a telephone. 71 00:04:07,370 --> 00:04:08,840 You don't see these things too often. 72 00:04:08,840 --> 00:04:11,910 The college still seems to have these in the houses and dormitories, but 73 00:04:11,910 --> 00:04:14,970 back in the day, when you wanted to use a phone like this, there was no 74 00:04:14,970 --> 00:04:16,760 electronic address book in your cell phone. 75 00:04:16,760 --> 00:04:20,250 Rather, you pulled up something known as a phone book, and these phone books 76 00:04:20,250 --> 00:04:23,110 had about 1,000 pages typically. 77 00:04:23,110 --> 00:04:26,850 They were sorted from A to Z, and you simply had to find the right page to 78 00:04:26,850 --> 00:04:30,150 find the person you're looking for in order to find their name and their 79 00:04:30,150 --> 00:04:31,020 telephone number. 80 00:04:31,020 --> 00:04:33,120 Now how do you go about looking up someone in this book? 81 00:04:33,120 --> 00:04:35,800 >> Suppose my goal is to give my friend Mike Smith a call. 82 00:04:35,800 --> 00:04:37,820 Well, how do I go about finding Mike Smith? 83 00:04:37,820 --> 00:04:42,370 Well, a very reasonable approach, if naive and inefficient, would be start 84 00:04:42,370 --> 00:04:47,690 here, and start flipping to page four, to page five, to page six, and to sort 85 00:04:47,690 --> 00:04:50,930 of linearly, along a straight line, go through this phone book, and even 86 00:04:50,930 --> 00:04:54,010 though it's going to be incredibly tedious, if Mike Smith is in this 87 00:04:54,010 --> 00:04:57,480 book, I'm eventually going to reach him when I finally flip to the S 88 00:04:57,480 --> 00:04:58,790 section of this book. 89 00:04:58,790 --> 00:05:01,240 Now, of course, you don't need to be a computer scientist to know that this 90 00:05:01,240 --> 00:05:02,980 is a stupid way of solving this problem. 91 00:05:02,980 --> 00:05:04,620 What would a typical human being do? 92 00:05:08,430 --> 00:05:09,330 Well done. 93 00:05:09,330 --> 00:05:11,370 So you would flip to the middle, right? 94 00:05:11,370 --> 00:05:14,970 So you'd flip roughly to the middle, look here, and I seem to find myself 95 00:05:14,970 --> 00:05:16,660 in the M section. 96 00:05:16,660 --> 00:05:19,880 Okay, so M is clearly not what I'm looking for. 97 00:05:19,880 --> 00:05:23,150 Mike's to the right, so to speak, of this section, and as some of you have 98 00:05:23,150 --> 00:05:27,740 seen before, we can literally now proceed to tear this 99 00:05:27,740 --> 00:05:28,990 problem in a half. 100 00:05:33,870 --> 00:05:35,060 >> You really shouldn't be that impressed. 101 00:05:35,060 --> 00:05:36,990 Tearing it down the seam is actually not that hard. 102 00:05:36,990 --> 00:05:40,040 The real people do it this way, but down the seam, we 103 00:05:40,040 --> 00:05:41,400 now have two problems. 104 00:05:41,400 --> 00:05:44,800 Each of which is half as big, and we can literally throw that half of the 105 00:05:44,800 --> 00:05:45,560 problem away. 106 00:05:45,560 --> 00:05:48,590 Now we're left not with 1,000 pages, but say, 500. 107 00:05:48,590 --> 00:05:49,580 So now what do I do? 108 00:05:49,580 --> 00:05:53,030 Well, a typical human will go roughly in the middle again, and I find myself at 109 00:05:53,030 --> 00:05:55,080 the R section, so not quite there. 110 00:05:55,080 --> 00:05:58,380 So again, I can tear this problem in half. 111 00:05:58,380 --> 00:05:59,630 Thank you. 112 00:06:02,000 --> 00:06:07,050 So now I only have some 250 pages, and I can do this again, and again, and 113 00:06:07,050 --> 00:06:11,340 again, and go from 125 down to roughly 60, to 30, to 15, and so forth. 114 00:06:11,340 --> 00:06:16,680 And finally, I'll get whittled down to one of the S pages, on which, if he's 115 00:06:16,680 --> 00:06:19,510 in the phone book, Mike Smith should be. 116 00:06:19,510 --> 00:06:22,720 >> Now that's an obviously fairly reasonable algorithm, and it's a 117 00:06:22,720 --> 00:06:25,395 one-time use algorithm in this case, but what can we sort of 118 00:06:25,395 --> 00:06:26,920 take away from that? 119 00:06:26,920 --> 00:06:30,750 Well, the first approach, correct, if naive, though, it was, can be 120 00:06:30,750 --> 00:06:32,270 described by this straight line. 121 00:06:32,270 --> 00:06:35,740 So if on the x-axis, here we say, this is the size of the problem. 122 00:06:35,740 --> 00:06:39,530 So as the x-axis goes to the right, the problem gets bigger. 123 00:06:39,530 --> 00:06:40,870 What does it mean to be bigger? 124 00:06:40,870 --> 00:06:43,920 In the context of this problem, more pages in the phone book. 125 00:06:43,920 --> 00:06:45,860 There's more something we can quantify. 126 00:06:45,860 --> 00:06:47,660 On the y-axis, time to solve. 127 00:06:47,660 --> 00:06:51,790 So as the axis goes up, we presume it presumably takes more time. 128 00:06:51,790 --> 00:06:56,960 So that first approach of linearly searching from page one to page 1,000 129 00:06:56,960 --> 00:07:01,480 is a linear procedure, a linear algorithm or process, and we can 130 00:07:01,480 --> 00:07:03,120 describe it by this straight line. 131 00:07:03,120 --> 00:07:06,560 If I add one more page to the phone book, it's going to, in the worst 132 00:07:06,560 --> 00:07:09,950 case, take me one more page flip to find Mike Smith. 133 00:07:09,950 --> 00:07:13,840 If I add 100 pages, 100 more flips, or units of time. 134 00:07:13,840 --> 00:07:15,350 >> Now I can be a little clever with this. 135 00:07:15,350 --> 00:07:17,550 I don't need to really turn it one page at a time. 136 00:07:17,550 --> 00:07:21,110 I can do things like two at a time or four at a time, but even that's not 137 00:07:21,110 --> 00:07:22,350 all that fundamentally better. 138 00:07:22,350 --> 00:07:26,540 Even if it's two at a time, yeah, that kind of moves this line down a bit, 139 00:07:26,540 --> 00:07:31,010 and it means that it takes less time, given the same number of pages, but 140 00:07:31,010 --> 00:07:32,570 it's not fundamentally better. 141 00:07:32,570 --> 00:07:36,290 But what do we just do, and what did all of you do instinctively? 142 00:07:36,290 --> 00:07:41,210 You actually achieved a little something like this, logarithmic time, 143 00:07:41,210 --> 00:07:46,540 whereby the problem can grow and grow and grow, but the cost of solving that 144 00:07:46,540 --> 00:07:49,460 problem, the time required to solve that problem, does not 145 00:07:49,460 --> 00:07:51,460 grow nearly as fast. 146 00:07:51,460 --> 00:07:55,930 This would be a logarithmic curve, log of n, where n is just in the size of 147 00:07:55,930 --> 00:07:58,310 the problem, the number of pages in this phone book. 148 00:07:58,310 --> 00:07:59,780 And what does this mean in real terms? 149 00:07:59,780 --> 00:08:02,630 Well, if we have, like, 500 people in this room right now-- 150 00:08:02,630 --> 00:08:04,470 or rather, if we have-- 151 00:08:04,470 --> 00:08:06,020 mixing metaphor-- 152 00:08:06,020 --> 00:08:09,870 didn't do that example yet this year-- so if we have 500 pages in the phone 153 00:08:09,870 --> 00:08:14,450 book, and we double it to 1,000, in this more intelligent model of 154 00:08:14,450 --> 00:08:17,670 flipping to the middle, how many more page-tearers does it take to go from 155 00:08:17,670 --> 00:08:19,520 500 pages to 1,000? 156 00:08:19,520 --> 00:08:21,650 Well, just one additional page tear. 157 00:08:21,650 --> 00:08:24,580 If you handed me a 2,000 page phone book, no big deal. 158 00:08:24,580 --> 00:08:27,200 I'd just tear it one additional time. 159 00:08:27,200 --> 00:08:31,780 >> So in short, the size of the problem can grow much faster than the cost of 160 00:08:31,780 --> 00:08:32,780 actually solving it. 161 00:08:32,780 --> 00:08:35,030 Now this is just one such algorithm. 162 00:08:35,030 --> 00:08:37,610 There are others we can solve in this same way. 163 00:08:37,610 --> 00:08:40,730 And so why don't we do this-- if you would humor me, albeit awkwardly here 164 00:08:40,730 --> 00:08:45,085 in Sanders, go ahead, everyone, if you could, and stand up in place. 165 00:08:48,550 --> 00:08:52,440 As you see on the screen here, this is an algorithm, a process, a computer 166 00:08:52,440 --> 00:08:55,980 program, if you will, to be executed by humans, that has just three steps. 167 00:08:55,980 --> 00:08:57,980 We're already on step one, you've stood up. 168 00:08:57,980 --> 00:09:00,260 And now think to yourself the number one. 169 00:09:00,260 --> 00:09:01,450 That is your current number. 170 00:09:01,450 --> 00:09:03,120 Everyone here is number one. 171 00:09:03,120 --> 00:09:07,160 Step two, pair up with someone standing and your numbers together, 172 00:09:07,160 --> 00:09:09,345 and then adopt this sum as your new number. 173 00:09:17,470 --> 00:09:20,830 One of you should sit down, then repeat. 174 00:10:11,330 --> 00:10:14,100 >> At this point, fewer and fewer people should be standing. 175 00:10:16,820 --> 00:10:20,030 This is where it gets more awkward. 176 00:10:20,030 --> 00:10:21,280 Someone here, here. 177 00:10:30,620 --> 00:10:34,180 The worst part is, you also have to very verbally do arithmetic in front 178 00:10:34,180 --> 00:10:36,310 of hundreds of Harvard undergrads. 179 00:10:42,920 --> 00:10:45,280 Okay, bit of a bug here. 180 00:10:45,280 --> 00:10:48,470 Okay, what's your number? 181 00:10:48,470 --> 00:10:49,170 Nine. 182 00:10:49,170 --> 00:10:51,880 Okay. 183 00:10:51,880 --> 00:10:53,130 What's your number? 184 00:10:55,920 --> 00:10:57,710 179. 185 00:10:57,710 --> 00:10:58,470 Okay, good. 186 00:10:58,470 --> 00:10:59,420 So 188. 187 00:10:59,420 --> 00:11:00,570 So you guys can sit down. 188 00:11:00,570 --> 00:11:02,320 What's your number? 189 00:11:02,320 --> 00:11:04,420 118. 190 00:11:04,420 --> 00:11:07,440 Some smart undergrad start doing the math. 191 00:11:07,440 --> 00:11:09,180 Okay, 118, 188. 192 00:11:09,180 --> 00:11:10,430 What else we got? 193 00:11:13,120 --> 00:11:16,450 71. 194 00:11:16,450 --> 00:11:17,650 79. 195 00:11:17,650 --> 00:11:18,260 Okay. 196 00:11:18,260 --> 00:11:20,220 And? 197 00:11:20,220 --> 00:11:23,240 47, which, teaching staff, that gives us how many? 198 00:11:26,250 --> 00:11:29,830 705 is the answer. 199 00:11:29,830 --> 00:11:32,045 And that's, in fact, exactly correct. 200 00:11:37,250 --> 00:11:40,080 >> No, we were actually a little bit off there, but how 201 00:11:40,080 --> 00:11:41,220 should this have worked? 202 00:11:41,220 --> 00:11:44,080 What should have just happened? 203 00:11:44,080 --> 00:11:48,270 So on every iteration of this algorithm, we started with some number 204 00:11:48,270 --> 00:11:51,480 of people standing, and that was the total number, n, at first. 205 00:11:51,480 --> 00:11:53,880 Then half of you sat down, and we went to n over two. 206 00:11:53,880 --> 00:11:57,570 Then half of you sat down, we went to n over four, n over eight, over 16, 207 00:11:57,570 --> 00:12:01,220 and so forth, until, even though it kind of disintegrated there at the 208 00:12:01,220 --> 00:12:04,760 end, in theory, had everyone paired off in balcony, and mezzanine, and 209 00:12:04,760 --> 00:12:10,180 orchestra here, we would have had just one lone person standing, with a total 210 00:12:10,180 --> 00:12:13,930 value, in this case, of 705. 211 00:12:13,930 --> 00:12:16,600 Now what does that mean, though, for the running time? 212 00:12:16,600 --> 00:12:18,960 Well, think about if I, as the human, had done this manually. 213 00:12:18,960 --> 00:12:22,602 I would have started fairly naively but correctly with one, two, three, 214 00:12:22,602 --> 00:12:27,060 four, five, six, seven, eight, and so forth; takes quite some time. 215 00:12:27,060 --> 00:12:28,120 So I can do better, right? 216 00:12:28,120 --> 00:12:29,830 In grade school, you don't just count in ones. 217 00:12:29,830 --> 00:12:30,580 You count in twos. 218 00:12:30,580 --> 00:12:32,190 So two, four, six, eight, ten, twelve. 219 00:12:32,190 --> 00:12:36,210 And that gets much faster, but now fundamentally, by leveraging the 220 00:12:36,210 --> 00:12:39,710 collective intelligence of everyone in this room, we can achieve a curve much 221 00:12:39,710 --> 00:12:43,750 more like this, whereby now, the number of the people in this room 222 00:12:43,750 --> 00:12:48,570 could double, another 700 people walk into this room for 1,400 people, but 223 00:12:48,570 --> 00:12:53,010 it would only take us one more iteration of this algorithm to solve. 224 00:12:53,010 --> 00:12:55,970 >> And so increasingly, these days, when we have these huge data sets in 225 00:12:55,970 --> 00:12:59,690 Facebook, and Google, and the like, it's solving problems with this bit of 226 00:12:59,690 --> 00:13:04,060 insight, this bit of cleverness, that's allowing us increasingly to do much, 227 00:13:04,060 --> 00:13:07,290 much more powerful things with computers today. 228 00:13:07,290 --> 00:13:10,440 If you like these kinds of things, you might have seen on Facebook CS50's 229 00:13:10,440 --> 00:13:12,990 own Puzzle Day, coming up this Saturday. 230 00:13:12,990 --> 00:13:15,860 If you would like to participate in something like this, whereby you and 231 00:13:15,860 --> 00:13:20,470 two, or three, or four teams of four would like to solve some puzzles such 232 00:13:20,470 --> 00:13:25,030 as this one, you stand a chance to win some fabulous prizes, among which is a 233 00:13:25,030 --> 00:13:29,130 Wii, and some gift cards, and some other Facebook swag this Saturday, 234 00:13:29,130 --> 00:13:30,770 noon to 3:00 PM. 235 00:13:30,770 --> 00:13:35,590 Go to cs50.net/rsvp for such. 236 00:13:35,590 --> 00:13:38,070 And this slide is online if you'd like to play around. 237 00:13:38,070 --> 00:13:40,170 The puzzles this year shall be new. 238 00:13:40,170 --> 00:13:43,350 >> You may notice in the classroom, too, all the more cameras this year. 239 00:13:43,350 --> 00:13:47,950 So not only will the course be filmed in the usual way, CS50 may also be 240 00:13:47,950 --> 00:13:51,230 taking part in a documentary on higher education that's looking at the 241 00:13:51,230 --> 00:13:54,460 transformative experience that a student can have these days in an 242 00:13:54,460 --> 00:13:56,010 undergraduate course of study. 243 00:13:56,010 --> 00:14:00,340 So toward these end, not only we will be filming for that, we'll be filming 244 00:14:00,340 --> 00:14:04,700 as well for, increasingly, our online audience, as well as, on occasion, 245 00:14:04,700 --> 00:14:05,810 this audience here. 246 00:14:05,810 --> 00:14:09,120 So we welcome to the class this year our Harvard extension school students, 247 00:14:09,120 --> 00:14:12,060 graduate school of design, education, the business school, the Kennedy 248 00:14:12,060 --> 00:14:15,600 School, the law school, as well as a number of students from Belmont, 249 00:14:15,600 --> 00:14:18,280 Lexington, Newton, and Watertown High Schools. 250 00:14:18,280 --> 00:14:19,250 Welcome to you all. 251 00:14:19,250 --> 00:14:22,330 In addition, this year, as you may have heard, Harvard, and MIT, and 252 00:14:22,330 --> 00:14:25,740 Berkeley now have entered into a collaborative partnership on an 253 00:14:25,740 --> 00:14:30,490 initiative called EdX, which is an initiative to open up education to all 254 00:14:30,490 --> 00:14:34,010 the more people online and, fundamentally, start doing research on 255 00:14:34,010 --> 00:14:36,530 a much broader scale as to how people learn. 256 00:14:36,530 --> 00:14:39,960 And so CS50 will be the college's first course participating in that 257 00:14:39,960 --> 00:14:42,960 initiative, as well, which means you will have access to all the more 258 00:14:42,960 --> 00:14:46,890 tools, all the more curricular content, all the more video content as 259 00:14:46,890 --> 00:14:52,410 a result, as well as of yesterday morning, the 53,019 people who have 260 00:14:52,410 --> 00:14:56,825 registered to take CS50 along with you this year on the Internet. 261 00:15:05,940 --> 00:15:08,830 So what this means, in particular, is that the teaching staff and I have 262 00:15:08,830 --> 00:15:12,080 spent quite a bit of time this summer preparing for the fall, both on campus 263 00:15:12,080 --> 00:15:15,720 and off, so that we can begin to build up a corpus of interesting, of 264 00:15:15,720 --> 00:15:20,760 compelling, of engaging educational content, that focuses in particular on 265 00:15:20,760 --> 00:15:26,090 more intimate conveyances of fairly complex material. 266 00:15:26,090 --> 00:15:28,540 >> So in addition to the course's lectures, and sections, and things 267 00:15:28,540 --> 00:15:31,810 called walkthroughs, which we'll revisit in just a bit, we'll also have 268 00:15:31,810 --> 00:15:35,090 these shorts this year that allow you to engage with the course from a 269 00:15:35,090 --> 00:15:36,660 different angle all together. 270 00:15:36,660 --> 00:15:39,610 So let's use this as an opportunity to take a quick peek at one that 271 00:15:39,610 --> 00:15:41,460 discusses this notion of binary. 272 00:15:41,460 --> 00:15:44,890 >> So in computer science there are things called algorithms, two of which 273 00:15:44,890 --> 00:15:47,870 we just took a look at-- these procedures for solving problems. 274 00:15:47,870 --> 00:15:51,060 But at the end of the day, you need to represent information somehow, and you 275 00:15:51,060 --> 00:15:54,540 need to represent it in a way that a computer can understand. 276 00:15:54,540 --> 00:15:57,330 And even if you don't really understand computers, and you're in 277 00:15:57,330 --> 00:16:01,470 that 76% right now, you probably have some vague sense that computers 278 00:16:01,470 --> 00:16:05,300 somehow deal in zeros and ones, the binary system, so to speak. 279 00:16:05,300 --> 00:16:06,630 Now why is that the case? 280 00:16:06,630 --> 00:16:10,120 Well, turns out when computers first came about, if you needed to represent 281 00:16:10,120 --> 00:16:13,810 information, you could do it with electricity, and though this is a bit 282 00:16:13,810 --> 00:16:18,140 of an oversimplification, a very easy way of recording information is either 283 00:16:18,140 --> 00:16:22,600 by turning that electricity on, a one in binary, so to speak, or turning 284 00:16:22,600 --> 00:16:24,290 that electricity off. 285 00:16:24,290 --> 00:16:26,210 >> So Barry, if you wouldn't mind, could we dim the lights 286 00:16:26,210 --> 00:16:28,140 fully for just a moment? 287 00:16:28,140 --> 00:16:31,750 This here is a very gratuitous binary zero. 288 00:16:31,750 --> 00:16:35,960 All right, if we turn the lights back up, now Sanders Theatre is 289 00:16:35,960 --> 00:16:37,990 representing the binary value of one. 290 00:16:37,990 --> 00:16:41,860 Unfortunately, with just one bit, with just one set of lights, we can only 291 00:16:41,860 --> 00:16:45,770 represent two numbers in the world, zero and one, and it'd be nice if 292 00:16:45,770 --> 00:16:48,510 computers could count a bit higher than that, but indeed, they can. 293 00:16:48,510 --> 00:16:52,170 So let me pull up on screen here our friend, Nate Hardison, who will give 294 00:16:52,170 --> 00:16:54,980 us a quick look over the course of just a few minutes at 295 00:16:54,980 --> 00:16:56,505 this notion of binary. 296 00:17:03,526 --> 00:17:06,550 >> NATE HARDISON: Back when you learned how to read and write numbers, you 297 00:17:06,550 --> 00:17:10,589 learned about the digits zero to nine. 298 00:17:10,589 --> 00:17:13,589 To write whole numbers larger than nine, you learn that all you had to do 299 00:17:13,589 --> 00:17:23,130 was use some combination of these digits, as in 52 and 437. 300 00:17:23,130 --> 00:17:27,760 So this way of writing numbers has a name, decimal notation. 301 00:17:27,760 --> 00:17:28,830 Why decimal? 302 00:17:28,830 --> 00:17:33,630 Well, the Latin root of decimal, deca, means 10, and when you have 10 digits 303 00:17:33,630 --> 00:17:37,420 in your notation system, 10 becomes a rather special number. 304 00:17:37,420 --> 00:17:42,480 Let's look at the number 437 written in decimal notation to understand why. 305 00:17:42,480 --> 00:17:52,330 >> We can first break up 437 into 400 plus 30 plus 7. 306 00:17:52,330 --> 00:18:00,260 We can take it apart even more, so that we've got four times 100 plus 3 307 00:18:00,260 --> 00:18:05,120 times 10 plus 7 times 1. 308 00:18:05,120 --> 00:18:08,580 remember learning about the ones place, the 10s place, the 100s 309 00:18:08,580 --> 00:18:10,190 place, and so on? 310 00:18:10,190 --> 00:18:13,120 This is exactly where that comes from. 311 00:18:13,120 --> 00:18:15,870 And finally, we can see how we've got a bunch of powers of 312 00:18:15,870 --> 00:18:17,900 10 embedded in here. 313 00:18:17,900 --> 00:18:28,820 We've got 4 times 10 to the 2 plus 3 times 10 to the 1 plus 7 314 00:18:28,820 --> 00:18:31,720 times 10 to the zero. 315 00:18:31,720 --> 00:18:35,390 So now you see why 10 is a special number in decimal notation. 316 00:18:35,390 --> 00:18:37,370 In fact, we've got a name for it. 317 00:18:37,370 --> 00:18:40,420 It's called the base, since it's the base of the exponent in 318 00:18:40,420 --> 00:18:42,100 our arithmetic here. 319 00:18:42,100 --> 00:18:45,320 >> Decimal notation is not the only way to represent numbers. 320 00:18:45,320 --> 00:18:50,480 In fact, even if we get rid of the digits two through nine, we can still 321 00:18:50,480 --> 00:18:53,740 represent all of the numbers that we could with decimal. 322 00:18:53,740 --> 00:18:58,910 So now that we have two digits, zero and one, two is our special number, 323 00:18:58,910 --> 00:19:01,210 the base of our notation system. 324 00:19:01,210 --> 00:19:04,580 The name of this notation system is called binary, since the 325 00:19:04,580 --> 00:19:07,030 prefix bi means two. 326 00:19:07,030 --> 00:19:11,190 So instead, now, of having a ones place, and 10s place, and so on, we 327 00:19:11,190 --> 00:19:15,900 now have a ones place, a twos place, a fours place, and so on, going up by 328 00:19:15,900 --> 00:19:17,550 powers of two. 329 00:19:17,550 --> 00:19:19,450 So let's see this by doing some counting. 330 00:19:19,450 --> 00:19:24,940 So zero is still zero, and one is still one. 331 00:19:24,940 --> 00:19:31,050 However, now that we've got a twos place instead of a 10s place, 10 332 00:19:31,050 --> 00:19:33,190 represents the number two. 333 00:19:33,190 --> 00:19:38,386 To get three, we add one to that, and get 11. 334 00:19:38,386 --> 00:19:44,660 Four, since there's now a fours place, is represented by 100. 335 00:19:44,660 --> 00:19:49,410 Five is 101. 336 00:19:49,410 --> 00:19:53,642 Six is 110. 337 00:19:53,642 --> 00:19:56,610 Seven is 111. 338 00:19:56,610 --> 00:19:58,470 Eight, again, has its own place. 339 00:19:58,470 --> 00:20:02,790 So it's 1000. 340 00:20:02,790 --> 00:20:05,201 And I think you get the point. 341 00:20:05,201 --> 00:20:09,800 >> SPEAKER 1: So this is to say what computers do and what binary is is 342 00:20:09,800 --> 00:20:13,690 actually not that dissimilar from what we've been taking for granted for some 343 00:20:13,690 --> 00:20:14,560 years, right? 344 00:20:14,560 --> 00:20:17,097 Back in grade school, you learned to count precisely in the 345 00:20:17,097 --> 00:20:19,970 fashion that Nate proposed, but you probably haven't really thought about 346 00:20:19,970 --> 00:20:22,440 it since, the fact that there is this ones place, 10s place, and 100s 347 00:20:22,440 --> 00:20:23,315 place, and that's pretty arbitrary. 348 00:20:23,315 --> 00:20:26,210 And indeed, computers simply use this different base. 349 00:20:26,210 --> 00:20:30,160 But at the end of the day, to actually physically represent this notion of a 350 00:20:30,160 --> 00:20:33,130 zero and one, you obviously don't just turn the lights on and off 351 00:20:33,130 --> 00:20:33,445 necessarily. 352 00:20:33,445 --> 00:20:36,100 You need to do it on a much finer grain scale. 353 00:20:36,100 --> 00:20:39,990 And by finer grain, you might remember this silly little toy from childhood, 354 00:20:39,990 --> 00:20:42,570 Woolly Willy and these little magnetic particles. 355 00:20:42,570 --> 00:20:46,440 >> So magnetic particles are something that you can align in a couple of 356 00:20:46,440 --> 00:20:49,920 different directions, perhaps north-south or south-north. 357 00:20:49,920 --> 00:20:53,470 And so a lot of physical incarnations of technology these days that use 358 00:20:53,470 --> 00:20:57,690 binary, that use zeros and ones, simply have magnetism on the inside 359 00:20:57,690 --> 00:21:04,110 that aligns things up-down or down-up, thereby representing a zero or a one, 360 00:21:04,110 --> 00:21:04,890 respectively. 361 00:21:04,890 --> 00:21:08,930 So indeed, let's move away from the abstract here, and look at the inside 362 00:21:08,930 --> 00:21:10,780 of what's a more traditional computer hard drive. 363 00:21:10,780 --> 00:21:13,840 This one happens to be a bit larger on screen, in that it's from a desktop 364 00:21:13,840 --> 00:21:18,310 computer, but laptops today still have this same technology, but is gradually 365 00:21:18,310 --> 00:21:22,140 being replaced by more sophisticated things that have actually no moving 366 00:21:22,140 --> 00:21:25,275 parts-- the inside, then, of a hard drive. 367 00:21:25,275 --> 00:21:28,450 >> SPEAKER 2: The hard drive is where your PC stores most of 368 00:21:28,450 --> 00:21:29,990 its permanent data. 369 00:21:29,990 --> 00:21:34,710 To do that, the data travels from RAM along with software signals that tell 370 00:21:34,710 --> 00:21:37,420 the hard drive how to store that data. 371 00:21:37,420 --> 00:21:40,720 The hard drive circuits translate those signals into voltage 372 00:21:40,720 --> 00:21:42,270 fluctuations. 373 00:21:42,270 --> 00:21:46,290 These, in turn, control the hard drive's moving parts, some of the few 374 00:21:46,290 --> 00:21:48,890 moving parts left in the modern computer. 375 00:21:48,890 --> 00:21:53,400 Some of the signals control a motor, which schools metal coated platters. 376 00:21:53,400 --> 00:21:56,810 Your data is actually stored on these platters. 377 00:21:56,810 --> 00:21:59,940 Other signals move the read-write heads to read or 378 00:21:59,940 --> 00:22:02,030 write data on the platters. 379 00:22:02,030 --> 00:22:06,710 This machinery is so precise that a human hair couldn't even pass between 380 00:22:06,710 --> 00:22:11,390 the heads of spinning platters, yet it all works at terrific speeds. 381 00:22:11,390 --> 00:22:15,120 >> SPEAKER 1: So we now zoom in on what's actually happening on top of these 382 00:22:15,120 --> 00:22:19,620 platters in terms of the magnetism, we have this second of two looks. 383 00:22:19,620 --> 00:22:22,940 >> SPEAKER 3: Let's look at what we just saw in slow motion. 384 00:22:22,940 --> 00:22:27,010 When a brief pulse of electricity is sent to the read-write head, it flips 385 00:22:27,010 --> 00:22:30,390 on a tiny electromagnetic for a fraction of a second. 386 00:22:30,390 --> 00:22:34,280 The magnet creates a field, which changes the polarity of a tiny, tiny 387 00:22:34,280 --> 00:22:37,995 portion of the metal particles which coat each platter's surface. 388 00:22:37,995 --> 00:22:41,810 A pattern series of these tiny charged up areas on the disk represents a 389 00:22:41,810 --> 00:22:45,820 single bit of data in a binary number system used by computers. 390 00:22:45,820 --> 00:22:49,430 Now if the current is sent one way through the read-write head, the area 391 00:22:49,430 --> 00:22:51,170 is polarized in one direction. 392 00:22:51,170 --> 00:22:53,250 If the current is sent in the opposite direction, the 393 00:22:53,250 --> 00:22:55,220 polarization is reversed. 394 00:22:55,220 --> 00:22:57,680 How do you get data off the hard disk? 395 00:22:57,680 --> 00:22:59,400 Just reverse the process. 396 00:22:59,400 --> 00:23:02,050 So it's the particles on the disk that get the current and the read-write 397 00:23:02,050 --> 00:23:03,340 head moving. 398 00:23:03,340 --> 00:23:06,010 Put together millions of these magnetized segments, and 399 00:23:06,010 --> 00:23:07,440 you've got a file. 400 00:23:07,440 --> 00:23:12,240 Now the pieces of a single file may be scattered all over a drive's platters, 401 00:23:12,240 --> 00:23:15,270 kind of like the mess of papers on your desk. 402 00:23:15,270 --> 00:23:18,800 So a special extra file keeps track of where everything is. 403 00:23:18,800 --> 00:23:21,640 Don't you wish you had something like that? 404 00:23:21,640 --> 00:23:23,340 >> SPEAKER 1: Indeed. 405 00:23:23,340 --> 00:23:27,560 So we have this ability to represent this information, numbers 406 00:23:27,560 --> 00:23:28,440 at a very low level. 407 00:23:28,440 --> 00:23:32,730 We have a physical way of representing that same thing, but we can't really 408 00:23:32,730 --> 00:23:36,440 do all that much of interest yet, other than perhaps some arithmetic and 409 00:23:36,440 --> 00:23:36,940 mathematics. 410 00:23:36,940 --> 00:23:40,830 We have no way of representing thus far things like alphabetical letters, 411 00:23:40,830 --> 00:23:44,100 so that we humans can communicate, using these same devices. 412 00:23:44,100 --> 00:23:48,240 But thankfully, there exists encodings, patterns of zeros and ones 413 00:23:48,240 --> 00:23:52,920 that represent higher level constructs like A, and B, and C, and entire 414 00:23:52,920 --> 00:23:54,880 sentences, and paragraphs, and the like. 415 00:23:54,880 --> 00:24:00,300 And so ASCII, which is an acronym that refers to this coding system whereby 416 00:24:00,300 --> 00:24:04,350 one number represents a given letter-- for instance, the number that we know 417 00:24:04,350 --> 00:24:09,120 as decimal value 65 is known as the capital letter A to computers. 418 00:24:09,120 --> 00:24:13,670 The decimal value of 97 in computers is known as a lowercase a. 419 00:24:13,670 --> 00:24:15,210 And what does that really mean? 420 00:24:15,210 --> 00:24:19,510 Well, even though Nate, a moment ago, only counted up from zero to eight, if 421 00:24:19,510 --> 00:24:24,910 we were to continue counting up to 65, or further, to 97, the pattern of 422 00:24:24,910 --> 00:24:28,440 zeros and ones that he would have drawn on the screen would be exactly 423 00:24:28,440 --> 00:24:33,420 what a computer uses to represent the letter A in all caps, or the letter a 424 00:24:33,420 --> 00:24:34,610 in lowercase. 425 00:24:34,610 --> 00:24:36,690 And indeed, there's a whole scheme to this. 426 00:24:36,690 --> 00:24:41,570 This is, at first glance, overwhelming chart of encodings, but if you focus 427 00:24:41,570 --> 00:24:46,210 just on the right half here, notice in this middle column, we have this 428 00:24:46,210 --> 00:24:49,010 notion of numbers followed by letters. 429 00:24:49,010 --> 00:24:53,830 And at top, we have 32, and the character char, to which 32, the 430 00:24:53,830 --> 00:24:57,360 integer, now refers, is apparently the space bar character. 431 00:24:57,360 --> 00:25:00,720 When you get the space bar character on your laptop, what you're really 432 00:25:00,720 --> 00:25:04,160 sending is a number, a pattern of zeros and ones, a flow of electricity, 433 00:25:04,160 --> 00:25:07,770 if you will, representing those zeros and ones, that the computer then 434 00:25:07,770 --> 00:25:10,330 interprets as a space character on the screen. 435 00:25:10,330 --> 00:25:12,210 An exclamation point is 33. 436 00:25:12,210 --> 00:25:13,345 Double quotes is 34. 437 00:25:13,345 --> 00:25:18,945 And if we scroll down here over to the right, we see that 65 is indeed A, and 438 00:25:18,945 --> 00:25:21,290 97 is indeed lowercase a. 439 00:25:21,290 --> 00:25:23,910 >> So now that we have this encoding scheme, we can start to 440 00:25:23,910 --> 00:25:25,080 spell things out. 441 00:25:25,080 --> 00:25:30,170 Indeed, computers typically express themselves in standard units, not 442 00:25:30,170 --> 00:25:33,020 using an individual bit, which again, is not all that useful to just 443 00:25:33,020 --> 00:25:36,600 represent zero or one, lights on or off, but rather, using 444 00:25:36,600 --> 00:25:37,530 sequences of bits. 445 00:25:37,530 --> 00:25:40,100 And the most common unit of measure, as you probably know, or at least 446 00:25:40,100 --> 00:25:41,810 inferred, is a byte. 447 00:25:41,810 --> 00:25:45,960 A byte is just eight bits, eight zeroes or ones in a row. 448 00:25:45,960 --> 00:25:48,090 So we can start spelling things out. 449 00:25:48,090 --> 00:25:52,580 And so if we could, why not try this a little bit collectively here? 450 00:25:52,580 --> 00:25:55,670 Are there eight people in this room who would be willing 451 00:25:55,670 --> 00:25:56,870 to come up on stage? 452 00:25:56,870 --> 00:26:00,880 You have to be comfortable appearing on camera, but you don't really need 453 00:26:00,880 --> 00:26:03,690 to know otherwise what's going on just yet. 454 00:26:03,690 --> 00:26:07,240 I see one person being volunteered over here. 455 00:26:07,240 --> 00:26:18,380 Two, three, four, five, six, seven, and how about eight? 456 00:26:18,380 --> 00:26:18,920 Come on up. 457 00:26:18,920 --> 00:26:22,550 >> So you are about to represent a byte of people. 458 00:26:22,550 --> 00:26:30,190 Let me have you been the 128s place, you the 64s place, you the 32s place. 459 00:26:30,190 --> 00:26:32,720 But we're going to very rapidly have to reverse this. 460 00:26:32,720 --> 00:26:35,170 So let me meet you all over there. 461 00:26:35,170 --> 00:26:39,840 And you should be in the 128s place all the way over, here much like the 462 00:26:39,840 --> 00:26:43,080 hundreds place or the thousands place would be farther to the left, we want 463 00:26:43,080 --> 00:26:45,740 the biggest placeholder to be here on the left as well. 464 00:26:45,740 --> 00:26:55,230 We have 64s, 32, 16s, 8s, 4s, 2s, and 1s-- 465 00:26:55,230 --> 00:26:56,030 excellent. 466 00:26:56,030 --> 00:26:58,100 So now we have-- 467 00:26:58,100 --> 00:27:00,190 okay, you can help me. 468 00:27:00,190 --> 00:27:01,890 So now we have-- what's your name? 469 00:27:01,890 --> 00:27:02,560 JOANNE: Joanne. 470 00:27:02,560 --> 00:27:06,240 SPEAKER 1: So Joanne and I are now going to advise these guys on how we 471 00:27:06,240 --> 00:27:07,850 can go about spelling something out. 472 00:27:07,850 --> 00:27:10,640 So on the backs of their sheets of paper, they have a little cheat sheet 473 00:27:10,640 --> 00:27:14,720 that's going to tell them whether they were representing a zero or a one. 474 00:27:14,720 --> 00:27:18,000 And why don't, for simplicity, we'll represent zero by just 475 00:27:18,000 --> 00:27:19,580 standing there awkwardly. 476 00:27:19,580 --> 00:27:20,360 Very good. 477 00:27:20,360 --> 00:27:24,200 Or a one by raising your hand, representing a one. 478 00:27:24,200 --> 00:27:28,380 And let's see if we can't spell out a four character phrase here. 479 00:27:28,380 --> 00:27:33,870 >> So go ahead now, volunteers, and execute round one by raising your hand 480 00:27:33,870 --> 00:27:38,940 if you're a one, or keeping it down if you're a zero. 481 00:27:38,940 --> 00:27:45,550 So now that we have these three hands up, what number, everyone else, are 482 00:27:45,550 --> 00:27:47,800 they actually representing? 483 00:27:47,800 --> 00:27:48,760 Okay, 67. 484 00:27:48,760 --> 00:27:49,040 Why? 485 00:27:49,040 --> 00:27:49,970 Well, quick sanity check. 486 00:27:49,970 --> 00:27:51,910 64s place, because it's a one. 487 00:27:51,910 --> 00:27:58,870 That's like one times 64, plus 1 times two, so that's 66, plus 1 times 1. 488 00:27:58,870 --> 00:28:00,610 That's plus 1, so 67. 489 00:28:00,610 --> 00:28:03,740 So now these guys are collectively representing 67, which apparently 490 00:28:03,740 --> 00:28:06,240 represents what here in ASCII? 491 00:28:06,240 --> 00:28:06,510 Okay, 492 00:28:06,510 --> 00:28:07,650 so a C. All right. 493 00:28:07,650 --> 00:28:09,530 So now let's proceed to round two. 494 00:28:09,530 --> 00:28:12,735 Everyone starting with their hands down, and then round two. 495 00:28:12,735 --> 00:28:15,260 Actually, there's not much of a role here, I suppose, but we'll pretend. 496 00:28:15,260 --> 00:28:19,820 So round two, raise or lower your hands. 497 00:28:19,820 --> 00:28:20,530 >> All right. 498 00:28:20,530 --> 00:28:23,230 Audience, what are we now? 499 00:28:23,230 --> 00:28:24,860 Expressing is 83. 500 00:28:24,860 --> 00:28:26,050 So you can do the mathematics. 501 00:28:26,050 --> 00:28:29,810 But for anyone whose hand is up, you add in the number that they represent. 502 00:28:29,810 --> 00:28:31,610 So now we have 83. 503 00:28:31,610 --> 00:28:36,510 Let's expand the cheat sheet a little bit, and we now have-- 504 00:28:36,510 --> 00:28:38,890 this might be obvious where we're going here, but 505 00:28:38,890 --> 00:28:42,220 nonetheless, round three. 506 00:28:42,220 --> 00:28:45,870 Okay, round three's good to go down there, so round three, what number are 507 00:28:45,870 --> 00:28:47,120 these guys now representing? 508 00:28:50,090 --> 00:28:56,690 Okay, I heard 53, which now represents--interesting. 509 00:28:56,690 --> 00:29:00,770 Now why this sort of counter-intuitive result, right? 510 00:29:00,770 --> 00:29:02,910 If we want to represent five-- 511 00:29:02,910 --> 00:29:03,900 we all probably know where this is going-- 512 00:29:03,900 --> 00:29:07,360 why don't I just raise the fours place and the ones place? 513 00:29:07,360 --> 00:29:10,060 >> Well, we realize that there's a difference, fundamentally, between how 514 00:29:10,060 --> 00:29:11,760 a computer interprets these bits. 515 00:29:11,760 --> 00:29:15,470 If you're trying to represent the number five, then absolutely, we just 516 00:29:15,470 --> 00:29:18,330 raise your hand number four and raise hand number one. 517 00:29:18,330 --> 00:29:20,010 But we're not representing numbers here. 518 00:29:20,010 --> 00:29:23,690 The context here on stage is that we're representing characters or 519 00:29:23,690 --> 00:29:28,110 chars, and in this context, the computer has to realize that oh, this 520 00:29:28,110 --> 00:29:30,720 pattern of bits is not a number alone. 521 00:29:30,720 --> 00:29:33,210 It's actually representing a higher level concept. 522 00:29:33,210 --> 00:29:35,010 In this case, an alphabetical letter. 523 00:29:35,010 --> 00:29:38,820 So the fact that it is now representing the number five with the 524 00:29:38,820 --> 00:29:44,290 value 53 is because in ASCII, the thing we aesthetically see as the 525 00:29:44,290 --> 00:29:48,200 number five itself needs a pattern of bits-- because why? 526 00:29:48,200 --> 00:29:51,310 Well, the world just decided to use the lower numbers, zero, one, two, 527 00:29:51,310 --> 00:29:54,130 three for what looked to be fairly cryptic things. 528 00:29:54,130 --> 00:29:56,830 And indeed, these are the characters that aren't on a keyboard. 529 00:29:56,830 --> 00:30:00,330 Special expressions that you need in a computer to do interesting things, but 530 00:30:00,330 --> 00:30:02,010 humans never actually type them. 531 00:30:02,010 --> 00:30:04,220 So 53, indeed, represents five. 532 00:30:04,220 --> 00:30:10,460 Now just as a final sanity check, what number should they 533 00:30:10,460 --> 00:30:12,880 represent in just a moment? 534 00:30:12,880 --> 00:30:14,060 Okay, so 48. 535 00:30:14,060 --> 00:30:15,720 And indeed, go ahead, round four. 536 00:30:18,650 --> 00:30:22,680 16 plus 32 is indeed 48. 537 00:30:22,680 --> 00:30:26,510 And so a big round of applause, if we could, for our eight volunteers here. 538 00:30:31,410 --> 00:30:32,660 Very well done. 539 00:30:35,290 --> 00:30:36,490 Any direction is fine. 540 00:30:36,490 --> 00:30:41,050 >> So we now have a way not only of thinking about how to represent data, 541 00:30:41,050 --> 00:30:44,120 and actually representing it physically, but also doing higher 542 00:30:44,120 --> 00:30:45,710 level things on top of. 543 00:30:45,710 --> 00:30:48,430 And indeed, this is going to be a theme throughout computer science of 544 00:30:48,430 --> 00:30:52,410 building more and more interesting and complex things on top of 545 00:30:52,410 --> 00:30:54,030 fairly simple ideas-- 546 00:30:54,030 --> 00:30:56,170 in this case, just zeros and ones. 547 00:30:56,170 --> 00:31:00,120 In terms of why this is useful, well, even though in a course like this, 548 00:31:00,120 --> 00:31:03,810 we'll focus on fundamentals, and on programming, and on solving of 549 00:31:03,810 --> 00:31:07,050 problems, you can go off in computer science in any number of directions. 550 00:31:07,050 --> 00:31:10,950 In this case here, this is a chart that you have at the back page of your 551 00:31:10,950 --> 00:31:14,580 unofficial guide to CS at Harvard, one of today's two printouts. 552 00:31:14,580 --> 00:31:17,450 This suggests the many different directions in which you can go after a 553 00:31:17,450 --> 00:31:18,400 course like this-- 554 00:31:18,400 --> 00:31:21,530 learning about artificial intelligence, about graphics, about 555 00:31:21,530 --> 00:31:24,370 machine learning, about language itself. 556 00:31:24,370 --> 00:31:26,410 Realize, too, that there are yet other paths. 557 00:31:26,410 --> 00:31:28,670 There are more mathematical paths in computer science. 558 00:31:28,670 --> 00:31:31,740 If you're not even able to take something like CS50 this fall, there's 559 00:31:31,740 --> 00:31:35,070 introductory courses in the spring, Computer Science 1, for instance, is 560 00:31:35,070 --> 00:31:38,050 yet another on-ramp to this new world. 561 00:31:38,050 --> 00:31:41,600 >> Now as an aside, in the interest of solving problems related to courses, 562 00:31:41,600 --> 00:31:46,050 realize CS50 set out some time ago to try to solve one of these problems, a 563 00:31:46,050 --> 00:31:49,640 problem known as my.harvard, which many of you might be using to actually 564 00:31:49,640 --> 00:31:54,040 shop for courses, but if not, check out a tool like this, as well as other 565 00:31:54,040 --> 00:31:57,800 descendants that some of our past students and staff have created. 566 00:31:57,800 --> 00:32:00,770 But in Harvard Courses, which is a web-based tool, something that you 567 00:32:00,770 --> 00:32:05,510 will be capable of designing and deploying yourselves, as well as yet 568 00:32:05,510 --> 00:32:09,210 other things as well by the end of the semester, realize that this builds 569 00:32:09,210 --> 00:32:10,590 upon an open data set. 570 00:32:10,590 --> 00:32:13,490 In this case, of course, catalog, and allows students in this case to 571 00:32:13,490 --> 00:32:16,320 explore a fairly complex data set. 572 00:32:16,320 --> 00:32:19,495 >> We dug up last night a few statistics based on the few thousand folks who 573 00:32:19,495 --> 00:32:21,530 have been using this over the past few days. 574 00:32:21,530 --> 00:32:25,260 If you've been curious to know how many courses your friends actually 575 00:32:25,260 --> 00:32:29,720 tend to shop, well, today this data suggests that 7.6 is the average 576 00:32:29,720 --> 00:32:32,610 number of courses on someone's shopping list. 577 00:32:32,610 --> 00:32:36,350 And now I'll give you also the statistic of the most number of 578 00:32:36,350 --> 00:32:39,550 courses on someone's shopping list-- and we all probably know 579 00:32:39,550 --> 00:32:40,800 someone like this. 580 00:32:43,820 --> 00:32:46,740 201 is this year's record. 581 00:32:46,740 --> 00:32:52,320 Now some of our former students and staff actually put together a clip to 582 00:32:52,320 --> 00:32:55,560 paint a picture for you of what this path of computer science 583 00:32:55,560 --> 00:32:57,360 and CS50 itself is. 584 00:32:57,360 --> 00:33:02,060 Let me go ahead and pull up, thanks to Mr. Harvahd here, a video produced by 585 00:33:02,060 --> 00:33:06,825 some of your predecessors, if we could keep the lights up for this. 586 00:33:10,980 --> 00:35:39,126 [MUSIC PLAYING] 587 00:35:39,126 --> 00:35:42,630 >> SPEAKER 1: I had no idea that was going to happen. 588 00:35:42,630 --> 00:35:46,170 So a more serious look at what lies ahead. 589 00:35:46,170 --> 00:35:49,060 So in terms of the expectations of this course, you're indeed expected to 590 00:35:49,060 --> 00:35:52,817 attend or watch the course's lecture, submit eight problem sets, take two 591 00:35:52,817 --> 00:35:54,720 quizzes, submit a final project. 592 00:35:54,720 --> 00:35:58,640 In terms of grades, realize that my comments at the opening about 593 00:35:58,640 --> 00:36:02,380 pass-fail, something that we very much take to heart in CS50--there is not 594 00:36:02,380 --> 00:36:05,110 nearly enough of a culture at Harvard of trying 595 00:36:05,110 --> 00:36:07,080 something and risking failure. 596 00:36:07,080 --> 00:36:09,870 Indeed, we had numbers of students, and myself in particular, who was 597 00:36:09,870 --> 00:36:15,310 worried about hurting your GPA, or getting a B in something like CS50, 598 00:36:15,310 --> 00:36:19,222 and the opportunity to take a course like this and other gateway courses at 599 00:36:19,222 --> 00:36:23,950 the introductory level pass/fail is a very underutilized opportunity at this 600 00:36:23,950 --> 00:36:24,740 college in general. 601 00:36:24,740 --> 00:36:29,750 And so please know, even I enrolled in this course initially for pass/fail 602 00:36:29,750 --> 00:36:32,840 credit alone, and even though I did switch at the end of the day, it was 603 00:36:32,840 --> 00:36:36,170 those five initial weeks, up to the fifth Monday of the semester, which is 604 00:36:36,170 --> 00:36:39,700 the cutoff, that allowed me to actually put foot into these new 605 00:36:39,700 --> 00:36:43,660 waters, and actually try something very unfamiliar and very uncomfortable 606 00:36:43,660 --> 00:36:45,540 for me at the time. 607 00:36:45,540 --> 00:36:49,440 >> So in terms now of what role the various angles by which you can 608 00:36:49,440 --> 00:36:51,530 approach this course serve-- 609 00:36:51,530 --> 00:36:53,080 so lectures. It's up to you. 610 00:36:53,080 --> 00:36:56,550 If you engage with us in person at this venue, indeed, we know 611 00:36:56,550 --> 00:37:00,920 statistically that roughly 40% of you will kind of come and go over the 612 00:37:00,920 --> 00:37:05,140 course of the semester, and 10% of you we will never see again after today. 613 00:37:05,140 --> 00:37:07,540 And that's perfectly fine, to be honest. 614 00:37:07,540 --> 00:37:10,470 One of the defining characteristics of CS50 is that there are these 615 00:37:10,470 --> 00:37:14,220 innumerable resources, some of which we'll rattle through in just a moment, 616 00:37:14,220 --> 00:37:17,890 including lectures and sections, and things called walkthroughs, and office 617 00:37:17,890 --> 00:37:20,850 hours, and the like, and it's more resources than the typical student 618 00:37:20,850 --> 00:37:24,400 should have to or could physically take advantage of, but that's because 619 00:37:24,400 --> 00:37:27,510 of the disparate learning styles that any student body manifests. 620 00:37:27,510 --> 00:37:31,590 And so in lectures, the primary role as I see it is not to verbally push 621 00:37:31,590 --> 00:37:35,360 out fairly complex material and to necessarily deliver all of the 622 00:37:35,360 --> 00:37:39,040 intricacies of the fundamentals that we'll explore this semester, but 623 00:37:39,040 --> 00:37:42,430 rather, to do things like we've been doing thus far already, these examples 624 00:37:42,430 --> 00:37:46,480 involving humans on stage trying to paint a mental picture, and also 625 00:37:46,480 --> 00:37:49,430 create, dare I say, some of these memorable moments, so that even as you 626 00:37:49,430 --> 00:37:53,280 struggle with certain topics, you have these memories, like oh, even though 627 00:37:53,280 --> 00:37:56,740 that was fairly abstractly, the math, I got lost with carrying a one, like, 628 00:37:56,740 --> 00:38:00,260 it really, at the end of the day, is not all that dissimilar to something I 629 00:38:00,260 --> 00:38:01,060 already know. 630 00:38:01,060 --> 00:38:04,560 And so the role that lectures will serve either in person here in Sanders 631 00:38:04,560 --> 00:38:09,040 or online on video is really to set the stage mentally for you each week 632 00:38:09,040 --> 00:38:12,370 for the various concepts and problems that we'll be diving into. 633 00:38:12,370 --> 00:38:16,800 >> In terms of the high level concepts, most of these words might flow over 634 00:38:16,800 --> 00:38:17,670 your head for the moment. 635 00:38:17,670 --> 00:38:18,680 And that's fine. 636 00:38:18,680 --> 00:38:21,210 Those of you who will come into the course more comfortable will know of 637 00:38:21,210 --> 00:38:24,870 some of these topics, but typically for that 10% of the class for which 638 00:38:24,870 --> 00:38:28,600 they have much more background, taking AP computer science, programming since 639 00:38:28,600 --> 00:38:31,850 they were 12, realize that there will be opportunities in sections and 640 00:38:31,850 --> 00:38:36,030 problem sets to go all the more depth into various topics, filling in 641 00:38:36,030 --> 00:38:39,590 whatever gaps you might have from your high school or prior background. 642 00:38:39,590 --> 00:38:43,440 In terms of the languages, realize that what language we use in CS50 is 643 00:38:43,440 --> 00:38:45,360 largely irrelevant at the end of the day. 644 00:38:45,360 --> 00:38:49,500 We happen to use primarily a language called C. Toward the end of the 645 00:38:49,500 --> 00:38:53,260 semester, we introduce web-centric languages, like PHP and JavaScript. 646 00:38:53,260 --> 00:38:56,800 But we and others could teach a course like this in most any modern 647 00:38:56,800 --> 00:38:57,740 high-level language-- 648 00:38:57,740 --> 00:39:01,710 Python, and Ruby, and others are quite popular these days, because realize, 649 00:39:01,710 --> 00:39:04,350 at the end of the day, you're not learning in this C. You're not 650 00:39:04,350 --> 00:39:06,310 learning PHP or JavaScript. 651 00:39:06,310 --> 00:39:10,190 You're learning how to solve problems, whether web-based, computer-based, or 652 00:39:10,190 --> 00:39:14,810 data-oriented itself, using these simply as tools. 653 00:39:14,810 --> 00:39:17,910 >> Now in terms of the logistics, you'll use something eventually called the 654 00:39:17,910 --> 00:39:18,810 CS50 Appliance. 655 00:39:18,810 --> 00:39:22,150 Does not matter if you have a Mac, a PC, a Linux computer, or the like, 656 00:39:22,150 --> 00:39:25,740 you'll have freely available software starting next week with which to use 657 00:39:25,740 --> 00:39:28,890 the CS50 Appliance, a virtual environment that you'll use on your 658 00:39:28,890 --> 00:39:32,720 own computer, so that you and all of your classmates have a uniform Linux 659 00:39:32,720 --> 00:39:34,220 desktop in this case. 660 00:39:34,220 --> 00:39:37,010 It's the problem sets, though, in which you'll really get your hands 661 00:39:37,010 --> 00:39:37,910 dirty in the course. 662 00:39:37,910 --> 00:39:40,820 And at the end of the day, it's the problem sets, I think, that really 663 00:39:40,820 --> 00:39:43,510 define a student's experience in this course. 664 00:39:43,510 --> 00:39:46,660 Realize that many of the problem sets will be released in two editions-- 665 00:39:46,660 --> 00:39:50,140 a standard edition that we expect and encourage 90% of the 666 00:39:50,140 --> 00:39:51,690 class to dive into. 667 00:39:51,690 --> 00:39:55,255 But we also released some problem sets in so-called hacker editions, and you 668 00:39:55,255 --> 00:39:58,110 know it's the hacker edition, because on every page with a watermark, it 669 00:39:58,110 --> 00:39:59,970 says hacker edition on it. 670 00:39:59,970 --> 00:40:03,390 And that's for this demographic of you who have AP computer science with 10 671 00:40:03,390 --> 00:40:06,500 years of programming under your belt, and are looking to fill in those gaps, 672 00:40:06,500 --> 00:40:10,170 and to have more formal, rather than self-taught training perhaps, realize 673 00:40:10,170 --> 00:40:13,420 that there is a very substantial demographic in the class that has 674 00:40:13,420 --> 00:40:15,230 precisely that same goal. 675 00:40:15,230 --> 00:40:16,460 You'll have five late days. 676 00:40:16,460 --> 00:40:19,380 Problem sets are generally due on Thursdays, but you can extend five of 677 00:40:19,380 --> 00:40:22,900 those deadlines using these things called late days, and we'll also drop 678 00:40:22,900 --> 00:40:25,520 your lowest score at the end of the semester, per the 679 00:40:25,520 --> 00:40:27,540 particulars in the syllabus. 680 00:40:27,540 --> 00:40:31,630 >> But another defining characteristic of CS50 over the years has become office 681 00:40:31,630 --> 00:40:36,060 hours, an opportunity that you saw visually in photos a bit ago in which 682 00:40:36,060 --> 00:40:39,090 we gather previously in the house dining halls, prior to that in the 683 00:40:39,090 --> 00:40:42,120 basement of the science center, and this year in Annenberg Hall, four 684 00:40:42,120 --> 00:40:45,670 nights a week from 8:00 PM to 11:00 PM, where you'll have this very much 685 00:40:45,670 --> 00:40:49,810 shared experience of working on, struggling through certain problems, 686 00:40:49,810 --> 00:40:52,520 but with a substantial support structure in place. 687 00:40:52,520 --> 00:40:55,780 Indeed, the way this will work is you'll arrive at Annenberg if you have 688 00:40:55,780 --> 00:40:56,950 some question during the week. 689 00:40:56,950 --> 00:41:00,190 You'll bring your laptop, you'll sit down, grab some food, and you'll log 690 00:41:00,190 --> 00:41:04,100 in to CS50 Discuss, a web-based utility that the teaching staff has 691 00:41:04,100 --> 00:41:07,860 developed that will allow you to post questions and see followups in a 692 00:41:07,860 --> 00:41:12,590 typical discussion forum sense, using labels and the like, and auto-complete 693 00:41:12,590 --> 00:41:13,790 to search the data. 694 00:41:13,790 --> 00:41:17,950 But you'll also be able to, during the hours of office hours, have your 695 00:41:17,950 --> 00:41:20,490 questions escalated to actual human beings. 696 00:41:20,490 --> 00:41:24,000 Indeed, the goal ultimately is so that one, we begin to build up over the 697 00:41:24,000 --> 00:41:27,740 course of the semester a corpus of hopefully really useful information, 698 00:41:27,740 --> 00:41:31,770 common answers to common questions, so that you yourself can solve problems 699 00:41:31,770 --> 00:41:35,980 and get unstuck as quickly as possible, while having the teaching 700 00:41:35,980 --> 00:41:40,320 staff--usually 20% to 30% of the teaching fellows and course assistants 701 00:41:40,320 --> 00:41:41,780 on staff at once. 702 00:41:41,780 --> 00:41:45,150 >> We will have what's called the CS50 Greeter in Annenberg, and when we 703 00:41:45,150 --> 00:41:46,610 determine that, you know what? 704 00:41:46,610 --> 00:41:50,900 This question, we really answer effectively online. 705 00:41:50,900 --> 00:41:51,930 We need to see your computer. 706 00:41:51,930 --> 00:41:53,470 We want to talk to you one on one. 707 00:41:53,470 --> 00:41:56,060 You're really struggling, and you therefore want to talk one on one 708 00:41:56,060 --> 00:41:59,160 alongside someone, you'll be dispatched to the CS50 Greeter, a 709 00:41:59,160 --> 00:42:02,700 teaching fellow holding, literally, an iPod that has students' names on one 710 00:42:02,700 --> 00:42:04,880 side, teaching staff's names on the other. 711 00:42:04,880 --> 00:42:07,900 We will collect your name, followed by the name of a teaching staff, and your 712 00:42:07,900 --> 00:42:12,020 computer screen will start blinking, saying please go see Alice or please 713 00:42:12,020 --> 00:42:14,110 go see Bob at the staff table. 714 00:42:14,110 --> 00:42:17,240 And so in this way, we'll be able to dispatch things as efficiently as 715 00:42:17,240 --> 00:42:22,030 possible, as well as guide you toward solutions all the more readily. 716 00:42:22,030 --> 00:42:25,900 In sections, these will be opportunities for more intimate hands- 717 00:42:25,900 --> 00:42:30,080 on opportunities with one of the teaching fellows and 12 to 16 or so of 718 00:42:30,080 --> 00:42:34,020 your classmates, in which each week, we'll have problems in the problem set 719 00:42:34,020 --> 00:42:36,750 that ask a number of conceptual questions, and a number of bite-sized 720 00:42:36,750 --> 00:42:39,180 programming questions that you could figure out on your own, and you could 721 00:42:39,180 --> 00:42:42,140 work on your own, but in the context of section, we'll work through 722 00:42:42,140 --> 00:42:45,230 collectively some of those problems and go where the 723 00:42:45,230 --> 00:42:46,700 conversation takes us. 724 00:42:46,700 --> 00:42:51,340 >> In addition, in section will you have opportunities to review submissions of 725 00:42:51,340 --> 00:42:54,470 homework that you've made, your classmates, sometimes anonymized, 726 00:42:54,470 --> 00:42:56,780 always by an opt-in, if you would like to share the 727 00:42:56,780 --> 00:42:57,930 work that you've submitted. 728 00:42:57,930 --> 00:43:00,890 So it'll really be a two-directional conversation, and opportunity to 729 00:43:00,890 --> 00:43:05,050 review your own work in a much more dynamic sense, rather than simply 730 00:43:05,050 --> 00:43:08,620 looking at a PDF or printout and thinking about it for a few seconds 731 00:43:08,620 --> 00:43:10,760 and not necessarily absorbing the feedback that the 732 00:43:10,760 --> 00:43:12,270 teaching staff have provided. 733 00:43:12,270 --> 00:43:14,670 And you'll use a tool here called CS50 Spaces. 734 00:43:14,670 --> 00:43:18,165 For those unfamiliar, this is the language known as C at top left, and 735 00:43:18,165 --> 00:43:21,360 you'll get to know this over time, but this is a web-based utility that we'll 736 00:43:21,360 --> 00:43:25,350 use in section that will allow you and your 15 or so classmates to log in with 737 00:43:25,350 --> 00:43:27,120 your teaching fellow at the front of the room. 738 00:43:27,120 --> 00:43:28,890 You'll be able to write code in this window. 739 00:43:28,890 --> 00:43:31,800 You'll be able to chat electronically if you're not actually at section at 740 00:43:31,800 --> 00:43:35,300 that particular moment, and your teaching fellow, when it comes time to 741 00:43:35,300 --> 00:43:41,295 discuss Alice or Bob's solution in class, the teaching fellow can click a 742 00:43:41,295 --> 00:43:45,210 button, and voila, project onto the screen whatever that student has been 743 00:43:45,210 --> 00:43:47,120 working on at that particular point in time. 744 00:43:47,120 --> 00:43:50,400 So for those of you have friends who have taken CS50 in the past, realize 745 00:43:50,400 --> 00:43:53,790 that sections have been significantly rebooted this year to be all the more 746 00:43:53,790 --> 00:43:57,700 active, all the more dynamic, and really, a two-way conversation between 747 00:43:57,700 --> 00:44:00,300 teaching staff and students. 748 00:44:00,300 --> 00:44:01,160 >> And walkthroughs. 749 00:44:01,160 --> 00:44:04,520 So for these problem sets, we also offer not only the specification 750 00:44:04,520 --> 00:44:08,110 itself, which is generally a fairly detailed PDF, but also things known 751 00:44:08,110 --> 00:44:12,070 as walkthroughs, whereby one member of the teaching staff will lead a weekly 752 00:44:12,070 --> 00:44:15,460 session that literally walks you through the problem set, giving you 753 00:44:15,460 --> 00:44:18,700 hints, and advice, and starting points, and is meant to ask the very 754 00:44:18,700 --> 00:44:21,370 frequently asked question: where do I begin? 755 00:44:21,370 --> 00:44:25,550 Well, you begin either by diving into the spec on its own, or by attending 756 00:44:25,550 --> 00:44:27,230 or watching these walkthroughs. 757 00:44:27,230 --> 00:44:29,550 The first walkthrough, in fact, will be this Friday. 758 00:44:29,550 --> 00:44:32,120 They'll be on Fridays, not so much because we think it'll be a popular 759 00:44:32,120 --> 00:44:34,940 time, but because we can then film them very early in the week and get 760 00:44:34,940 --> 00:44:38,410 them online by the weekend so that you have as many days as possible to 761 00:44:38,410 --> 00:44:40,530 actually engage in that content as well. 762 00:44:40,530 --> 00:44:43,050 But more on that in lecture this Friday. 763 00:44:43,050 --> 00:44:46,930 >> Now in terms of the support structure, the most significant statistic is 764 00:44:46,930 --> 00:44:50,600 perhaps the 108 teaching fellows and course assistants that this course 765 00:44:50,600 --> 00:44:51,870 currently has. 766 00:44:51,870 --> 00:44:54,490 If some of you who don't have conflicting classes would like to join 767 00:44:54,490 --> 00:44:58,900 me up here on stage, it is these guys who will ultimately really define your 768 00:44:58,900 --> 00:45:00,150 experience in the course. 769 00:45:08,890 --> 00:45:11,870 I had a lot of teaching fellows teaching me classes in the day, and I 770 00:45:11,870 --> 00:45:15,650 remember very few of those, frankly, but to date, I still remember among 771 00:45:15,650 --> 00:45:19,990 those few my CS50 TF, who really helped me answer questions, who really 772 00:45:19,990 --> 00:45:22,830 helped me when I was struggling, and really was a partner in this 773 00:45:22,830 --> 00:45:25,770 experience of learning a very new world. 774 00:45:25,770 --> 00:45:29,100 In a little bit, all of these guys will join you outside for cake, which 775 00:45:29,100 --> 00:45:32,560 is a tradition of CS50, in the transept of Memorial Hall, but let me 776 00:45:32,560 --> 00:45:36,980 first introduce you to Nate Hardison again, Rob Bowden, and Tommy 777 00:45:36,980 --> 00:45:39,370 McWilliams, this year's course heads. 778 00:45:39,370 --> 00:45:41,385 If you guys would join me here in the middle. 779 00:45:47,380 --> 00:45:50,045 They have all prepared some inspirational remarks. 780 00:45:53,212 --> 00:45:55,775 >> TOMMY MCWILLIAMS: I didn't prepare anything inspirational. 781 00:45:55,775 --> 00:45:57,170 But my name is Tommy. 782 00:45:57,170 --> 00:45:58,370 I'm a senior in Mather. 783 00:45:58,370 --> 00:46:01,620 I'm studying computer science, really excited to be on the heads team and 784 00:46:01,620 --> 00:46:03,720 going through the CS50 journey with you. 785 00:46:03,720 --> 00:46:06,750 What I really love about CS50 is how it really teaches you to think about 786 00:46:06,750 --> 00:46:08,180 problems in a new way. 787 00:46:08,180 --> 00:46:11,170 This is really a skill that's going to be invaluable, no matter what field 788 00:46:11,170 --> 00:46:12,090 you go into. 789 00:46:12,090 --> 00:46:14,800 And not only that, but we offer more free candy than any 790 00:46:14,800 --> 00:46:16,050 other course on campus. 791 00:46:22,730 --> 00:46:24,350 So I'm just really looking forward to seeing what 792 00:46:24,350 --> 00:46:25,645 everyone builds this semester. 793 00:46:25,645 --> 00:46:28,860 And if anyone has any questions now or throughout the semester, definitely 794 00:46:28,860 --> 00:46:32,976 feel free to reach out to me, and I'd be happy to help. 795 00:46:32,976 --> 00:46:33,920 >> ROB BOWDEN: Hi. 796 00:46:33,920 --> 00:46:34,670 I'm Rob Bowden. 797 00:46:34,670 --> 00:46:35,920 I'm a senior in Kirkland. 798 00:46:40,030 --> 00:46:41,890 Yeah, that's right. 799 00:46:41,890 --> 00:46:44,070 We're all really excited for this next semester. 800 00:46:44,070 --> 00:46:45,325 We hope you're all excited. 801 00:46:49,850 --> 00:46:51,580 I wasn't expecting that. 802 00:46:51,580 --> 00:46:52,530 Yeah. 803 00:46:52,530 --> 00:46:56,030 So we put so much effort into making this semester really great, and as 804 00:46:56,030 --> 00:46:58,830 long as you're willing to put in the effort, there's so much you can get 805 00:46:58,830 --> 00:47:00,080 out of this course. 806 00:47:06,810 --> 00:47:10,470 You can get a lot of fun out of this course. 807 00:47:10,470 --> 00:47:13,510 We wouldn't have a staff of 108 if you couldn't get a lot of fun out of it, 808 00:47:13,510 --> 00:47:17,450 so just try to be involved, and you won't regret it. 809 00:47:24,815 --> 00:47:26,020 >> NATE HARDISON: Hi, guys. 810 00:47:26,020 --> 00:47:26,930 I'm Nate. 811 00:47:26,930 --> 00:47:29,700 I'm the preceptor for the course. 812 00:47:29,700 --> 00:47:31,200 I'm really excited to be here as well. 813 00:47:31,200 --> 00:47:33,100 This is my first year here. 814 00:47:33,100 --> 00:47:36,520 I hope you all take this course, and enjoy it as much as I've 815 00:47:36,520 --> 00:47:37,960 enjoyed it so far. 816 00:47:37,960 --> 00:47:41,520 And if you ever want to learn how to come to nine or ten in binary, come 817 00:47:41,520 --> 00:47:43,351 talk to me. 818 00:47:43,351 --> 00:47:46,480 >> SPEAKER 1: So at the risk of leaving these guys here on stage a bit 819 00:47:46,480 --> 00:47:50,330 awkwardly, let's whirl through just a few of the things that await before we 820 00:47:50,330 --> 00:47:51,500 adjourn for cake. 821 00:47:51,500 --> 00:47:52,980 What is it that lies ahead? 822 00:47:52,980 --> 00:47:56,410 Well, if we take a quick look back at last year, in problem set zero, your 823 00:47:56,410 --> 00:47:59,960 predecessors dove into a programming language called Scratch, a graphical 824 00:47:59,960 --> 00:48:03,160 programming language you'll use in the first days of the course, starting 825 00:48:03,160 --> 00:48:07,080 this Friday, to learn some concepts unfamiliar to some of you, but realize 826 00:48:07,080 --> 00:48:10,330 there will be an advanced aspect of this for those of you with prior 827 00:48:10,330 --> 00:48:11,070 background. 828 00:48:11,070 --> 00:48:14,082 >> In last year's problem set two, students dove into the world of 829 00:48:14,082 --> 00:48:17,740 cryptography, the art of enciphering or scrambling information, 830 00:48:17,740 --> 00:48:21,310 implementing programs that encrypted data, and in the hacker edition last 831 00:48:21,310 --> 00:48:26,710 year did students proceed to crack or decode the passwords in a typical 832 00:48:26,710 --> 00:48:31,190 computer's .xc password file by coming up with algorithms and heuristics for 833 00:48:31,190 --> 00:48:34,980 brute force figuring out what someone's password on a computer 834 00:48:34,980 --> 00:48:35,770 system was. 835 00:48:35,770 --> 00:48:39,820 Last year or two, in problem set four did students 836 00:48:39,820 --> 00:48:41,420 implement the game of Sudoku. 837 00:48:41,420 --> 00:48:45,180 And the hacker edition that year did students not just implement how to 838 00:48:45,180 --> 00:48:49,360 play the game, but actually a solver, whereby the computer can provide you, 839 00:48:49,360 --> 00:48:52,260 the human, with hints, by more rapidly than you solving 840 00:48:52,260 --> 00:48:53,550 that particular problem. 841 00:48:53,550 --> 00:48:57,420 >> In problem set five, we did forensics, this art of recovering information 842 00:48:57,420 --> 00:49:00,160 that was accidentally or very deliberately 843 00:49:00,160 --> 00:49:01,450 deleted from the computer. 844 00:49:01,450 --> 00:49:04,530 Last year, the teaching staff and I strolled around campus taking 845 00:49:04,530 --> 00:49:07,780 photographs of people, places, and things and then accidentally 846 00:49:07,780 --> 00:49:10,900 formatted the media card on our camera that had all those photos. 847 00:49:10,900 --> 00:49:15,920 But no problem, we made a forensics image of this media card, handed it out 848 00:49:15,920 --> 00:49:19,410 to all students in the class, and challenged them to write programs that 849 00:49:19,410 --> 00:49:22,240 recovered all of the JPEGs from that card. 850 00:49:22,240 --> 00:49:24,720 And this is actually one of our favorite problem sets, and I dug up an 851 00:49:24,720 --> 00:49:27,750 old email from one of your predecessors which was great fun to 852 00:49:27,750 --> 00:49:29,940 read sometime ago. 853 00:49:29,940 --> 00:49:31,270 >> This is from Matt. 854 00:49:31,270 --> 00:49:34,970 Dear David, yesterday my sister accidentally formatted her camera's SD 855 00:49:34,970 --> 00:49:37,770 card and lost a year's worth of memorable photos. 856 00:49:37,770 --> 00:49:40,830 She unfortunately isn't the best at backing up her data. 857 00:49:40,830 --> 00:49:43,780 But this situation reminded me of p-set five, so I thought I would try to 858 00:49:43,780 --> 00:49:47,620 run her SD card through the recover program that I wrote all the way back 859 00:49:47,620 --> 00:49:48,180 in October. 860 00:49:48,180 --> 00:49:51,660 So after four hours of figuring out how to create a raw image from the 861 00:49:51,660 --> 00:49:53,350 formatted SD card-- 862 00:49:53,350 --> 00:49:56,050 Google prove to be pretty helpful in this regard, until I ironically 863 00:49:56,050 --> 00:50:00,140 happened to come across your instructions on the Internet-- 864 00:50:00,140 --> 00:50:03,080 after tinkering around with some of the command line arguments, I managed 865 00:50:03,080 --> 00:50:06,020 to create the forensic image, and after installing and configuring the 866 00:50:06,020 --> 00:50:10,600 CS50 Appliance, I managed to run the forensic image through my program and 867 00:50:10,600 --> 00:50:16,065 recover all 1,027 of my sister's photographs, writes Matt. 868 00:50:25,210 --> 00:50:28,600 >> In last year's problem set six, we gave the students a dictionary of 869 00:50:28,600 --> 00:50:33,350 150,000 English words and challenged them to write a spell checker that 870 00:50:33,350 --> 00:50:36,870 answered queries of the form, is this word spelled correctly or incorrectly 871 00:50:36,870 --> 00:50:38,150 as fast as possible. 872 00:50:38,150 --> 00:50:41,900 And on opt-in basis were students allowed to then challenge classmates 873 00:50:41,900 --> 00:50:45,220 by posting their results, the amount of RAM that they use, the number of 874 00:50:45,220 --> 00:50:49,190 CPU cycles or seconds that they used, so that students were then ranked on 875 00:50:49,190 --> 00:50:53,010 the course's website-- again, purely optional aspect of it, but great fun 876 00:50:53,010 --> 00:50:56,970 in that very often would a student get to position number 10 or so on the big 877 00:50:56,970 --> 00:51:00,370 board, on the website, go off to dinner and then come back, and realize 878 00:51:00,370 --> 00:51:04,340 his roommate had just edged in front of him or her on the big board, 879 00:51:04,340 --> 00:51:07,620 thereby pouring another two or three hours just to one 880 00:51:07,620 --> 00:51:09,300 up his or her roommate. 881 00:51:09,300 --> 00:51:11,730 >> So we look forward to something similar this year as well. 882 00:51:11,730 --> 00:51:15,400 In problem set 7 did we steer in the direction of web programming, actually 883 00:51:15,400 --> 00:51:19,320 solving problems in the ever-increasingly common environment 884 00:51:19,320 --> 00:51:20,300 of a web browser. 885 00:51:20,300 --> 00:51:23,670 Know then decreasingly do we download software on Macs and PCs, but 886 00:51:23,670 --> 00:51:25,790 increasingly, do we do it all within the web. 887 00:51:25,790 --> 00:51:30,140 >> And indeed, last year, some 88% of students' final projects in the course 888 00:51:30,140 --> 00:51:31,790 were web-based. 889 00:51:31,790 --> 00:51:34,670 And those, too, are skills that you will derive from this class by 890 00:51:34,670 --> 00:51:38,410 course's end, because what awaits at course's end is the CS50 Fair, this 891 00:51:38,410 --> 00:51:42,100 exhibition that's based on the idea of a science fair, but in this version of 892 00:51:42,100 --> 00:51:45,370 a fair do all students in the class bring their laptops, and their 893 00:51:45,370 --> 00:51:49,720 friends, and family, and others to Northwest Science, a large building on 894 00:51:49,720 --> 00:51:53,420 campus, set up their laptop, get some food, get some popcorn and drink, and 895 00:51:53,420 --> 00:51:57,180 then exhibit their final projects for all those in attendance, who last year 896 00:51:57,180 --> 00:52:01,510 numbered some 2,500 attendees from across campus, and expressions like 897 00:52:01,510 --> 00:52:05,510 this, and like this were not uncommon at the fair. 898 00:52:05,510 --> 00:52:09,660 >> Leading up to the fair is the CS50 Hackathon, an opportunity to hop on a 899 00:52:09,660 --> 00:52:13,610 Harvard shuttle, head down the street to Microsoft at 8:00 PM, and not go home 900 00:52:13,610 --> 00:52:14,810 until 7:00 AM. 901 00:52:14,810 --> 00:52:19,040 We serve first dinner at 8:00 PM, second dinner at 1:00 AM, and for those still 902 00:52:19,040 --> 00:52:22,540 standing at 5:00 AM do we treat to pancakes at IHOP. 903 00:52:22,540 --> 00:52:26,580 And the Hackathon is an opportunity, as pictured here, to dive into your 904 00:52:26,580 --> 00:52:30,470 final projects, whether working on your own or with friends in a 905 00:52:30,470 --> 00:52:33,770 collaborative environment, where the entire teaching staff is working well 906 00:52:33,770 --> 00:52:37,560 into the night with an ample supply of Hong Kong Chinese food. 907 00:52:37,560 --> 00:52:43,070 At 5:00 AM will such images as these be quite common this year as well. 908 00:52:43,070 --> 00:52:48,170 >> So as we adjourn in a moment for cake, keep in mind that 76% percent of the 909 00:52:48,170 --> 00:52:51,720 people in this room have no prior experience, and as per the syllabus, 910 00:52:51,720 --> 00:52:55,300 what ultimately matters in this course is not so much where you end up 911 00:52:55,300 --> 00:52:59,540 relative to your classmates, but where you, in week 11, end up relative to 912 00:52:59,540 --> 00:53:01,540 yourself in week 0. 913 00:53:01,540 --> 00:53:03,690 This is CS50.