1 00:00:00,506 --> 00:00:20,546 [Music] 2 00:00:21,046 --> 00:00:31,236 >> Mamma who bore me Mamma who gave me No way to handle things 3 00:00:31,236 --> 00:00:38,906 Who made me so bad Mamma, the weeping Mamma, the angels, 4 00:00:39,296 --> 00:00:47,946 No sleep in heaven Or Bethlehem. 5 00:00:47,946 --> 00:00:53,376 >> Mamma who bore me Mamma 6 00:00:53,926 --> 00:01:01,036 who gave me Mamma the angels who made me so sad. 7 00:01:04,446 --> 00:01:11,726 Mamma who bore me Mamma who gave me No way 8 00:01:12,706 --> 00:01:21,106 to handle things who made me so sad. 9 00:01:23,466 --> 00:01:31,426 Mamma the weeping Mamma the angels. 10 00:01:35,156 --> 00:01:50,046 No sleep in heaven or Bethlehem Some pray that one day, 11 00:01:50,376 --> 00:01:53,426 Christ will come a'-callin'. 12 00:01:53,926 --> 00:01:57,616 They light a candle and hope that it glows. 13 00:01:57,646 --> 00:01:59,116 Some just lie there crying for Him to come and find them 14 00:01:59,146 --> 00:02:00,196 But when He comes they don't know how to go. 15 00:02:00,226 --> 00:02:01,726 Mamma who bore me Mamma who gave me No way to handle things 16 00:02:01,756 --> 00:02:03,106 Who made me so bad Mamma, the weeping Mamma, the angels, 17 00:02:03,136 --> 00:02:03,976 No sleep in heaven Or Bethlehem. 18 00:02:04,516 --> 00:02:11,546 [Applause and cheers] 19 00:02:12,046 --> 00:02:12,776 >> Thanks, guys. 20 00:02:12,776 --> 00:02:14,496 We are the cast of "Spring Awakening." 21 00:02:14,946 --> 00:02:16,436 The show goes up in the Oberon 22 00:02:16,436 --> 00:02:18,756 between November 30 and December 5. 23 00:02:18,916 --> 00:02:21,086 Go to awakening at Oberon dot com, 24 00:02:21,086 --> 00:02:23,126 that's awakening a-t Oberon dot com 25 00:02:23,126 --> 00:02:24,466 for tickets and more information. 26 00:02:24,626 --> 00:02:25,196 Thanks, guys. 27 00:02:25,346 --> 00:02:25,936 Enjoy your lecture. 28 00:02:26,516 --> 00:03:12,896 [Cheering, laughter and music] 29 00:03:13,396 --> 00:03:17,946 >> Some things we don't talk about better do 30 00:03:18,016 --> 00:03:25,696 without just hold a smile we're falling in and out 31 00:03:25,696 --> 00:03:31,146 of love the same damn problem together all the while you can 32 00:03:32,526 --> 00:03:42,076 never say never why we don't know when time 33 00:03:42,916 --> 00:04:02,576 and time again younger now then we were before don't let me go, 34 00:04:10,356 --> 00:04:18,996 don't let me go, don't let me go, don't let me go, 35 00:04:25,536 --> 00:04:45,616 don't let me go, don't let me go picture, you're the queen 36 00:04:47,506 --> 00:05:04,016 of everything as far as the eye can see 37 00:05:14,366 --> 00:05:21,196 under your command I will be your guardian 38 00:05:23,406 --> 00:05:30,786 when all is crumbling steady your hand you can never say 39 00:05:30,816 --> 00:05:31,836 never why we don't know when time and time 40 00:05:31,866 --> 00:05:33,426 and time again younger now then we were before don't let me go, 41 00:05:33,456 --> 00:05:34,776 don't let me go, don't let me go, don't let me go, 42 00:05:34,806 --> 00:05:36,156 don't let me go, don't let me go we're falling apart 43 00:05:36,186 --> 00:05:37,566 and coming together again and again we're coming apart 44 00:05:37,596 --> 00:05:38,976 but we pull it together pull it together, together again 45 00:05:39,516 --> 00:06:15,436 [Music] 46 00:06:15,936 --> 00:06:34,076 >> don't let me go, don't let me go, don't let me go, 47 00:06:35,796 --> 00:06:41,096 don't let me go, don't let me go, 48 00:06:41,326 --> 00:06:55,816 don't let me go don't let me go, don't let me go, 49 00:06:55,816 --> 00:06:58,976 don't let me go don't let me go, don't let me go, don't let me go 50 00:06:59,516 --> 00:07:19,996 [Music and applause] 51 00:07:20,496 --> 00:07:24,576 >> So this is or was CS50. 52 00:07:24,576 --> 00:07:25,936 My name is David Malan, 53 00:07:25,936 --> 00:07:29,006 and I will be your instructor one last time today. 54 00:07:29,396 --> 00:07:32,876 A word of thanks to the huge team this year that's made 55 00:07:32,876 --> 00:07:34,616 everything quite possible. 56 00:07:34,616 --> 00:07:37,596 This is a record size staff that we've had this year -- 57 00:07:37,596 --> 00:07:39,956 if you guys want to come on stage in the edge here, 58 00:07:39,956 --> 00:07:41,966 full circle like the beginning of the term. 59 00:07:42,516 --> 00:07:48,576 [Applause] 60 00:07:49,076 --> 00:07:53,276 >> Only, only a few were able to skip class for this today, 61 00:07:53,446 --> 00:07:58,166 but our team of TFs and CAs numbers 100 this year 62 00:07:58,166 --> 00:07:59,616 for the first time in history, 63 00:07:59,676 --> 00:08:02,416 so without them we certainly could not have made this 64 00:08:02,416 --> 00:08:05,826 semester possible, and a huge thanks, too, to Barry and Kevin 65 00:08:05,826 --> 00:08:06,916 and the Abos and Chris 66 00:08:06,916 --> 00:08:09,206 and really everyone who's been working behind the scenes 67 00:08:09,206 --> 00:08:12,636 to make everything here possible this year, and particularly 68 00:08:12,636 --> 00:08:14,826 to those folks with whom you've gotten familiar on camera -- 69 00:08:14,856 --> 00:08:17,236 Jason in Section, Tommy and Walkthrough, 70 00:08:17,516 --> 00:08:21,176 and my heartfelt thanks to Rob Bowden and Matt Chartier, 71 00:08:21,176 --> 00:08:24,406 without whom we would not have this extraordinary team. 72 00:08:24,406 --> 00:08:27,236 Allow us to take a look at the team 73 00:08:27,356 --> 00:08:31,426 that was CS50 staff 2011 here. 74 00:08:32,516 --> 00:08:39,016 [Music] 75 00:08:39,516 --> 00:08:44,986 >> My heart's a stereo It beats for you, 76 00:08:45,416 --> 00:08:48,256 so listen close Hear my thoughts 77 00:08:48,296 --> 00:08:53,456 in every no-o-o-te Make me your radio And turn me 78 00:08:53,696 --> 00:08:56,776 up when you feel low This melody was meant 79 00:08:57,046 --> 00:09:01,716 for you Just sing along to my stereo Gym Class Heroes baby! 80 00:09:01,716 --> 00:09:03,286 If I was just another dusty record 81 00:09:03,286 --> 00:09:05,266 on the shelf Would you blow me off 82 00:09:05,266 --> 00:09:06,946 and play me like everybody else? 83 00:09:06,946 --> 00:09:12,576 If I asked you to scratch my back, could you manage that? 84 00:09:12,736 --> 00:09:16,776 Like yea fucked up, check it Travie, I can handle 85 00:09:16,776 --> 00:09:20,896 that Furthermore, I apologize 86 00:09:21,006 --> 00:09:24,856 for any skipping tracks It's just the last girl 87 00:09:25,356 --> 00:09:30,796 that played me left a couple cracks I used to, used to, 88 00:09:30,926 --> 00:09:38,956 used to, now I'm over that 'Cause holding grudges 89 00:09:41,396 --> 00:09:57,956 over love is ancient artifacts If I could only find a note 90 00:09:58,596 --> 00:10:07,336 to make you understand I'd sing it softly in your ear 91 00:10:07,336 --> 00:10:12,386 and grab you by the hand Just keep it stuck inside your head, 92 00:10:12,386 --> 00:10:19,576 like your favorite tune And know my heart's a stereo 93 00:10:19,946 --> 00:10:25,866 that only plays for you My heart's a stereo It beats 94 00:10:25,866 --> 00:10:28,776 for you, so listen close Hear my thoughts 95 00:10:28,776 --> 00:10:35,956 in every no-o-o-te Make me your radio And turn me 96 00:10:36,076 --> 00:10:43,716 up when you feel low This melody was meant 97 00:10:44,256 --> 00:10:53,676 for you Just sing along to my stereo Oh oh oh oh, 98 00:10:55,046 --> 00:11:08,346 oh oh oh oh to my stereo Oh oh oh oh so sing along to my stereo 99 00:11:08,796 --> 00:11:09,926 >> Travie McCoy: Let's go! 100 00:11:09,926 --> 00:11:20,006 If I was an old-school fifty pound boombox (remember them?) 101 00:11:20,006 --> 00:11:24,366 Would you hold me on your shoulder wherever you walk Would 102 00:11:25,066 --> 00:11:31,726 you turn my volume up in front of the cops (turn it up) 103 00:11:32,086 --> 00:11:38,346 And crank it higher every time they told you to stop 104 00:11:38,376 --> 00:11:39,936 And all I ask is that you don't get mad at me When you have 105 00:11:39,966 --> 00:11:41,406 to purchase mad D batteries Appreciate every mixtape your 106 00:11:41,436 --> 00:11:42,486 friends make You never know we come and go 107 00:11:42,516 --> 00:11:43,866 like on the interstate I think I finally found a note 108 00:11:43,896 --> 00:11:45,246 to make you understand If you can hit it, sing along 109 00:11:45,276 --> 00:11:46,836 and take me by the hand Just keep me stuck inside your head, 110 00:11:46,866 --> 00:11:48,126 like your favorite tune You know my heart's a stereo 111 00:11:48,156 --> 00:11:48,756 that only plays for you 112 00:11:48,786 --> 00:11:49,746 >> Chorus: My heart's a stereo It beats for you, 113 00:11:49,776 --> 00:11:50,526 so listen close Hear my thoughts 114 00:11:50,556 --> 00:11:51,786 in every no-o-o-te Make me your radio Turn me 115 00:11:51,816 --> 00:11:52,896 up when you feel low This melody was meant 116 00:11:52,926 --> 00:11:54,156 for you Just sing along to my stereo Oh oh oh oh, 117 00:11:54,186 --> 00:11:55,776 oh oh oh oh to my stereo Oh oh oh oh so sing along to my stereo 118 00:11:55,806 --> 00:11:56,946 >> Bridge: I only pray you'll never leave me behind (never 119 00:11:56,976 --> 00:11:58,596 leave me) Because good music can be so hard to find (so hard 120 00:11:58,626 --> 00:11:59,796 to find) I take your head and hold it closer 121 00:11:59,826 --> 00:12:01,266 to mine Thought love was dead, but now you're changing my mind 122 00:12:01,296 --> 00:12:02,256 >> Chorus: My heart's a stereo It beats for you, 123 00:12:02,286 --> 00:12:03,036 so listen close Hear my thoughts 124 00:12:03,066 --> 00:12:04,296 in every no-o-o-te Make me your radio Turn me 125 00:12:04,326 --> 00:12:05,406 up when you feel low This melody was meant 126 00:12:05,436 --> 00:12:06,666 for you Just sing along to my stereo Oh oh oh oh, 127 00:12:06,696 --> 00:12:08,136 oh oh oh oh to my stereo Oh oh oh oh (Gym Class Heroes baby!) 128 00:12:08,166 --> 00:12:08,976 so sing along to my stereo Yeah 129 00:12:09,516 --> 00:12:16,776 [Applause] 130 00:12:17,276 --> 00:12:20,766 >> So Matt and Rob unfortunately could not be here today, 131 00:12:20,766 --> 00:12:23,356 but we thought we would conference them in in absentia 132 00:12:23,776 --> 00:12:27,286 with a little clip that both Rob and Matt prepared in advance, 133 00:12:27,366 --> 00:12:29,936 so I give you Rob Bowden. 134 00:12:32,186 --> 00:12:33,446 >> Hey, guys. 135 00:12:33,646 --> 00:12:34,856 Good work! 136 00:12:35,516 --> 00:12:42,616 [Applause] 137 00:12:43,116 --> 00:12:45,846 >> Matt's was perhaps a bit more heartfelt for us all. 138 00:12:46,516 --> 00:12:53,516 [Background voices] 139 00:12:54,016 --> 00:12:54,746 >> Oh, hi! 140 00:12:54,746 --> 00:12:55,146 Didn't see you. 141 00:12:55,356 --> 00:12:57,296 My name is Matthew Chartier. 142 00:12:57,726 --> 00:13:01,056 You might remember me from such CS50 events as "Section" 143 00:13:01,056 --> 00:13:02,606 and "Quincy Office Hours." 144 00:13:03,036 --> 00:13:05,146 Though unfortunately not able to join you in lecture today, 145 00:13:05,146 --> 00:13:11,396 I still wanted to take the opportunity 146 00:13:11,396 --> 00:13:16,496 to impart some thoughts as we near the end of the semester. 147 00:13:16,496 --> 00:13:20,566 I said at the start of this year that CS50 is one 148 00:13:20,566 --> 00:13:22,306 of those rare forces at Harvard College 149 00:13:22,486 --> 00:13:25,386 that is sufficiently challenging, populous, elaborate 150 00:13:25,386 --> 00:13:27,236 and fun to create a sense 151 00:13:27,236 --> 00:13:33,966 of community throughout the entire course 152 00:13:34,206 --> 00:13:36,146 and to provide an experience 153 00:13:36,146 --> 00:13:39,026 that is not only useful but memorable. 154 00:13:39,026 --> 00:13:44,936 My hope is that now, just a few months later, 155 00:13:44,936 --> 00:13:48,676 you have a more personal understanding 156 00:13:48,676 --> 00:13:50,366 of what I was talking about. 157 00:13:51,646 --> 00:13:54,816 But as rewarding as CS50 was for me as a student, 158 00:13:54,816 --> 00:13:56,736 it's been even more so as a member of the staff. 159 00:13:56,736 --> 00:14:00,446 Over my last three years with the course, 160 00:14:00,446 --> 00:14:05,686 I've had the opportunity to work with some of the most talented 161 00:14:05,686 --> 00:14:11,026 and passionate people I've encountered throughout my 162 00:14:11,466 --> 00:14:12,236 college career. 163 00:14:16,406 --> 00:14:19,316 The dedication and personality 164 00:14:19,316 --> 00:14:21,556 of this course's staff are what make all the ambitious 165 00:14:21,556 --> 00:14:24,496 and unique things that we do possible. 166 00:14:24,496 --> 00:14:25,256 And the friendship 167 00:14:25,256 --> 00:14:29,486 and camaraderie I found among them has been one 168 00:14:29,626 --> 00:14:32,646 of the highlights of my time at Harvard. 169 00:14:32,646 --> 00:14:36,056 On that note, I'd like to thank the CAs, TFs, Glenn, Chris, Rob, 170 00:14:36,056 --> 00:14:37,936 and David for all the work they've put 171 00:14:38,476 --> 00:14:43,276 into making the course possible, both this year and years past. 172 00:14:43,276 --> 00:14:48,476 It's truly been one of the most engaging 173 00:14:48,476 --> 00:14:51,016 and rewarding experiences in my life, 174 00:14:51,016 --> 00:14:52,046 and I'll remember it fondly. 175 00:14:52,046 --> 00:14:53,206 I hope you will, too. 176 00:14:53,386 --> 00:14:55,186 This is CS50, and I'll see you. 177 00:14:55,186 --> 00:14:55,906 >> Matt Chartier. 178 00:14:55,906 --> 00:14:58,966 So in just a bit our team of TFs 179 00:14:58,966 --> 00:15:01,786 and CAs will be joining us downstairs for cake. 180 00:15:01,786 --> 00:15:04,106 If you guys want to bring the preparations thereof, 181 00:15:04,106 --> 00:15:05,766 Tommy can lead the way, I think. 182 00:15:05,766 --> 00:15:11,076 In the meantime, a couple of announcements as we dive 183 00:15:11,076 --> 00:15:12,246 into this wrap-up today. 184 00:15:12,246 --> 00:15:17,266 So as you think about where you want to go 185 00:15:17,266 --> 00:15:19,766 with your final projects after the CS50 fair, 186 00:15:19,796 --> 00:15:22,726 know that in addition to opportunities like -- 187 00:15:22,726 --> 00:15:24,756 Tommy, follow them -- so in addition to opportunities 188 00:15:24,756 --> 00:15:27,166 like the Hack Harvard Group, know too that the UC has begun 189 00:15:27,166 --> 00:15:30,816 to support student projects that aim to improve the quality 190 00:15:30,816 --> 00:15:33,786 of our experience here on campus, 191 00:15:33,786 --> 00:15:37,816 so these slides will be online if you'd like to read up more 192 00:15:37,816 --> 00:15:39,966 on this, but know that this opportunity 193 00:15:39,966 --> 00:15:41,416 from the UC now exists. 194 00:15:41,596 --> 00:15:47,366 And from SEAS as well, over January term this year, 195 00:15:47,366 --> 00:15:50,396 if you are interested in learning a bit about design 196 00:15:50,396 --> 00:15:51,516 from actual designers, 197 00:15:51,516 --> 00:15:54,326 from a very well-known company called IDO, 198 00:15:54,326 --> 00:15:57,046 know that this workshop will be a hands-on opportunity during 199 00:15:57,046 --> 00:15:59,996 winter session, to do exactly that and be mentored 200 00:15:59,996 --> 00:16:02,786 by some experts in the field, so head to that url if of interest. 201 00:16:02,786 --> 00:16:04,306 We indeed have some cakes -- three cakes, no less. 202 00:16:04,306 --> 00:16:05,936 Normally each year we try to come up with very clever slogans 203 00:16:05,966 --> 00:16:06,656 to emblazon on these cakes. 204 00:16:06,686 --> 00:16:07,796 Despite the confusion it creates with Shaw's, 205 00:16:07,826 --> 00:16:09,326 where we have them made, this year we simply went with 0, 206 00:16:09,356 --> 00:16:10,496 1 and 2, all of which awaits you downstairs. 207 00:16:10,526 --> 00:16:11,456 Not as funny as it was in my head. 208 00:16:11,486 --> 00:16:12,266 Okay. And now, the retrospective. 209 00:16:12,296 --> 00:16:13,136 So 13-some weeks ago we dove 210 00:16:13,166 --> 00:16:14,366 into this programming language we called Scratch 211 00:16:14,396 --> 00:16:15,746 with which you hopefully had a lot of fun and began 212 00:16:15,776 --> 00:16:16,766 to explore some of the fundamentals 213 00:16:16,796 --> 00:16:17,726 of computer science and programming. 214 00:16:17,756 --> 00:16:19,136 Well, for those submissions the teaching fellows reviewed all 215 00:16:19,166 --> 00:16:20,636 of them way back when, and nominated, as is our tradition, 216 00:16:20,666 --> 00:16:21,386 a few for some fun awards 217 00:16:21,416 --> 00:16:22,856 of sorts whereby these projects will become immortalized 218 00:16:22,886 --> 00:16:23,606 in the course's gallery online. 219 00:16:23,636 --> 00:16:24,476 The one that the staff nominated 220 00:16:24,506 --> 00:16:25,886 as the cutest Scratch project this year is by Brett, 221 00:16:25,916 --> 00:16:27,026 and we will let it speak here for itself. 222 00:16:27,056 --> 00:16:28,376 Allow me to play this year's cutest Scratch project 223 00:16:28,406 --> 00:16:28,976 from 13 weeks back. 224 00:16:32,196 --> 00:16:45,836 >> Teenage Mutant Ninja Turtles Teenage Mutant Ninja Turtles 225 00:16:46,856 --> 00:16:54,226 Teenage Mutant Ninja Turtles Heroes 226 00:16:54,226 --> 00:16:58,976 in a half-shell Turtle power! 227 00:16:59,186 --> 00:17:08,386 They're the world's most fearsome fighting team Teenage 228 00:17:08,386 --> 00:17:13,616 Mutant Ninja Turtles (We're really hip!) 229 00:17:13,616 --> 00:17:16,316 They're heroes in a half-shell 230 00:17:16,396 --> 00:17:21,276 and they're green Teenage Mutant Ninja Turtles (Hey - 231 00:17:21,806 --> 00:17:22,816 get a grip!) 232 00:17:23,726 --> 00:17:31,316 When the evil Shredder attacks These Turtle boys don't cut him 233 00:17:31,316 --> 00:17:32,466 no slack! 234 00:17:32,746 --> 00:17:34,426 Teenage Mutant Ninja Turtles Teenage Mutant Ninja Turtles 235 00:17:34,456 --> 00:17:36,016 Splinter taught them to be ninja teens Teenage Mutant Ninja 236 00:17:36,046 --> 00:17:36,766 Turtles (He's a radical rat!) 237 00:17:36,796 --> 00:17:38,386 Leonardo leads, Donatello does machines Teenage Mutant Ninja 238 00:17:38,416 --> 00:17:39,076 Turtles (That's a fact, Jack!) 239 00:17:39,106 --> 00:17:40,126 Raphael is cool but crude (Gimme a break!) 240 00:17:40,156 --> 00:17:41,146 Michaelangelo is a party dude (Party!) 241 00:17:41,176 --> 00:17:42,766 Teenage Mutant Ninja Turtles Teenage Mutant Ninja Turtles 242 00:17:42,796 --> 00:17:43,756 Teenage Mutant Ninja Turtles Heroes 243 00:17:43,786 --> 00:17:44,446 in a half shell Turtle power! 244 00:17:44,476 --> 00:17:45,586 >> Our second Scratch award for this year goes 245 00:17:45,616 --> 00:17:46,606 to a new category -- the most inceptive. 246 00:17:46,636 --> 00:17:47,386 Allow me to play this one here. 247 00:17:47,416 --> 00:17:48,976 This one is interactive, so I shall play along as instructed. 248 00:17:49,516 --> 00:17:51,709 [Slides read as follows: 249 00:17:52,209 --> 00:17:54,402 "Dream Diving" created by Michael Hoffman. 250 00:17:54,902 --> 00:17:57,095 "Welcome to the Future. 251 00:17:57,595 --> 00:17:59,788 Extraction and Inception are Common Practices Here. 252 00:18:00,288 --> 00:18:02,481 Your name is Stan and you work for the NSA. 253 00:18:02,981 --> 00:18:05,174 The nation's most coveted security information has been 254 00:18:05,674 --> 00:18:07,867 extracted from your mind. 255 00:18:08,367 --> 00:18:10,560 You just find out who stole it 256 00:18:11,060 --> 00:18:13,253 or else the entire world will be doomed. 257 00:18:13,753 --> 00:18:15,946 Through your training and good fortune, you succeeded 258 00:18:16,446 --> 00:18:18,639 in kidnapping one member of the extraction team. 259 00:18:19,139 --> 00:18:21,332 You must now extract the names of the other members of the team 260 00:18:21,832 --> 00:18:24,025 in order to arrest them and prevent the information 261 00:18:24,525 --> 00:18:26,718 from landing in the wrong hands. 262 00:18:27,218 --> 00:18:29,411 If you make mistakes, you must go deeper into the dream. 263 00:18:29,911 --> 00:18:32,104 Good luck, and remember... 264 00:18:32,604 --> 00:18:34,797 If you die in the dream, you don't wake up. 265 00:18:35,297 --> 00:18:37,490 This is your hotel room. 266 00:18:37,990 --> 00:18:40,183 The man in the corner is the member 267 00:18:40,683 --> 00:18:42,876 of the team you kidnapped. 268 00:18:43,376 --> 00:18:45,569 You must enter the dream and extract the names. 269 00:18:46,069 --> 00:18:48,262 What did you want to do? 270 00:18:48,762 --> 00:18:50,955 (a) drug him (b) go deeper.] 271 00:18:51,466 --> 00:18:53,466 >> I shall hit "A." 272 00:18:56,016 --> 00:18:56,462 [Slides read: Good, he fell asleep! 273 00:18:56,462 --> 00:18:56,908 Now what? (c) Call your partners. 274 00:18:56,908 --> 00:18:57,354 (d) Go deeper.] 275 00:18:57,356 --> 00:18:58,896 >> I shall hit "C." 276 00:19:01,506 --> 00:19:04,376 >> I shall hit "E." 277 00:19:05,916 --> 00:19:06,766 >> I shall hit "F." 278 00:19:08,516 --> 00:19:11,192 [Slide reads: Welcome to the first level of the dream (not 279 00:19:11,692 --> 00:19:14,368 to imply that there will be more). 280 00:19:14,868 --> 00:19:17,544 This is the spot where the subject got married.] 281 00:19:18,046 --> 00:19:21,706 >> Why don't we cut it off there so leave it suspenseful. 282 00:19:21,706 --> 00:19:27,256 We will link this online so you can finish the story. 283 00:19:27,256 --> 00:19:29,906 And so finally, that was by Michael Hoffman -- 284 00:19:29,906 --> 00:19:33,896 finally by Blake Walsh is this year's most amazing, 285 00:19:33,896 --> 00:19:37,286 a recreation of a classic game. 286 00:19:38,516 --> 00:20:06,886 [Frog video game playing and Applause] 287 00:20:07,386 --> 00:20:08,976 >> I actually practiced that this morning. 288 00:20:09,366 --> 00:20:10,416 All right. 289 00:20:10,796 --> 00:20:13,506 So we have some other awards that we typically bestow 290 00:20:13,506 --> 00:20:15,166 and then honor on the course's Web site, 291 00:20:15,166 --> 00:20:16,936 namely that for problem set 5. 292 00:20:16,936 --> 00:20:18,906 In addition to recovering this year's photos, 293 00:20:18,906 --> 00:20:20,006 recall that you were challenged 294 00:20:20,006 --> 00:20:23,416 to then go find those folks somewhere on campus, 295 00:20:23,666 --> 00:20:25,516 and if you did, we promised 296 00:20:25,516 --> 00:20:28,366 to bestow upon you a fabulous award. 297 00:20:28,366 --> 00:20:29,816 Well, we had one runner-up. 298 00:20:29,886 --> 00:20:32,656 This was from -- you can guess whose section here -- 299 00:20:32,656 --> 00:20:35,726 Brian Zang submitted this on behalf of his section here, 300 00:20:35,936 --> 00:20:38,236 but they only found a few of the staff members 301 00:20:38,236 --> 00:20:41,876 and were definitely in the end vested by Lucas Fratas's section 302 00:20:41,876 --> 00:20:43,696 with Neil Woo's section, 303 00:20:44,246 --> 00:20:46,586 pictured here posing quite awkwardly with two 304 00:20:46,586 --> 00:20:48,106 of our team members here. 305 00:20:48,316 --> 00:20:50,296 But Lucas thought he'd be funny, 306 00:20:50,566 --> 00:20:53,296 and when he submitted his photographs to us, 307 00:20:53,296 --> 00:20:56,916 he wrote us the following note: "Hey, David, in anticipation 308 00:20:56,916 --> 00:20:59,796 of this problem set, I spent the past several days snapping 309 00:20:59,796 --> 00:21:03,346 photos, creeping TFs, I don't know, all of which were saved 310 00:21:03,346 --> 00:21:08,456 by digital camera as jpegs on a 4-gigabyte compact flashcard. 311 00:21:09,346 --> 00:21:11,596 Unfortunately I'm not very good with computers, 312 00:21:11,596 --> 00:21:13,086 and I somehow deleted them all. 313 00:21:14,086 --> 00:21:17,926 Thankfully in the computer world, deleted tends not 314 00:21:17,926 --> 00:21:19,896 to mean deleted so much as forgotten. 315 00:21:20,086 --> 00:21:22,566 My computer insists that the CF card is now blank, 316 00:21:22,566 --> 00:21:24,226 and I'm pretty sure it's lying to me. 317 00:21:24,536 --> 00:21:27,766 I attached a copy of my memory card to this e-mail. 318 00:21:29,016 --> 00:21:30,936 Hope you can create a program to recover them." 319 00:21:31,516 --> 00:21:38,916 [Applause] 320 00:21:39,416 --> 00:21:42,506 >> So in problem set 6 recall there was a bit of a challenge 321 00:21:42,506 --> 00:21:44,496 that of the big board to write the program 322 00:21:44,496 --> 00:21:46,836 that used the least amount of CPU cycles 323 00:21:46,836 --> 00:21:49,006 and the least amount of RAM. 324 00:21:49,006 --> 00:21:52,166 Well, this is a system that gets gamed every year, 325 00:21:52,166 --> 00:21:54,516 and it actually is a wonderful tool for recruiting 326 00:21:54,516 --> 00:21:57,266 since those atop the big board are inevitably cheating 327 00:21:57,266 --> 00:21:58,916 in some clever, technical way. 328 00:21:59,566 --> 00:22:03,136 So here are the top ten from this year's big board. 329 00:22:03,346 --> 00:22:06,096 Some of these times we are pretty sure are not 330 00:22:06,286 --> 00:22:07,396 actually possible. 331 00:22:07,396 --> 00:22:08,736 In particular you'll notice 332 00:22:09,016 --> 00:22:12,526 that a certain Daniel Robinson somehow has the curious number 333 00:22:12,526 --> 00:22:18,296 1.337 as his running time, so it turns out there are ways 334 00:22:18,296 --> 00:22:22,196 to cheat the system, but what this will only make us better 335 00:22:22,196 --> 00:22:24,256 at detecting such things next year. 336 00:22:24,296 --> 00:22:28,306 But the top ten is certainly a nice place to be. 337 00:22:28,476 --> 00:22:30,906 But we had another big board in problem set 7. 338 00:22:30,906 --> 00:22:32,796 This one, too, attracts a big 339 00:22:32,796 --> 00:22:35,166 of cleverness every year whereby you were challenged 340 00:22:35,166 --> 00:22:37,936 to invest some 10,000 virtual dollars. 341 00:22:38,236 --> 00:22:40,806 Curiously my penny stock has actually been performing very 342 00:22:40,806 --> 00:22:42,226 well over the past several weeks, 343 00:22:42,456 --> 00:22:45,766 but I was significantly outdone by Kenny. 344 00:22:46,026 --> 00:22:51,156 So congratulations to Kenny 345 00:22:51,156 --> 00:22:53,346 for being atop this year's Big Board. 346 00:22:53,756 --> 00:22:56,486 Now, as we look ahead, what remains still even 347 00:22:56,486 --> 00:22:58,296 after today is the CS50 Hackathon 348 00:22:58,296 --> 00:23:01,286 for which you should have received an e-mail about RSVP'g, 349 00:23:01,286 --> 00:23:04,586 and then thereafter is the true climax of the course 350 00:23:04,586 --> 00:23:08,136 on December 9, a Friday, the first in the midst 351 00:23:08,136 --> 00:23:10,966 of reading period, and this is this year's CS50 Fair, 352 00:23:10,966 --> 00:23:13,716 and it promises to be bigger and better than ever. 353 00:23:14,016 --> 00:23:17,546 And to get you excited and to get your friends excited 354 00:23:17,546 --> 00:23:19,436 about dropping by the fair that day, 355 00:23:19,736 --> 00:23:23,026 the teaching fellows have put together, along with the CAs, 356 00:23:23,126 --> 00:23:26,386 a little video edited by our own Julia Middleman. 357 00:23:26,386 --> 00:23:30,976 So I give you this year's CS50 Fair promo. 358 00:23:31,516 --> 00:23:51,626 [Music] 359 00:23:52,126 --> 00:23:52,876 >> Y'all ready for this? 360 00:23:53,516 --> 00:24:17,096 [Music] 361 00:24:17,596 --> 00:24:18,976 >> Every day I'm shuffling. 362 00:24:19,516 --> 00:25:05,546 [Music] 363 00:25:06,046 --> 00:25:06,666 >> Y'all ready for this? 364 00:25:07,516 --> 00:25:15,546 [Applause] 365 00:25:16,046 --> 00:25:20,096 >> So a word now about life after 50. 366 00:25:20,096 --> 00:25:24,436 So you've spent the past several weeks exploring all sorts 367 00:25:24,436 --> 00:25:27,066 of new tools and languages and environments 368 00:25:27,066 --> 00:25:29,516 but otherwise tether to your own laptop 369 00:25:29,516 --> 00:25:31,436 and particularly the CS50 appliance. 370 00:25:31,726 --> 00:25:33,326 Realize, though, that there are all sorts 371 00:25:33,326 --> 00:25:36,106 of directions you can go in after 50 both academically 372 00:25:36,276 --> 00:25:38,866 as well as on your own even without future coursework 373 00:25:38,866 --> 00:25:42,006 so that you can program on your own machines. 374 00:25:42,236 --> 00:25:44,106 I would be remiss if I didn't point 375 00:25:44,106 --> 00:25:46,226 out a new course that's being offered this spring 376 00:25:46,226 --> 00:25:47,956 on mobile software engineering. 377 00:25:48,356 --> 00:25:51,596 Though this will essentially pick up where CS50 left off, 378 00:25:51,596 --> 00:25:53,196 spending about a third of the semester 379 00:25:53,196 --> 00:25:56,746 on object oriented Javascript and web programming 380 00:25:56,796 --> 00:25:59,056 in that space, as well as the latter two-thirds 381 00:25:59,056 --> 00:26:02,016 of the semester on IOS programming, iPhones and iPads, 382 00:26:02,016 --> 00:26:04,786 ultimately it's meant to be a software engineering course 383 00:26:04,786 --> 00:26:07,966 on how to write good and better software, and particularly how 384 00:26:07,966 --> 00:26:09,526 to collaborate with a partner. 385 00:26:09,526 --> 00:26:12,276 And so you'll be encouraged to enroll in the class 386 00:26:12,276 --> 00:26:14,186 with a friend with whom you'll be able to work 387 00:26:14,316 --> 00:26:15,906 on the course's projects. 388 00:26:15,906 --> 00:26:20,496 So more details can be found at courses dot cs50 dot net. 389 00:26:20,916 --> 00:26:24,086 Now, as for using your own hardware and own software 390 00:26:24,086 --> 00:26:26,946 after CS50, it turns out that the CS50 appliance, 391 00:26:26,946 --> 00:26:30,266 more than just a CS50-specific tool, 392 00:26:30,436 --> 00:26:32,186 is actually quite generalizable. 393 00:26:32,186 --> 00:26:35,176 So even I and a lot of the TFs have started using our own CS50 394 00:26:35,176 --> 00:26:37,516 appliance for writing code and working 395 00:26:37,516 --> 00:26:40,436 on projects completely unrelated to CS50 simply 396 00:26:40,436 --> 00:26:42,756 because it is the self-contained appliance. 397 00:26:42,846 --> 00:26:45,866 It's the self-contained server that can run web code C-code, 398 00:26:45,986 --> 00:26:50,106 Python, Pearl, PHP, all sorts of languages can be installed 399 00:26:50,106 --> 00:26:53,286 in if not even there already, and so it allows you then 400 00:26:53,286 --> 00:26:56,396 to have a nice clean sort of industry standard environment 401 00:26:56,396 --> 00:26:57,336 with which to program. 402 00:26:57,336 --> 00:26:59,426 However, with that said, if you're a Mac user, 403 00:26:59,596 --> 00:27:02,566 know then that you can indeed continue using the appliance 404 00:27:02,566 --> 00:27:04,396 in a manner similar to what you've been doing, 405 00:27:04,656 --> 00:27:06,596 but if you want to take things to the next level 406 00:27:06,596 --> 00:27:09,176 if you're running Snow Leopard or Lion, you can download 407 00:27:09,176 --> 00:27:11,326 for free with some exceptions -- 408 00:27:11,326 --> 00:27:13,426 details are in the CS50 Manual -- 409 00:27:13,426 --> 00:27:15,446 a problem called Xcode from Apple, 410 00:27:16,016 --> 00:27:18,436 which is an Integrated Development Environment, IDE. 411 00:27:18,436 --> 00:27:22,346 It's sort of a much fancier version of gedit that allows you 412 00:27:22,346 --> 00:27:25,836 to write code, debug code, version control code, 413 00:27:25,836 --> 00:27:27,776 and a whole slew of other features. 414 00:27:27,776 --> 00:27:30,746 That is specifically tied to Mac OS, but it's probably one 415 00:27:30,746 --> 00:27:32,436 of the slickest IDEs out there. 416 00:27:32,436 --> 00:27:37,576 We'll actually use it by nature of iPhone programming in CS164. 417 00:27:37,576 --> 00:27:40,376 Free alternatives include Eclipse and NetBeans 418 00:27:40,376 --> 00:27:42,916 and a simpler Code::Blocks, the last of which is C 419 00:27:42,916 --> 00:27:46,086 and C++ specific but the first two are Eclipse, 420 00:27:46,326 --> 00:27:48,616 and NetBean's quite popular, not only for Java, 421 00:27:48,616 --> 00:27:50,516 which some of you guys might have experienced, 422 00:27:50,516 --> 00:27:54,286 but also for CC++, PHP and all sorts of other language. 423 00:27:54,486 --> 00:27:56,896 And then lastly there's this very popular toolkit called 424 00:27:56,996 --> 00:27:58,936 XAMPP, which is free software 425 00:27:58,936 --> 00:28:01,686 that includes an Apache web server, 426 00:28:01,686 --> 00:28:04,646 the same thing the appliance runs, a MySQL installation, 427 00:28:04,646 --> 00:28:07,446 PHP installation, and even PHP MyAdmin. 428 00:28:07,446 --> 00:28:10,176 In short, if you don't want to use the CS50 appliance 429 00:28:10,176 --> 00:28:12,126 for whatever reason, you can still install all 430 00:28:12,126 --> 00:28:15,716 of those same tools very easily by downloading that free tool, 431 00:28:15,716 --> 00:28:18,046 and it will set up your Mac for you. 432 00:28:18,206 --> 00:28:20,436 And very similar options exist for Windows. 433 00:28:20,436 --> 00:28:21,536 The only ones worthy 434 00:28:21,536 --> 00:28:24,266 of distinction here are cygwin up there at the top. 435 00:28:24,476 --> 00:28:27,536 This is a toolkit for free that you can download 436 00:28:27,536 --> 00:28:30,096 that actually gives you gcc and gdb and a lot 437 00:28:30,096 --> 00:28:32,356 of the command-line tools that we used this semester, 438 00:28:32,556 --> 00:28:33,976 but it gives them to you in the context 439 00:28:33,976 --> 00:28:36,756 of a Windows command prompt, so very similar 440 00:28:36,756 --> 00:28:37,986 to our own terminal window. 441 00:28:38,086 --> 00:28:40,286 And then Visual Studio for Microsoft is sort 442 00:28:40,286 --> 00:28:42,916 of the de facto standard in the Windows world for writing code 443 00:28:43,006 --> 00:28:44,416 for all sorts of languages. 444 00:28:44,416 --> 00:28:47,856 But realize there's a nontrivial intersection among these tools 445 00:28:48,046 --> 00:28:49,376 across the two platforms. 446 00:28:49,376 --> 00:28:51,496 And for Linux, too, and if you're running Linux, frankly, 447 00:28:51,496 --> 00:28:53,856 you probably have a bit more savvy when it comes 448 00:28:53,856 --> 00:28:54,776 to configuring these things, 449 00:28:54,776 --> 00:28:57,206 but almost all these same tools exist 450 00:28:57,206 --> 00:28:59,186 in a Linux environment as well. 451 00:28:59,186 --> 00:29:02,066 So realize, and certainly with the TF's or CA's help 452 00:29:02,116 --> 00:29:03,916 after the term ends, if you want to reach out, 453 00:29:04,166 --> 00:29:08,446 you can certainly continue on independently of CS50. 454 00:29:08,906 --> 00:29:09,886 So where did we start? 455 00:29:10,166 --> 00:29:11,536 So this is like week zero. 456 00:29:11,536 --> 00:29:14,196 We started talking about algorithms and writing programs, 457 00:29:14,196 --> 00:29:16,286 albeit in a simple context, 458 00:29:16,506 --> 00:29:18,356 of making peanut butter and jelly sandwiches. 459 00:29:18,356 --> 00:29:20,306 And we introduced this so that we could start thinking a little 460 00:29:20,306 --> 00:29:23,066 more methodically, introduce the idea of pseudo code 461 00:29:23,066 --> 00:29:25,866 and then silly things like indentation and constructs 462 00:29:25,866 --> 00:29:28,476 like ifs and whiles that we can use in English 463 00:29:28,696 --> 00:29:30,576 or statements here, but we wanted 464 00:29:30,576 --> 00:29:32,126 to at least provide a mental model 465 00:29:32,196 --> 00:29:35,116 with which we then proceeded to something like Scratch. 466 00:29:35,116 --> 00:29:37,476 And Scratch, too, was hopefully fairly accessible, 467 00:29:37,676 --> 00:29:40,136 but even by way Scratch were we able to talk about some things 468 00:29:40,136 --> 00:29:41,876 that we kept using for 13 weeks -- 469 00:29:41,876 --> 00:29:44,756 loops and conditions and variables and all sorts 470 00:29:44,756 --> 00:29:46,606 of other details that hopefully 471 00:29:46,606 --> 00:29:48,536 in week zero actually came pretty naturally, 472 00:29:48,536 --> 00:29:50,586 because it just made sense, and you drag and drop 473 00:29:50,586 --> 00:29:52,226 and things fit together logically, 474 00:29:52,476 --> 00:29:53,616 and so things just clicked. 475 00:29:53,776 --> 00:29:55,126 Now, of course, weeks later, 476 00:29:55,266 --> 00:29:58,036 things might have stopped clicking, at least not quite 477 00:29:58,036 --> 00:30:00,196 as easily, and we introduced C, 478 00:30:00,196 --> 00:30:02,536 in which we spent quite a number of weeks. 479 00:30:02,796 --> 00:30:05,226 But if you think back to maybe your emotional 480 00:30:05,226 --> 00:30:06,996 or visual reaction when you first saw this, 481 00:30:06,996 --> 00:30:10,016 now at least hopefully you could kind of explain almost every one 482 00:30:10,016 --> 00:30:12,766 of these lines or symbols one by one, 483 00:30:12,826 --> 00:30:14,666 and some of them are intellectually interesting, 484 00:30:14,666 --> 00:30:15,496 some of them are not. 485 00:30:15,496 --> 00:30:17,896 Semicolons are not, but gcc thinks they are. 486 00:30:18,146 --> 00:30:21,456 And so these same ideas though, from Scratch, persisted, 487 00:30:21,456 --> 00:30:24,926 even as we proceeded through the world of gcc. 488 00:30:25,006 --> 00:30:27,176 And here, too, so that we don't leave you 489 00:30:27,176 --> 00:30:29,336 with any training wheels unremoved, 490 00:30:29,456 --> 00:30:32,086 realize that we definitely got into the habit with C code 491 00:30:32,086 --> 00:30:34,416 of writing Make Hello. 492 00:30:34,596 --> 00:30:37,586 And Make recall, is not a complier; it's a build utility 493 00:30:37,586 --> 00:30:38,936 and it just makes it easier 494 00:30:38,936 --> 00:30:42,046 to write what would otherwise be very tedious commands to write. 495 00:30:42,346 --> 00:30:45,486 So if you wanted to actually run gcc manually, back in week 1 496 00:30:45,486 --> 00:30:48,826 or 2, you would actually write probably something like this. 497 00:30:49,016 --> 00:30:51,376 And just from left to right, this is the program's name 498 00:30:51,376 --> 00:30:55,966 of course, gcc-ggdb just meant include debugging symbols, 499 00:30:55,966 --> 00:30:58,666 information, so that you can actually set line -- 500 00:30:58,666 --> 00:31:00,946 sorry, so that you can set break points and look 501 00:31:00,946 --> 00:31:02,156 at the contents of variables. 502 00:31:02,536 --> 00:31:05,606 std-c99 just means use the very latest version 503 00:31:05,606 --> 00:31:09,116 of C. The next one means Warnings all, 504 00:31:09,206 --> 00:31:11,946 yell at me for all possible things I might do wrong 505 00:31:11,946 --> 00:31:13,826 and make them errors, so to speak. 506 00:31:13,896 --> 00:31:16,226 Errors is worse than warning in programming, typically, 507 00:31:16,506 --> 00:31:18,366 so that you can't even compile your code 508 00:31:18,366 --> 00:31:19,716 if you have any warnings. 509 00:31:19,976 --> 00:31:21,196 So that's all those things meant. 510 00:31:21,376 --> 00:31:23,036 This of course was just the name of the file. 511 00:31:23,106 --> 00:31:24,896 And then there were these things at the end, 512 00:31:24,896 --> 00:31:27,806 so dash o hello just said name this thing hello instead 513 00:31:27,806 --> 00:31:29,136 of a dot l at the default. 514 00:31:29,406 --> 00:31:32,156 And then these things here -- dash-l dash-l dash-l -- 515 00:31:32,346 --> 00:31:36,526 were link flags that say link in code that someone else wrote 516 00:31:36,526 --> 00:31:40,536 that someone else compiled, and merge it into my own program. 517 00:31:40,536 --> 00:31:42,556 Because realize that the end game is 518 00:31:42,556 --> 00:31:45,646 to actually output a file containing all sorts of 0s 519 00:31:45,646 --> 00:31:48,016 and 1s like this, and these 0s and 1s are all 520 00:31:48,016 --> 00:31:49,576 of course arranged in patterns and whatnot, 521 00:31:49,576 --> 00:31:52,096 but you didn't write all of those 0s and 1s 522 00:31:52,396 --> 00:31:54,986 that were generated; rather, you wrote Hello dot C, 523 00:31:55,166 --> 00:31:57,766 someone else wrote Standard I/O dot C, 524 00:31:57,996 --> 00:32:00,056 and by way of the header file and by way 525 00:32:00,056 --> 00:32:03,366 of these linker flags you can tell gcc to merge those bits 526 00:32:03,536 --> 00:32:07,056 into one single binary that you can run at the Command line 527 00:32:07,056 --> 00:32:09,346 or in a gui, actually double-click. 528 00:32:09,676 --> 00:32:11,216 But speaking of 0s and 1s, 529 00:32:11,216 --> 00:32:15,096 a common question is folks prepared for quiz 1 this year, 530 00:32:15,356 --> 00:32:17,456 was about these things called bitwise operators, 531 00:32:17,456 --> 00:32:18,806 which are actually quite powerful, 532 00:32:18,806 --> 00:32:21,116 and you'd explore things like this in more detail perhaps 533 00:32:21,116 --> 00:32:24,636 in CS61 next fall, but bitwise operators do sort 534 00:32:24,636 --> 00:32:25,926 of what that name suggests. 535 00:32:26,016 --> 00:32:30,476 They operate on variables bitwise, so one bit at a time. 536 00:32:30,476 --> 00:32:32,206 And the ones here we might use are these. 537 00:32:32,206 --> 00:32:35,166 And notice, this is not a typo; this is not two ampersands 538 00:32:35,166 --> 00:32:37,096 or two vertical bars; it's indeed just one. 539 00:32:37,406 --> 00:32:41,186 This one means to take the bitwise AND of two bits, 540 00:32:41,186 --> 00:32:44,076 and the next one means to take the bitwise OR of two bits, 541 00:32:44,286 --> 00:32:47,556 and so al that means here is that if you take the bitwise 542 00:32:47,556 --> 00:32:53,746 AND of two bits, well, 0 & 0 is going to equal 0; 543 00:32:53,886 --> 00:33:03,506 0 & 1 equals 0; 1 & 0 equals 0; 1 & 1 equals 1. 544 00:33:03,506 --> 00:33:05,816 In other words, you can essentially think of bits 545 00:33:05,816 --> 00:33:09,056 as being Booleans, even though they are individual bits, 546 00:33:09,056 --> 00:33:12,716 and so those same concepts that we talked about &ing and ORing, 547 00:33:13,026 --> 00:33:15,376 also apply at the bit level here. 548 00:33:15,376 --> 00:33:16,336 But they're more useful 549 00:33:16,336 --> 00:33:19,496 than just doing simple arithmetic expressions 550 00:33:19,496 --> 00:33:21,506 like this, rather you can use this thing. 551 00:33:21,576 --> 00:33:23,266 This is something called xor. 552 00:33:23,496 --> 00:33:25,116 And just so you've seen this one, too, 553 00:33:25,116 --> 00:33:28,506 xor is an interesting one in that it's the exclusive OR. 554 00:33:28,506 --> 00:33:34,066 So if you have two bits, a 0 and a 0, the xor of this is 0, 555 00:33:34,066 --> 00:33:39,356 because xor says the output is 1 if 1 and only 1 556 00:33:39,356 --> 00:33:41,376 of the two bits are a 1. 557 00:33:41,376 --> 00:33:42,666 The other one has to be the opposite. 558 00:33:42,666 --> 00:33:43,566 So that is not the case. 559 00:33:43,566 --> 00:33:45,046 They are not exclusively different, 560 00:33:45,336 --> 00:33:49,336 but this here would yield 1; this here would yield 1; 561 00:33:49,556 --> 00:33:51,746 this here would yield 0. 562 00:33:51,746 --> 00:33:56,646 So it's a slightly different pattern to the idea of & and OR, 563 00:33:56,646 --> 00:33:58,616 for those who don't quite have line of sight. 564 00:33:58,896 --> 00:34:02,936 So xor simply means only one of those bits can be a 1 565 00:34:03,036 --> 00:34:04,666 for the output to be a 1. 566 00:34:04,906 --> 00:34:07,836 And then lastly there are these other two operators shifting 567 00:34:07,836 --> 00:34:10,286 whereby you can actually use an operator that looks 568 00:34:10,286 --> 00:34:12,416 like that two-angle brackets pointing left and right, 569 00:34:12,606 --> 00:34:15,646 to actually move the bits in a variable or in a number, 570 00:34:15,766 --> 00:34:17,596 to the left or to the right, 571 00:34:17,646 --> 00:34:20,486 effectively multiplying or dividing by 2. 572 00:34:20,546 --> 00:34:23,466 Recall that in binary, the columns represent columns of 2, 573 00:34:23,666 --> 00:34:25,906 so if you shift the bits it's like multiplying everything 574 00:34:25,906 --> 00:34:27,896 by 2 or dividing by 2. 575 00:34:28,046 --> 00:34:29,106 well, now, who cares? 576 00:34:29,106 --> 00:34:33,266 Well, as an at-home exercise, a fun little trivia problem is 577 00:34:33,266 --> 00:34:36,156 to ask, how can you actually exchange the contents 578 00:34:36,156 --> 00:34:39,476 of two variables without using a temporary variable? 579 00:34:39,476 --> 00:34:42,046 And that's a perfect question here since I only have two cups, 580 00:34:42,366 --> 00:34:45,346 so let me pour some -- let's call it orange juice -- 581 00:34:46,116 --> 00:34:50,146 into this cup here, and let me pour some milk just 582 00:34:50,146 --> 00:34:52,766 as we did a few weeks back, into this cup here. 583 00:34:53,176 --> 00:34:56,956 And it would be a magical thing if I could swap the contents 584 00:34:56,956 --> 00:34:58,756 of these two variables, these two cups, 585 00:34:58,896 --> 00:35:02,116 without using a third variable called TEMP. 586 00:35:02,116 --> 00:35:05,626 Now, these two I rehearsed at home -- and full disclosure -- 587 00:35:05,626 --> 00:35:07,026 didn't work out so well at home. 588 00:35:07,306 --> 00:35:08,386 But the idea is the same. 589 00:35:08,656 --> 00:35:12,866 So if I want to swap milk and orange juice, I can go ahead 590 00:35:12,866 --> 00:35:15,146 and do this, and this was a nasty surprise last time -- 591 00:35:16,056 --> 00:35:18,686 that was too much of something. 592 00:35:19,716 --> 00:35:24,526 Okay. Glad I did it in that order. 593 00:35:25,406 --> 00:35:28,646 So now, milk was here, milk is now here. 594 00:35:28,646 --> 00:35:34,476 I want orange juice over here, so -- oop, that's pretty good. 595 00:35:35,496 --> 00:35:38,336 That's good enough -- magic! 596 00:35:40,766 --> 00:35:45,076 So the at-home exercise is you can actually do this in code. 597 00:35:45,076 --> 00:35:47,016 If you don't want to spend the variable, 598 00:35:47,016 --> 00:35:49,176 the temporary variable, or you just want to be cool 599 00:35:49,176 --> 00:35:51,816 and you do want to exchange the contents of two variables 600 00:35:51,816 --> 00:35:53,326 without using a temporary variable, 601 00:35:53,606 --> 00:35:55,636 you can use this caret symbol here, 602 00:35:55,836 --> 00:35:58,696 which again is the xor operator, and it literally boils 603 00:35:58,726 --> 00:36:01,286 down to this simple definition. 604 00:36:01,286 --> 00:36:03,056 Given two bits that are different -- 605 00:36:03,256 --> 00:36:05,806 that are the same you get 0; given two bits 606 00:36:05,806 --> 00:36:07,776 that are the same, you get 0; given two bits 607 00:36:07,776 --> 00:36:09,106 that are different, you get 1, 608 00:36:09,366 --> 00:36:12,516 so you can apply this caret symbol, this bitwise operator, 609 00:36:12,756 --> 00:36:15,726 to every one in the bits from left to right in A 610 00:36:15,976 --> 00:36:18,736 to the same bits that correspond in B, 611 00:36:18,936 --> 00:36:21,796 and you execute these three lines of code and wala, 612 00:36:21,836 --> 00:36:25,796 literally, you will swap the contents of these two variables. 613 00:36:25,796 --> 00:36:28,996 Now, it's more just kind of a curious intellectual exercise 614 00:36:28,996 --> 00:36:31,746 for our purposes since spending an additional 32 bits is not 615 00:36:31,796 --> 00:36:35,366 such a big deal these days, but indeed it can be done. 616 00:36:35,366 --> 00:36:37,776 And that actually worked out a lot better than I expected. 617 00:36:37,776 --> 00:36:38,246 Thank you. 618 00:36:39,576 --> 00:36:42,496 So we started with Scratch, we transitioned to C 619 00:36:42,496 --> 00:36:45,296 and then we ended up towards semester's end 620 00:36:45,296 --> 00:36:48,046 with the very user-friendly say web world, 621 00:36:48,046 --> 00:36:50,456 in which the direction of software seems to be headed, 622 00:36:50,656 --> 00:36:54,066 so we looked at html and made the simplest of html 5 pages, 623 00:36:54,066 --> 00:36:55,546 and then we transitioned very quickly 624 00:36:55,546 --> 00:36:59,306 to more interesting code, namely a programming language named PHP 625 00:36:59,306 --> 00:37:02,126 so that you could actually generate strings 626 00:37:02,126 --> 00:37:05,196 and content dynamically based on users' input. 627 00:37:05,196 --> 00:37:07,666 And then of course, we introduced Javascript 628 00:37:07,666 --> 00:37:09,896 so that you could also control the user's experience 629 00:37:10,036 --> 00:37:13,446 client-side, and indeed today Javascript can even be used 630 00:37:13,446 --> 00:37:17,226 server-side for very high-performing applications. 631 00:37:17,226 --> 00:37:20,366 And so that was it, from week zero up to seek 12 you went 632 00:37:20,366 --> 00:37:22,996 from Scratch, then to this low-level C language, 633 00:37:22,996 --> 00:37:27,426 and my God, what you will see at the CS50 Fair, both done by you 634 00:37:27,426 --> 00:37:30,996 and done by your friends, we don't doubt will impress, 635 00:37:31,456 --> 00:37:33,086 as is the tradition each year. 636 00:37:33,356 --> 00:37:35,836 So another tradition that we had toward the end 637 00:37:35,836 --> 00:37:39,596 of the semester here, is to pit some students against staff 638 00:37:39,596 --> 00:37:43,976 in a sort of contest of wits here, sort of Jeopardy style, 639 00:37:43,976 --> 00:37:46,706 and so it's at this point that we need to take a few volunteers 640 00:37:46,706 --> 00:37:49,226 from the staff and a few volunteers from the students 641 00:37:49,226 --> 00:37:52,946 to come join me up here on stage for a little battling of wits. 642 00:37:52,946 --> 00:37:53,986 Come on down, Carl. 643 00:37:54,686 --> 00:37:55,396 Who else we got? 644 00:37:55,396 --> 00:37:58,326 Come on here, 2, 3, we got room for 3 more. 645 00:37:58,976 --> 00:38:00,536 Who are the shyer folks? 646 00:38:00,536 --> 00:38:03,596 Come on, come on. 647 00:38:03,756 --> 00:38:04,936 All right, let's go -- 648 00:38:04,936 --> 00:38:07,196 okay, here, because your friend's pointing 649 00:38:07,196 --> 00:38:09,766 at you -- here, her, here. 650 00:38:09,766 --> 00:38:11,326 All right, we'll stack the student team. 651 00:38:11,466 --> 00:38:11,986 Come on up. 652 00:38:12,066 --> 00:38:13,936 All right, who are our staff? 653 00:38:14,086 --> 00:38:16,986 All right, if the staff want to take the end table there. 654 00:38:17,166 --> 00:38:18,516 Students, if you want to line up here 655 00:38:18,516 --> 00:38:21,196 and form two arbitrary teams. 656 00:38:21,866 --> 00:38:24,286 We need let's see, one staff member 657 00:38:24,286 --> 00:38:25,996 who could run the board -- Walkthrough Boy, 658 00:38:25,996 --> 00:38:27,156 would you mind lending a hand? 659 00:38:27,156 --> 00:38:30,566 This feels like your thing. 660 00:38:31,126 --> 00:38:34,096 So we need a little scoreboard to be run here, 661 00:38:35,396 --> 00:38:39,456 so in just a moment, if you want to go ahead 662 00:38:39,456 --> 00:38:42,266 and ask these three teams for three team names, 663 00:38:42,346 --> 00:38:44,576 and then we will keep track of their point values 664 00:38:44,576 --> 00:38:45,996 on that, their Blackboard. 665 00:38:46,196 --> 00:38:48,486 If you guys want to squeeze in -- 666 00:38:49,326 --> 00:38:53,116 yeah, just kind of kneel to the side as needed here, 667 00:38:53,116 --> 00:38:56,546 as we get set, because using my new-found html skills, 668 00:38:56,836 --> 00:39:00,716 I made a little something here with which we can do this. 669 00:39:01,866 --> 00:39:04,146 That is the extent of my html skills here. 670 00:39:04,146 --> 00:39:07,036 For -- here we go, wait for it. 671 00:39:07,376 --> 00:39:10,776 >> This is Jeopardy! 672 00:39:11,526 --> 00:39:14,856 >> And now we'll go jump immediately into week one. 673 00:39:14,856 --> 00:39:16,816 So I apparently called for too many volunteers. 674 00:39:16,816 --> 00:39:18,306 That's okay. 675 00:39:18,506 --> 00:39:20,116 Maybe if we could just shuffle the chairs 676 00:39:20,116 --> 00:39:21,126 down just a little bit, 677 00:39:21,126 --> 00:39:23,106 and if you guys want to nudge your way in. 678 00:39:23,106 --> 00:39:25,136 Staff name, what are we going 679 00:39:25,136 --> 00:39:27,136 to call the staff here on the blackboard? 680 00:39:28,656 --> 00:39:29,096 Team name? 681 00:39:29,096 --> 00:39:29,726 >> [Inaudible]. 682 00:39:29,726 --> 00:39:30,256 >> Team Bowden. 683 00:39:30,546 --> 00:39:31,906 >> Team Bowden. 684 00:39:32,786 --> 00:39:35,876 >> Team Bowden it is, team -- 685 00:39:36,216 --> 00:39:40,296 all right, student number 2 in the middle here? 686 00:39:41,066 --> 00:39:41,776 >> Thundercats. 687 00:39:42,096 --> 00:39:47,076 >> Thundercats will be the middle team, and you guys here 688 00:39:47,076 --> 00:39:48,306 on the end, you will be? 689 00:39:48,536 --> 00:39:48,976 >> Zergrush. 690 00:39:49,306 --> 00:39:49,626 >> What's that? 691 00:39:49,786 --> 00:39:50,296 >> Zergrush. 692 00:39:50,506 --> 00:39:51,046 >> Zergrush? 693 00:39:51,046 --> 00:39:51,966 >> Zergrush. 694 00:39:52,516 --> 00:39:59,546 [Laughter] 695 00:40:00,046 --> 00:40:01,706 >> Am I the only one that doesn't know what this word is? 696 00:40:01,876 --> 00:40:02,546 >> Star Wars. 697 00:40:02,866 --> 00:40:05,096 >> Oh, then I'm not. 698 00:40:05,376 --> 00:40:08,216 Okay. All right, so if you guys want to -- 699 00:40:08,216 --> 00:40:09,806 let's see, how many chairs do we have between -- 700 00:40:09,806 --> 00:40:12,116 if you want to kind of -- whoever you're friendliest with, 701 00:40:12,116 --> 00:40:13,596 maybe share a chair there. 702 00:40:13,596 --> 00:40:17,186 We're going to move immediately into single Jeopardy here. 703 00:40:17,186 --> 00:40:19,146 We don't have all that much time to clear the board, 704 00:40:19,146 --> 00:40:20,796 so we'll do just a few minutes for single 705 00:40:20,796 --> 00:40:21,886 and for double Jeopardy. 706 00:40:21,886 --> 00:40:26,606 In a coin toss before class of the Thundercats one, 707 00:40:26,856 --> 00:40:30,256 which means you have control of the board. 708 00:40:30,256 --> 00:40:32,176 What week would you like a question from, 709 00:40:32,176 --> 00:40:34,226 and be sure when answering to speak into your mike, 710 00:40:34,226 --> 00:40:37,146 and Tommy will be our judge as to whose hand goes up first 711 00:40:37,146 --> 00:40:37,976 when answering a question. 712 00:40:38,516 --> 00:40:43,646 [Inaudible comment from audience.] 713 00:40:44,146 --> 00:40:45,896 >> Not much strategy is required for this game. 714 00:40:45,896 --> 00:40:48,316 >> Week One, 1,000. 715 00:40:49,016 --> 00:40:49,566 >> What's that? 716 00:40:49,566 --> 00:40:50,226 >> Week One, 1,000. 717 00:40:50,226 --> 00:40:54,656 >> Week one for 1,000 dollars, and your question is -- 718 00:40:54,656 --> 00:40:56,926 and again, the first hand to go up will be called on Tommy 719 00:40:56,926 --> 00:41:00,496 to answer -- what is the maximum value 720 00:41:00,496 --> 00:41:01,986 for a variable of type int? 721 00:41:02,806 --> 00:41:05,996 Zergrush, I saw, two? 722 00:41:06,386 --> 00:41:07,326 >> Which one of us? 723 00:41:07,326 --> 00:41:07,396 >> You. 724 00:41:07,766 --> 00:41:09,266 >> Any of you, just pick who speaks. 725 00:41:10,006 --> 00:41:12,756 >> 2 to the 31 [inaudible]. 726 00:41:12,976 --> 00:41:15,556 >> So the student -- oh, by the way, these are your questions 727 00:41:15,556 --> 00:41:17,446 that you submitted as part of problem set 8. 728 00:41:17,446 --> 00:41:20,536 So that is correct, though the student was looking 729 00:41:20,536 --> 00:41:25,266 for 2 billion, 147 million 483 thousand,647, 730 00:41:25,266 --> 00:41:27,556 but I think we'll give it to them there for a thousand. 731 00:41:27,606 --> 00:41:28,366 Well done. 732 00:41:28,896 --> 00:41:32,476 You still have control of the board. 733 00:41:32,476 --> 00:41:33,156 What would you like? 734 00:41:34,496 --> 00:41:38,606 >> Let's go week 4 for 200. 735 00:41:39,416 --> 00:41:42,436 >> Week 4 for 200 dollars, 736 00:41:42,896 --> 00:41:50,976 and your question is what must you always do after malocating? 737 00:41:51,506 --> 00:41:56,366 Thundercats? 738 00:41:56,916 --> 00:41:57,456 >> Free the memory. 739 00:41:57,816 --> 00:41:58,986 >> you must free the memory. 740 00:41:58,986 --> 00:42:02,166 That is indeed correct for 200 dollars. 741 00:42:02,196 --> 00:42:04,546 All right, you guys have control of the board. 742 00:42:04,546 --> 00:42:05,686 What category would you like? 743 00:42:06,716 --> 00:42:10,766 >> Week 2 600. 744 00:42:10,916 --> 00:42:17,016 >> Week 2 for 600 dollars, and your question is going 745 00:42:17,126 --> 00:42:20,536 to be, a string is actually? 746 00:42:23,406 --> 00:42:24,146 Thundercats? 747 00:42:24,146 --> 00:42:26,136 >> A pointer to a character. 748 00:42:26,136 --> 00:42:29,086 >> Right, a string is actually a pointer to a character, 749 00:42:29,086 --> 00:42:30,986 so another 600 dollars. 750 00:42:30,986 --> 00:42:32,986 At some point we should do arithmetic. 751 00:42:33,646 --> 00:42:37,256 And you're still in control of the board. 752 00:42:37,256 --> 00:42:39,746 Time for a few more questions here in single Jeopardy. 753 00:42:39,916 --> 00:42:43,856 >> Week 3 for 800. 754 00:42:43,856 --> 00:42:46,196 >> Week 3 for 800 dollars. 755 00:42:46,506 --> 00:42:50,956 Your question here is going to be in week 3, 756 00:42:50,956 --> 00:42:53,376 why is linear search bad? 757 00:42:54,256 --> 00:42:54,466 Zergrush? 758 00:42:55,546 --> 00:43:02,406 >> Order of n when it could be order of log n. 759 00:43:03,506 --> 00:43:07,826 >> That is correct, but speak towards the audience, 760 00:43:07,906 --> 00:43:08,766 not toward Tommy. 761 00:43:09,316 --> 00:43:11,636 >> It's order of n when it could be order of log n. 762 00:43:12,006 --> 00:43:12,566 >> Excellent. 763 00:43:12,566 --> 00:43:13,506 Very well done. 764 00:43:13,506 --> 00:43:18,216 Up to 1,800 dollars, team Bowden is ever so slightly losing. 765 00:43:18,326 --> 00:43:22,756 So we have time for one more question here 766 00:43:22,756 --> 00:43:23,676 in single Jeopardy. 767 00:43:23,676 --> 00:43:25,826 What would you like Zergrush? 768 00:43:26,296 --> 00:43:30,066 >> Let's go week 4 for 1,000. 769 00:43:30,756 --> 00:43:33,616 >> Week 4 for 1,000 dollars. 770 00:43:33,616 --> 00:43:37,096 So team Bowden could move into second place with this question. 771 00:43:40,266 --> 00:43:42,656 What is Emma's favorite kind of sort? 772 00:43:42,656 --> 00:43:44,246 It's Emma's question. 773 00:43:44,336 --> 00:43:47,576 Thundercats? 774 00:43:48,896 --> 00:43:50,936 >> Bubble sort. 775 00:43:50,936 --> 00:43:52,506 >> Incorrect. 776 00:43:52,996 --> 00:43:56,846 That is I think minus 1,000, though. 777 00:43:57,516 --> 00:44:04,986 [Applause] 778 00:44:05,486 --> 00:44:07,526 >> Team Bowden's strategy is paying off. 779 00:44:07,526 --> 00:44:12,046 But did your hand go up? 780 00:44:12,546 --> 00:44:13,756 I think it did. 781 00:44:13,916 --> 00:44:15,476 >> We were just stretching. 782 00:44:15,896 --> 00:44:17,506 >> Team Bowden? 783 00:44:18,676 --> 00:44:22,756 What is Emma's favorite kind of sort? 784 00:44:23,096 --> 00:44:24,746 >> Burgers -- bogo. 785 00:44:25,176 --> 00:44:34,586 >> What is there to confer about? 786 00:44:34,586 --> 00:44:35,206 >> Bogosort. 787 00:44:35,206 --> 00:44:35,966 >> Bubble sort? 788 00:44:35,966 --> 00:44:39,136 That's what they just said. 789 00:44:39,136 --> 00:44:39,856 >> Bogosort. 790 00:44:39,856 --> 00:44:40,366 >> Oh, bogosort. 791 00:44:40,556 --> 00:44:41,706 No, that too is incorrect. 792 00:44:41,706 --> 00:44:46,276 Emma's favorite kind of sort is -- Emma, are you here? 793 00:44:46,386 --> 00:44:47,206 Merge sort. 794 00:44:47,266 --> 00:44:50,136 Several people know that her favorite sort is merge sort. 795 00:44:50,136 --> 00:44:55,396 All right, and now we move on to double Jeopardy here. 796 00:44:55,836 --> 00:44:58,796 So in Double Jeopardy point values are of course doubled. 797 00:44:59,136 --> 00:45:03,896 Team Bowden will give you the choice of categories. 798 00:45:03,896 --> 00:45:04,696 What would you like? 799 00:45:04,906 --> 00:45:06,996 Weeks 5 through Rand. 800 00:45:08,736 --> 00:45:09,786 Rand 4-- 801 00:45:09,896 --> 00:45:10,496 >> 2,000. 802 00:45:11,036 --> 00:45:15,336 >> For 2,000 in the Rand category. 803 00:45:15,616 --> 00:45:19,116 Name one function that it can be found in the CS50 library? 804 00:45:19,236 --> 00:45:23,436 Why are your hands up last? 805 00:45:23,776 --> 00:45:25,766 Thundercats for 2,000? 806 00:45:26,976 --> 00:45:27,786 >> Get string. 807 00:45:28,026 --> 00:45:29,116 >> Get string is correct. 808 00:45:29,116 --> 00:45:31,056 Nicely done for 2,000. 809 00:45:31,656 --> 00:45:33,956 All right. 810 00:45:33,956 --> 00:45:37,086 And we have time for just a couple more questions 811 00:45:37,086 --> 00:45:37,976 in Double Jeopardy now. 812 00:45:38,516 --> 00:45:45,706 [Background inaudible voices.] 813 00:45:46,206 --> 00:45:48,346 >> No, the Thundercats now have control of the board. 814 00:45:48,346 --> 00:45:48,996 What would you like? 815 00:45:50,336 --> 00:45:53,246 >> Week 5 for 400. 816 00:45:53,756 --> 00:45:56,116 >> Week 5 for 400 dollars. 817 00:45:58,156 --> 00:45:59,376 Week 5 -- you know, 818 00:45:59,486 --> 00:46:02,026 I did implement some features here, so we can click that. 819 00:46:03,096 --> 00:46:03,586 All right. 820 00:46:04,516 --> 00:46:08,816 [Laughter] 821 00:46:09,316 --> 00:46:11,226 >> I took CS50, all right. 822 00:46:11,226 --> 00:46:16,106 Mel lock stores things in the -- question. 823 00:46:16,446 --> 00:46:19,336 Thundercats again. 824 00:46:19,516 --> 00:46:20,576 >> In the heap. 825 00:46:20,576 --> 00:46:21,656 >> In the heap is correct. 826 00:46:22,146 --> 00:46:23,786 We have time for one more question 827 00:46:23,786 --> 00:46:26,566 in Double Jeopardy before moving to Final Jeopardy 828 00:46:26,566 --> 00:46:30,166 at which point only people with non-negative values can proceed. 829 00:46:30,336 --> 00:46:36,956 All right, Thundercats, last question in Double Jeopardy. 830 00:46:36,956 --> 00:46:40,026 >> Week 7 for 400. 831 00:46:40,746 --> 00:46:46,946 >> Week 7 for 400 dollars. 832 00:46:48,356 --> 00:46:52,536 Your question is going to be here, 833 00:46:52,716 --> 00:46:57,116 what did you building this week's pset? 834 00:46:57,476 --> 00:47:02,936 Emma? Thundercats? 835 00:47:04,616 --> 00:47:06,346 >> The P Shuttle. 836 00:47:06,486 --> 00:47:10,046 >> Nope. Incorrect. 837 00:47:10,706 --> 00:47:12,596 For minus 400. 838 00:47:12,706 --> 00:47:16,616 Oh, into the mike, though, Zergrush? 839 00:47:16,716 --> 00:47:19,026 >> Our own personal website and CRCD Finance. 840 00:47:19,816 --> 00:47:23,856 >> The correct answer I'm afraid is up to Team Bowden. 841 00:47:24,516 --> 00:47:31,576 [Laughter] 842 00:47:32,076 --> 00:47:32,776 >> Would you know if it were? 843 00:47:33,386 --> 00:47:35,906 No, I'm sorry, it was hashtable. 844 00:47:36,796 --> 00:47:40,476 Minus 845 00:47:41,516 --> 00:47:45,696 [Applause] 846 00:47:46,196 --> 00:47:47,006 >> That's the answer. 847 00:47:47,006 --> 00:47:53,236 So we now enter Final Jeopardy with Thundercats in the lead 848 00:47:53,236 --> 00:47:58,736 with 2,200 dollars, Team Bowden with a lot of love and Zergrush 849 00:47:58,736 --> 00:48:02,896 with 1,400, so we have time for these two here to duke it out. 850 00:48:03,116 --> 00:48:05,126 In front of you is a piece of paper. 851 00:48:05,486 --> 00:48:11,976 We will read -- the category is going to be difficult, 852 00:48:16,056 --> 00:48:18,326 so go ahead and choose a dollar amount that you're willing 853 00:48:18,326 --> 00:48:20,946 to wager out of your non-zero balance. 854 00:48:21,456 --> 00:48:24,676 No, you do the dollar amount first 855 00:48:24,816 --> 00:48:27,016 and then I tell you the question, or the answer 856 00:48:27,016 --> 00:48:28,506 and then you tell me the question, 857 00:48:28,826 --> 00:48:30,506 but we've not really been doing it that way anyway. 858 00:48:31,866 --> 00:48:35,356 All right. 859 00:48:36,816 --> 00:48:37,906 And now and Team Bowden, 860 00:48:37,906 --> 00:48:40,186 if you'd like to play along, that's fine. 861 00:48:42,096 --> 00:48:43,616 Oh, did we give them something? 862 00:48:43,816 --> 00:48:44,336 >> I did. 863 00:48:44,336 --> 00:48:47,046 >> Oh, Tommy has given you 400 dollars, 864 00:48:47,046 --> 00:48:50,866 which means in theory the others should still be able to win. 865 00:48:52,076 --> 00:48:53,616 All right. 866 00:48:53,736 --> 00:48:54,586 So here we go. 867 00:48:54,586 --> 00:49:00,976 Your question here is, convert 1.337 to binary. 868 00:49:01,516 --> 00:49:34,836 [Jeopardy music playing.] 869 00:49:35,336 --> 00:49:36,086 >> All right. 870 00:49:36,146 --> 00:49:43,366 Gonna need your answers, almost there. 871 00:49:43,366 --> 00:49:44,976 All right, Tommy, math time. 872 00:49:45,666 --> 00:49:46,956 >> I can't do it. 873 00:49:46,956 --> 00:49:48,166 >> All right, here we go. 874 00:49:48,166 --> 00:49:50,546 So let's see, Zergrush was in second, 875 00:49:50,546 --> 00:49:53,796 and you wagered all 1,400 dollars. 876 00:49:53,796 --> 00:49:56,466 This will be easy. 877 00:49:56,556 --> 00:50:06,266 So your answer was 010100111001. 878 00:50:06,266 --> 00:50:09,176 Anyone playing along at home? 879 00:50:10,976 --> 00:50:14,746 Which is correct for 1,400 dollars. 880 00:50:14,906 --> 00:50:21,926 Now, Thundercats, who had 2,000, you wagered 1,000-- 881 00:50:21,926 --> 00:50:23,586 >> And 1. 882 00:50:23,586 --> 00:50:26,786 >> And 1, in which case you'd win slightly more, 883 00:50:27,236 --> 00:50:38,256 and so your answer was 1010011011, 884 00:50:38,256 --> 00:50:40,866 which is not right, I'm afraid. 885 00:50:41,206 --> 00:50:43,106 So that is a minus 1,000. 886 00:50:43,106 --> 00:50:45,446 And Team Bowden, if they didn't write 887 00:50:45,486 --> 00:50:46,916 down the answer as I read it. 888 00:50:47,516 --> 00:50:52,616 [Laughter] 889 00:50:53,116 --> 00:50:54,816 >> Let's give a round of applause then 890 00:50:54,816 --> 00:50:55,906 for our student teams here. 891 00:50:56,516 --> 00:51:03,546 [Applause] 892 00:51:04,046 --> 00:51:07,506 >> So before we adjourn for cake downstairs in the Pub 893 00:51:07,506 --> 00:51:11,456 with the CAs and TFs, let me say it has been an honor being 894 00:51:11,456 --> 00:51:13,696 at the course's helm with you all and with our team 895 00:51:13,696 --> 00:51:17,016 of 100 this year, and we'd like to adjourn today 896 00:51:17,016 --> 00:51:21,076 with one final clip -- a look behind the scenes of CS50, 897 00:51:21,186 --> 00:51:25,886 if we could one last time this semester, dim the lights. 898 00:51:26,516 --> 00:51:48,686 [Music] 899 00:51:49,186 --> 00:51:49,976 >> Y'all ready for this? 900 00:51:50,516 --> 00:52:13,556 [Music] 901 00:52:14,056 --> 00:52:14,856 >> Every day I'm shuffling. 902 00:52:15,516 --> 00:53:01,826 [Music] 903 00:53:02,326 --> 00:53:02,976 >> Y'all ready for this? 904 00:53:03,516 --> 00:53:08,816 [Applause] 905 00:53:09,316 --> 00:53:12,576 >> This was CS50, cake is served.