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