1 00:00:00,000 --> 00:00:07,470 [MUSIC PLAYING] 2 00:00:07,470 --> 00:01:23,132 3 00:01:23,132 --> 00:01:24,090 DAVID MALAN: All right. 4 00:01:24,090 --> 00:01:26,010 This is CS50. 5 00:01:26,010 --> 00:01:28,980 And just eight weeks ago, 2/3 of you had never 6 00:01:28,980 --> 00:01:30,930 studied any computer science before. 7 00:01:30,930 --> 00:01:33,930 And what we thought we'd begin with today is really a look back of truly 8 00:01:33,930 --> 00:01:36,013 how far you've come over just those several weeks. 9 00:01:36,013 --> 00:01:38,138 In fact, it was just eight weeks ago when you first 10 00:01:38,138 --> 00:01:41,070 started tinkering with Scratch, this graphical programming language 11 00:01:41,070 --> 00:01:43,903 by which you could drag and drop puzzle pieces and make the computer 12 00:01:43,903 --> 00:01:44,670 do what you want. 13 00:01:44,670 --> 00:01:46,628 And then a week later, you might have struggled 14 00:01:46,628 --> 00:01:49,742 with just getting Mario to ascend a pyramid by way of hashes 15 00:01:49,742 --> 00:01:50,700 that you were printing. 16 00:01:50,700 --> 00:01:53,250 Which at the time was perhaps quite non obvious, 17 00:01:53,250 --> 00:01:55,080 but it's ever since has just been what? 18 00:01:55,080 --> 00:01:56,808 A pair of nested four loops. 19 00:01:56,808 --> 00:01:59,100 And then the week after that, you explored cryptography 20 00:01:59,100 --> 00:01:59,970 among other fields. 21 00:01:59,970 --> 00:02:02,790 And you learned how to encrypt and you decrypted information, 22 00:02:02,790 --> 00:02:04,140 like this snippet here. 23 00:02:04,140 --> 00:02:08,039 After that, you explored some electoral processes and the implementation 24 00:02:08,039 --> 00:02:11,520 of algorithms that you might be familiar with from the real world, but perhaps 25 00:02:11,520 --> 00:02:14,520 didn't think about the trade offs in choosing one algorithm or another. 26 00:02:14,520 --> 00:02:17,250 And then ultimately, implementing it in code. 27 00:02:17,250 --> 00:02:20,640 Just a week later did we transition to filters on Instagram, 28 00:02:20,640 --> 00:02:23,070 implementing things like your own sepia filters. 29 00:02:23,070 --> 00:02:24,330 So that moving forward, hopefully, you won't 30 00:02:24,330 --> 00:02:27,360 take for granted when you click that button on the screen on your phone, 31 00:02:27,360 --> 00:02:29,940 you actually know or can presume, or infer, 32 00:02:29,940 --> 00:02:34,570 what's going on underneath the hood as it changes from one setting to another. 33 00:02:34,570 --> 00:02:38,670 And then, of course, Big Board, where we handed you some 140,000 English words 34 00:02:38,670 --> 00:02:40,060 and a really large file. 35 00:02:40,060 --> 00:02:41,977 And you had to implement your own spell check, 36 00:02:41,977 --> 00:02:46,860 or a dictionary so to speak, with using as little amount of time 37 00:02:46,860 --> 00:02:50,700 and as little space as you could, implementing ultimately your own hash 38 00:02:50,700 --> 00:02:51,205 table. 39 00:02:51,205 --> 00:02:54,330 Thankfully since then, we can now take for granted that those things exist. 40 00:02:54,330 --> 00:02:56,760 But you, indeed, built that from scratch. 41 00:02:56,760 --> 00:02:59,850 Just a week later, we started handing you large files like this. 42 00:02:59,850 --> 00:03:03,270 And of all things, you were able to deduce by writing some Python code 43 00:03:03,270 --> 00:03:06,330 that this is lavender's DNA, among others 44 00:03:06,330 --> 00:03:08,550 in the class whose files we handed you. 45 00:03:08,550 --> 00:03:11,120 And then most recently, or perhaps quite soon, 46 00:03:11,120 --> 00:03:12,930 when you learn to apply another language. 47 00:03:12,930 --> 00:03:14,100 In this case, SQL. 48 00:03:14,100 --> 00:03:17,490 To questions like who has starred in films with Kevin Bacon. 49 00:03:17,490 --> 00:03:19,590 And so, a number of tools are now in your toolkit. 50 00:03:19,590 --> 00:03:24,000 And again, I would just emphasize that eight weeks ago, 2/3 of you 51 00:03:24,000 --> 00:03:25,840 had never done any of that before. 52 00:03:25,840 --> 00:03:28,502 So even if it's felt like it has never let up 53 00:03:28,502 --> 00:03:30,960 and each week feels all the more challenging than the last, 54 00:03:30,960 --> 00:03:31,980 consider the delta. 55 00:03:31,980 --> 00:03:34,020 Consider what we promised in the first week of the class. 56 00:03:34,020 --> 00:03:35,580 That what ultimately matters in this course 57 00:03:35,580 --> 00:03:38,200 is not so much where you end up relative to your classmates, 58 00:03:38,200 --> 00:03:41,010 but where you end up relative to yourself when you began. 59 00:03:41,010 --> 00:03:43,980 And it is, indeed, those eight weeks ago that you began. 60 00:03:43,980 --> 00:03:47,340 And it's today and in the courses final weeks that you will ultimately 61 00:03:47,340 --> 00:03:49,510 be able to compare yourself. 62 00:03:49,510 --> 00:03:54,355 So in trying to think today about what we hope your own takeaways are from, 63 00:03:54,355 --> 00:03:56,730 not only the course, but computer science more generally, 64 00:03:56,730 --> 00:03:59,100 I actually pulled up some of my own notes. 65 00:03:59,100 --> 00:04:02,550 You might recall from week zero that I mentioned I took this course myself 66 00:04:02,550 --> 00:04:06,030 back in 1996 and it happened to be the one that turned me from a government 67 00:04:06,030 --> 00:04:07,447 major to a computer science major. 68 00:04:07,447 --> 00:04:10,280 And I didn't take many notes at first, it seems in that first class. 69 00:04:10,280 --> 00:04:11,950 Now, there were a couple of other pages. 70 00:04:11,950 --> 00:04:14,158 And so, I started flipping through these and in fact, 71 00:04:14,158 --> 00:04:16,060 this was my second page of notes. 72 00:04:16,060 --> 00:04:19,440 And if you focus on what's up here at the top, apparently, one of my first 73 00:04:19,440 --> 00:04:22,920 notes to myself that a function, for those unfamiliar today, 74 00:04:22,920 --> 00:04:25,080 are instructions that do the work. 75 00:04:25,080 --> 00:04:28,530 And indeed, if I looked down further on my notes, arguments 76 00:04:28,530 --> 00:04:30,190 we introduced that same first day. 77 00:04:30,190 --> 00:04:32,790 It's info that's passed from one function to another 78 00:04:32,790 --> 00:04:36,100 to have something done by or performed on it. 79 00:04:36,100 --> 00:04:36,600 All right. 80 00:04:36,600 --> 00:04:39,720 So that actually maps wonderfully cleanly to what 81 00:04:39,720 --> 00:04:42,810 it is we indeed started ourselves doing those eight weeks ago. 82 00:04:42,810 --> 00:04:44,970 Just talking about what CS is, problem solving. 83 00:04:44,970 --> 00:04:47,100 And a problem is just something that's got input. 84 00:04:47,100 --> 00:04:50,130 And the goal, of course, is to produce something with output. 85 00:04:50,130 --> 00:04:52,200 And we had to agree from that very first week 86 00:04:52,200 --> 00:04:54,490 how we're going to represent these inputs and outputs. 87 00:04:54,490 --> 00:04:57,330 And so, we might do it symbolically with letters of the alphabet. 88 00:04:57,330 --> 00:05:01,470 We know since then with that we might do it numerically as with decimal digits 89 00:05:01,470 --> 00:05:04,200 or below that, we might just use binary, a different base 90 00:05:04,200 --> 00:05:06,060 system using only zeros and ones. 91 00:05:06,060 --> 00:05:09,210 Or we could even represent that same capital A just using 92 00:05:09,210 --> 00:05:12,990 some pattern of light bulbs or switches that you turn on in some order. 93 00:05:12,990 --> 00:05:16,080 In fact, if you think back then to these first principles 94 00:05:16,080 --> 00:05:18,880 that we introduced those weeks ago, to any of the students 95 00:05:18,880 --> 00:05:20,856 now in the audience, what does this say? 96 00:05:20,856 --> 00:05:21,643 AUDIENCE: Hi. 97 00:05:21,643 --> 00:05:22,310 DAVID MALAN: Hi. 98 00:05:22,310 --> 00:05:23,450 So it indeed says hi. 99 00:05:23,450 --> 00:05:24,070 Why is that? 100 00:05:24,070 --> 00:05:27,600 Well, we just agreed weeks ago on what numbers map to what letters. 101 00:05:27,600 --> 00:05:29,600 And so as long as all of the humans in the world 102 00:05:29,600 --> 00:05:33,010 agree on that when they're sending emails, or text messages, or the like, 103 00:05:33,010 --> 00:05:35,330 our computer systems can all present information 104 00:05:35,330 --> 00:05:37,250 that we ultimately understand. 105 00:05:37,250 --> 00:05:40,190 Another review question from week zero. 106 00:05:40,190 --> 00:05:44,060 What did this say way back when? 107 00:05:44,060 --> 00:05:50,660 If you need a hint, it was it was in decimal 128,514. 108 00:05:50,660 --> 00:05:52,260 A little louder. 109 00:05:52,260 --> 00:05:53,080 AUDIENCE: Emoji. 110 00:05:53,080 --> 00:05:53,872 DAVID MALAN: Emoji. 111 00:05:53,872 --> 00:05:55,720 This was the face with tears of joy, right? 112 00:05:55,720 --> 00:05:57,640 Taking all of the fun out of sending emojis. 113 00:05:57,640 --> 00:06:01,090 Anytime you receive or send an emoji, really all you're sending 114 00:06:01,090 --> 00:06:06,160 is a pattern of zeros and ones, or worse the number 128,514. 115 00:06:06,160 --> 00:06:08,500 But your computer or phone are presenting it to you 116 00:06:08,500 --> 00:06:10,510 in a certain way based on that context. 117 00:06:10,510 --> 00:06:13,510 All based on just how we humans or those before us decided 118 00:06:13,510 --> 00:06:16,250 how to represent this information. 119 00:06:16,250 --> 00:06:18,940 But of course, we don't have just those inputs and outputs. 120 00:06:18,940 --> 00:06:20,840 There is another piece to the puzzle. 121 00:06:20,840 --> 00:06:23,340 And so, I actually looked back at my own third page of notes 122 00:06:23,340 --> 00:06:26,740 here and focused on my first line here back in 1996. 123 00:06:26,740 --> 00:06:29,200 An algorithm is apparently a precise sequence 124 00:06:29,200 --> 00:06:32,140 of steps for getting something done and programming more generally 125 00:06:32,140 --> 00:06:34,900 is a process of taking an algorithm and putting it 126 00:06:34,900 --> 00:06:37,660 into a language a computer can process. 127 00:06:37,660 --> 00:06:40,540 And indeed, that really was the additional puzzle piece 128 00:06:40,540 --> 00:06:42,480 we first focused on in week zero. 129 00:06:42,480 --> 00:06:45,780 It was what was inside the proverbial black box? 130 00:06:45,780 --> 00:06:48,490 The sort of secret sauce that you provide your input to, 131 00:06:48,490 --> 00:06:49,660 you get your output from. 132 00:06:49,660 --> 00:06:53,350 Those are the algorithms that we've been talking about ever since now, not 133 00:06:53,350 --> 00:06:55,240 just in pseudocode or in English. 134 00:06:55,240 --> 00:06:57,310 But in C, and in Python, and now SQL. 135 00:06:57,310 --> 00:07:01,460 And then in the coming weeks, a few other languages as well. 136 00:07:01,460 --> 00:07:04,840 But of course, we used algorithms to solve problems 137 00:07:04,840 --> 00:07:07,780 and one problem is and was rather old school. 138 00:07:07,780 --> 00:07:10,180 And we thought we'd reflect just a bit and perhaps 139 00:07:10,180 --> 00:07:14,320 reinforce that same week zero if by taking a couple of volunteers. 140 00:07:14,320 --> 00:07:17,230 Perhaps a student and one of their family members 141 00:07:17,230 --> 00:07:19,360 voluntarily or forcibly with them. 142 00:07:19,360 --> 00:07:21,610 You have to be comfortable, though, appearing on stage 143 00:07:21,610 --> 00:07:24,670 and in turn, the internet in perpetuity is the catch. 144 00:07:24,670 --> 00:07:25,760 I see-- OK. 145 00:07:25,760 --> 00:07:29,110 I see one volunteer and either mom or dad 146 00:07:29,110 --> 00:07:30,800 finding out who is not going to go up. 147 00:07:30,800 --> 00:07:31,300 OK 148 00:07:31,300 --> 00:07:31,800 [LAUGHTER] 149 00:07:31,800 --> 00:07:32,530 Come on up. 150 00:07:32,530 --> 00:07:34,655 A round of applause if we could for our volunteers. 151 00:07:34,655 --> 00:07:37,880 [APPLAUSE] 152 00:07:37,880 --> 00:07:39,710 DAVID MALAN: Come on over this way. 153 00:07:39,710 --> 00:07:40,685 And what is your name? 154 00:07:40,685 --> 00:07:41,000 DANIELLA: Daniella. 155 00:07:41,000 --> 00:07:41,510 DAVID MALAN: Daniella. 156 00:07:41,510 --> 00:07:42,530 Nice to meet you. 157 00:07:42,530 --> 00:07:43,280 Come on over here. 158 00:07:43,280 --> 00:07:44,197 And what is your name? 159 00:07:44,197 --> 00:07:44,930 MARIANO: Mariano. 160 00:07:44,930 --> 00:07:45,470 DAVID MALAN: Mariano. 161 00:07:45,470 --> 00:07:46,550 And your dad, I presume. 162 00:07:46,550 --> 00:07:46,940 MARIANO: Yes. 163 00:07:46,940 --> 00:07:47,300 DAVID MALAN: All right. 164 00:07:47,300 --> 00:07:48,685 Well, so nice to see you both. 165 00:07:48,685 --> 00:07:51,560 You'll recall from week zero that one of the first problems we solved 166 00:07:51,560 --> 00:07:53,990 was looking up someone in a phone book. 167 00:07:53,990 --> 00:07:56,810 Well, here I have a pretty thick yellow pages wherein 168 00:07:56,810 --> 00:08:00,620 there's a whole bunch of products and services alphabetized from A to Z. 169 00:08:00,620 --> 00:08:03,420 And we can, of course, look up the number for someone in this book. 170 00:08:03,420 --> 00:08:05,450 For instance, suppose today we need a plumber. 171 00:08:05,450 --> 00:08:08,570 Could we ask Mariano to find us a plumber in this phone book? 172 00:08:08,570 --> 00:08:14,250 173 00:08:14,250 --> 00:08:15,600 Flipping through a few pages. 174 00:08:15,600 --> 00:08:16,860 A lot of pages. 175 00:08:16,860 --> 00:08:17,360 Yeah. 176 00:08:17,360 --> 00:08:17,820 OK. 177 00:08:17,820 --> 00:08:18,320 All right. 178 00:08:18,320 --> 00:08:19,830 And we have a page full of plumbers. 179 00:08:19,830 --> 00:08:22,260 And now, could your dad have done better do you think? 180 00:08:22,260 --> 00:08:22,890 DANIELLA: Yes. 181 00:08:22,890 --> 00:08:23,890 DAVID MALAN: I think so. 182 00:08:23,890 --> 00:08:27,870 So would you like to show dad and other parents here 183 00:08:27,870 --> 00:08:31,020 what you might have done instead? 184 00:08:31,020 --> 00:08:31,740 Oh my goodness. 185 00:08:31,740 --> 00:08:32,580 [LAUGHTER] 186 00:08:32,580 --> 00:08:33,990 OK. 187 00:08:33,990 --> 00:08:34,490 Thank you. 188 00:08:34,490 --> 00:08:35,478 [APPLAUSE] 189 00:08:35,478 --> 00:08:36,960 [LAUGHTER] 190 00:08:36,960 --> 00:08:40,620 DAVID MALAN: And for those wondering, let's continue the algorithm, 191 00:08:40,620 --> 00:08:41,159 if you will. 192 00:08:41,159 --> 00:08:42,076 What's your next step? 193 00:08:42,076 --> 00:08:44,880 194 00:08:44,880 --> 00:08:46,340 [LAUGHTER] 195 00:08:46,340 --> 00:08:47,040 Nice. 196 00:08:47,040 --> 00:08:49,320 And why are you doing this, though? 197 00:08:49,320 --> 00:08:52,580 DANIELLA: So I open halfway and then if it's not on the page 198 00:08:52,580 --> 00:08:55,850 and it looks like, for example, if it's n, I know p is afterwards. 199 00:08:55,850 --> 00:08:58,850 So I need to get rid of the first half and just look at the second half. 200 00:08:58,850 --> 00:08:59,990 DAVID MALAN: Well, need to is a little strong. 201 00:08:59,990 --> 00:09:00,110 [LAUGHTER] 202 00:09:00,110 --> 00:09:01,430 But you can get rid of-- 203 00:09:01,430 --> 00:09:01,945 yes, indeed. 204 00:09:01,945 --> 00:09:04,820 So if you keep this process going, halving, and halving, and halving, 205 00:09:04,820 --> 00:09:06,080 what should you be left with ultimately? 206 00:09:06,080 --> 00:09:06,890 DANIELLA: Just the letter p. 207 00:09:06,890 --> 00:09:07,660 DAVID MALAN: Just the letter p. 208 00:09:07,660 --> 00:09:10,327 Round of applause would be good for both of our volunteers here. 209 00:09:10,327 --> 00:09:11,212 [APPLAUSE] 210 00:09:11,212 --> 00:09:12,170 DAVID MALAN: Thank you. 211 00:09:12,170 --> 00:09:13,550 A CS50 stress ball for you both. 212 00:09:13,550 --> 00:09:14,770 Thank you so much. 213 00:09:14,770 --> 00:09:16,100 Oh, thank you. 214 00:09:16,100 --> 00:09:17,107 Thanks. 215 00:09:17,107 --> 00:09:19,190 So that was one of the first lessons with which we 216 00:09:19,190 --> 00:09:20,510 began focusing on algorithms. 217 00:09:20,510 --> 00:09:24,050 And the point back then, recall, was to really emphasize the familiar, right? 218 00:09:24,050 --> 00:09:26,960 We might not use that particular technology all that much anymore. 219 00:09:26,960 --> 00:09:30,380 But it really is fundamentally the same thing that's now in our iPhones 220 00:09:30,380 --> 00:09:32,078 and Android devices and the like. 221 00:09:32,078 --> 00:09:35,120 It just so happens that we search for things by scrolling with our finger 222 00:09:35,120 --> 00:09:35,930 up and down. 223 00:09:35,930 --> 00:09:39,110 But consider too, even these days in 2019 224 00:09:39,110 --> 00:09:41,090 when you type into the auto-complete to search 225 00:09:41,090 --> 00:09:43,250 for someone by first name or last name, how 226 00:09:43,250 --> 00:09:45,230 is your phone finding that information? 227 00:09:45,230 --> 00:09:46,780 It's exactly like that. 228 00:09:46,780 --> 00:09:48,680 Not quite as physically as that. 229 00:09:48,680 --> 00:09:50,690 But most likely for efficiency, your phone 230 00:09:50,690 --> 00:09:53,660 is looking roughly in the middle of all of those names then jumping 231 00:09:53,660 --> 00:09:57,830 up or down in the blink of an eye in order to find that person for you 232 00:09:57,830 --> 00:09:58,820 ever so quickly. 233 00:09:58,820 --> 00:10:01,430 And so, all of us might have an intuitive understanding, 234 00:10:01,430 --> 00:10:05,120 just like Mariano did, for finding plumbers by jumping to the p section. 235 00:10:05,120 --> 00:10:08,450 But then, he came close to the p section, but then started flipping. 236 00:10:08,450 --> 00:10:11,690 And I dare say you flipped through far more pages 237 00:10:11,690 --> 00:10:14,690 than you ultimately needed to using our more efficient divide 238 00:10:14,690 --> 00:10:18,710 and conquer if one time only algorithm instead. 239 00:10:18,710 --> 00:10:23,710 So beyond algorithms, I recall that I had just a few other notes. 240 00:10:23,710 --> 00:10:26,580 On my last page of notes, I also had this here. 241 00:10:26,580 --> 00:10:29,540 That what was apparently important then and no less so 242 00:10:29,540 --> 00:10:34,190 now is that in computer science and in turn programming, 243 00:10:34,190 --> 00:10:37,912 precision is important and correctness is important. 244 00:10:37,912 --> 00:10:39,620 And indeed, one of the things you perhaps 245 00:10:39,620 --> 00:10:43,220 gleaned in programming, whether in Scratch or C or Python 246 00:10:43,220 --> 00:10:47,600 or SQL over the past few weeks, is that the computers are really unforgiving. 247 00:10:47,600 --> 00:10:49,310 They can't just infer like we humans do. 248 00:10:49,310 --> 00:10:52,580 And frankly, I'm not sure we would want our computers to just infer sometimes 249 00:10:52,580 --> 00:10:56,120 what we mean if the goal is precision and correctness. 250 00:10:56,120 --> 00:10:57,590 You need to be ever so precise. 251 00:10:57,590 --> 00:11:00,200 So let's see, perhaps, with one more demonstration just how 252 00:11:00,200 --> 00:11:03,020 much this one has perhaps sunk in. 253 00:11:03,020 --> 00:11:07,670 If we can get perhaps two more volunteers, a student and family member 254 00:11:07,670 --> 00:11:08,720 as well. 255 00:11:08,720 --> 00:11:09,860 Student and family member. 256 00:11:09,860 --> 00:11:11,960 Here and I don't see a family member's hand up. 257 00:11:11,960 --> 00:11:13,140 Can you convince one? 258 00:11:13,140 --> 00:11:13,640 OK. 259 00:11:13,640 --> 00:11:14,660 Come on up. 260 00:11:14,660 --> 00:11:15,230 Wonderful. 261 00:11:15,230 --> 00:11:18,100 A round of applause for our other pair of volunteers here. 262 00:11:18,100 --> 00:11:21,500 [APPLAUSE] 263 00:11:21,500 --> 00:11:24,377 So now for this one, not everyone's off the hook. 264 00:11:24,377 --> 00:11:26,960 If all the students in the room, if they have a piece of paper 265 00:11:26,960 --> 00:11:30,002 and/or a pen or pencil could take that out and share with anyone next you 266 00:11:30,002 --> 00:11:31,700 if you don't have. 267 00:11:31,700 --> 00:11:34,407 Emma and Brian are also going to pass out some paper and pens 268 00:11:34,407 --> 00:11:35,990 if you don't have a writing apparatus. 269 00:11:35,990 --> 00:11:37,740 The goal at hand is actually for all of us 270 00:11:37,740 --> 00:11:39,710 to participate, thanks to our two volunteers. 271 00:11:39,710 --> 00:11:40,160 And what's your name? 272 00:11:40,160 --> 00:11:40,700 DAVID: David. 273 00:11:40,700 --> 00:11:41,492 DAVID MALAN: David. 274 00:11:41,492 --> 00:11:42,220 Nice to see you. 275 00:11:42,220 --> 00:11:42,680 SPEAKER: [INAUDIBLE] 276 00:11:42,680 --> 00:11:44,210 DAVID MALAN: [INAUDIBLE] Nice to see you, as well. 277 00:11:44,210 --> 00:11:45,600 Come on over in here. 278 00:11:45,600 --> 00:11:49,010 And this will be a two part exercise as well. 279 00:11:49,010 --> 00:11:51,660 And the first goal at hand is for you to choose. 280 00:11:51,660 --> 00:11:53,540 Do you want to go first or dad, is it? 281 00:11:53,540 --> 00:11:55,040 Would you like your dad to go first? 282 00:11:55,040 --> 00:11:55,540 DAVID: OK. 283 00:11:55,540 --> 00:11:56,240 I'll go first. 284 00:11:56,240 --> 00:11:57,060 DAVID MALAN: You're going to go first. 285 00:11:57,060 --> 00:11:57,560 All right. 286 00:11:57,560 --> 00:11:58,670 So come on over here. 287 00:11:58,670 --> 00:12:03,200 And what I'm going to show David in just a moment is an image on the screen 288 00:12:03,200 --> 00:12:07,440 that I'm going to ask that he program you, the audience, 289 00:12:07,440 --> 00:12:10,310 to draw giving verbal instructions only. 290 00:12:10,310 --> 00:12:14,030 The goal of which is for him to be as precise as possible 291 00:12:14,030 --> 00:12:18,470 and as correct as possible to compel the audience, much like a computer, 292 00:12:18,470 --> 00:12:20,570 to follow his instructions. 293 00:12:20,570 --> 00:12:23,000 And in turn, implement your algorithm. 294 00:12:23,000 --> 00:12:27,050 So in just a moment, David is going to rattle off step 295 00:12:27,050 --> 00:12:31,268 by step instructions for having everyone in the audience draw this. 296 00:12:31,268 --> 00:12:33,560 You are the only one that can see what's on the screen. 297 00:12:33,560 --> 00:12:37,640 Everyone in the audience just about has a piece of paper and a pen or pencil. 298 00:12:37,640 --> 00:12:41,540 And I just need you very confidently, clearly, 299 00:12:41,540 --> 00:12:45,410 to recite step by step instructions by which everyone with their pen or pencil 300 00:12:45,410 --> 00:12:48,260 can draw what you see on the screen here. 301 00:12:48,260 --> 00:12:48,940 Makes sense? 302 00:12:48,940 --> 00:12:49,440 DAVID: Yes. 303 00:12:49,440 --> 00:12:53,174 DAVID MALAN: You may use any verbal instructions you like. 304 00:12:53,174 --> 00:12:54,100 DAVID: OK. 305 00:12:54,100 --> 00:12:55,300 DAVID MALAN: All right. 306 00:12:55,300 --> 00:12:57,530 Just about ready to begin? 307 00:12:57,530 --> 00:12:59,400 The goal, precision correctness. 308 00:12:59,400 --> 00:12:59,900 Begin. 309 00:12:59,900 --> 00:13:00,400 DAVID: OK. 310 00:13:00,400 --> 00:13:01,450 Step 1. 311 00:13:01,450 --> 00:13:05,120 Draw a sideways square. 312 00:13:05,120 --> 00:13:05,620 [LAUGHTER] 313 00:13:05,620 --> 00:13:06,850 Sideways. 314 00:13:06,850 --> 00:13:08,430 45 degrees rotated. 315 00:13:08,430 --> 00:13:08,930 Yeah. 316 00:13:08,930 --> 00:13:11,990 317 00:13:11,990 --> 00:13:13,130 DAVID MALAN: OK. 318 00:13:13,130 --> 00:13:17,630 DAVID: From the bottom three corners, draw a straight line down 319 00:13:17,630 --> 00:13:21,530 that's approximately the length of each side of the square. 320 00:13:21,530 --> 00:13:25,850 321 00:13:25,850 --> 00:13:28,910 DAVID MALAN: Unfortunately, programs cannot ask questions of programmer. 322 00:13:28,910 --> 00:13:31,280 So we continue on with the next step. 323 00:13:31,280 --> 00:13:35,750 DAVID: And finally, between the first and second line, 324 00:13:35,750 --> 00:13:38,060 draw a line connecting the two at the end. 325 00:13:38,060 --> 00:13:41,420 And between the second and third line, draw a line connecting the end. 326 00:13:41,420 --> 00:13:43,902 327 00:13:43,902 --> 00:13:44,860 DAVID MALAN: All right. 328 00:13:44,860 --> 00:13:46,527 How do you feel about your instructions? 329 00:13:46,527 --> 00:13:47,550 Precise and correct? 330 00:13:47,550 --> 00:13:48,490 DAVID: Wishy-washy. 331 00:13:48,490 --> 00:13:49,170 DAVID MALAN: Wishy-washy. 332 00:13:49,170 --> 00:13:49,830 OK. 333 00:13:49,830 --> 00:13:50,130 All right. 334 00:13:50,130 --> 00:13:50,850 So let's go ahead. 335 00:13:50,850 --> 00:13:52,020 Hang on to the mic for just a moment. 336 00:13:52,020 --> 00:13:54,395 I'm going to hop down into the audience with our TFs just 337 00:13:54,395 --> 00:13:56,040 to grab a few representative solutions. 338 00:13:56,040 --> 00:13:58,290 If you wouldn't mind my grabbing a few sheets of paper 339 00:13:58,290 --> 00:14:00,060 from folks who have participated. 340 00:14:00,060 --> 00:14:02,940 Let me take a few over here, just a random sample. 341 00:14:02,940 --> 00:14:06,180 Welcome to volunteer proactively or keep it to yourself. 342 00:14:06,180 --> 00:14:07,600 Let me go in over here. 343 00:14:07,600 --> 00:14:08,100 OK. 344 00:14:08,100 --> 00:14:10,530 Thank you so much. 345 00:14:10,530 --> 00:14:11,750 Any takers over here? 346 00:14:11,750 --> 00:14:12,790 OK. 347 00:14:12,790 --> 00:14:13,290 All right. 348 00:14:13,290 --> 00:14:13,790 Good. 349 00:14:13,790 --> 00:14:14,640 Good. 350 00:14:14,640 --> 00:14:15,510 Good. 351 00:14:15,510 --> 00:14:16,027 Thank you. 352 00:14:16,027 --> 00:14:16,610 And all right. 353 00:14:16,610 --> 00:14:18,330 The TFs are grabbing a couple too. 354 00:14:18,330 --> 00:14:19,140 See some over here. 355 00:14:19,140 --> 00:14:19,860 All right. 356 00:14:19,860 --> 00:14:23,460 That should do. 357 00:14:23,460 --> 00:14:24,420 That should do. 358 00:14:24,420 --> 00:14:27,637 Let me grab these from Brian over here and Emma. 359 00:14:27,637 --> 00:14:28,470 Oh, those are blank. 360 00:14:28,470 --> 00:14:28,970 All right. 361 00:14:28,970 --> 00:14:32,200 So I think we have plenty over here. 362 00:14:32,200 --> 00:14:35,910 So let's take a look before we do part two of two, if I may, 363 00:14:35,910 --> 00:14:39,080 at how well David programmed the audience. 364 00:14:39,080 --> 00:14:41,820 I'm going to go ahead in just a moment and pull up 365 00:14:41,820 --> 00:14:45,960 a projection of some of these drawings here that 366 00:14:45,960 --> 00:14:47,730 are the results of these operations. 367 00:14:47,730 --> 00:14:49,200 So let me flip through. 368 00:14:49,200 --> 00:14:51,150 Get a sample here. 369 00:14:51,150 --> 00:14:55,930 And I see a lot of good options here. 370 00:14:55,930 --> 00:15:01,830 I see this picture here, which perhaps resembles what you drew. 371 00:15:01,830 --> 00:15:06,067 See this one here the top corner, very similar in spirit. 372 00:15:06,067 --> 00:15:08,150 This one left a lot of room for other things but-- 373 00:15:08,150 --> 00:15:11,100 [LAUGHTER] 374 00:15:11,100 --> 00:15:13,950 This one was a little more abstract, if I may. 375 00:15:13,950 --> 00:15:15,310 [LAUGHTER] 376 00:15:15,310 --> 00:15:18,990 And so, let me go over to a spoiler to show you what it 377 00:15:18,990 --> 00:15:22,500 is David was programming you to draw. 378 00:15:22,500 --> 00:15:25,140 And with some suspense, he was compelling you 379 00:15:25,140 --> 00:15:30,180 to draw we hope this here. 380 00:15:30,180 --> 00:15:30,680 All right. 381 00:15:30,680 --> 00:15:32,220 So close or not close perhaps. 382 00:15:32,220 --> 00:15:32,720 All right. 383 00:15:32,720 --> 00:15:34,130 Round of applause for David, if we could. 384 00:15:34,130 --> 00:15:34,580 [APPLAUSE] 385 00:15:34,580 --> 00:15:35,000 DAVID MALAN: Thank you. 386 00:15:35,000 --> 00:15:35,720 One moment. 387 00:15:35,720 --> 00:15:37,550 And so, you gave pretty-- 388 00:15:37,550 --> 00:15:40,020 you used, if you would, abstractions in discussing this. 389 00:15:40,020 --> 00:15:43,040 You said a sideways square, used 45 degree angles 390 00:15:43,040 --> 00:15:46,380 hoping that folks would presumably know what you mean by that. 391 00:15:46,380 --> 00:15:48,505 Why did you not just say draw a cube, for instance? 392 00:15:48,505 --> 00:15:50,172 DAVID: I thought that would be cheating. 393 00:15:50,172 --> 00:15:51,050 DAVID MALAN: OK. 394 00:15:51,050 --> 00:15:52,490 Well, it would not have been cheating, but it would 395 00:15:52,490 --> 00:15:54,220 have been a wonderful abstraction. 396 00:15:54,220 --> 00:15:57,812 If everyone in the room, assuming, knows what in a cube is, 397 00:15:57,812 --> 00:16:00,020 you might then be compelled to draw it quite quickly. 398 00:16:00,020 --> 00:16:02,600 But that, too, leaves ambiguity and lacks precision. 399 00:16:02,600 --> 00:16:03,955 Well, how is the cube oriented? 400 00:16:03,955 --> 00:16:04,580 Is it this way? 401 00:16:04,580 --> 00:16:05,205 Is it that way? 402 00:16:05,205 --> 00:16:06,260 Is a curved this way? 403 00:16:06,260 --> 00:16:08,802 So sometimes, these abstractions aren't sufficiently helpful. 404 00:16:08,802 --> 00:16:11,520 So I probably would have done what you did as well. 405 00:16:11,520 --> 00:16:14,600 Now let's do one other example here, if we could. 406 00:16:14,600 --> 00:16:17,870 I'm going to go ahead in just a moment and project an image onto the screen 407 00:16:17,870 --> 00:16:21,110 that everyone in the audience can see except you two. 408 00:16:21,110 --> 00:16:23,790 Let me go ahead and re angle this a little bit. 409 00:16:23,790 --> 00:16:28,490 And if father and son would like to get together or solo draw 410 00:16:28,490 --> 00:16:31,688 a picture that the audience is going to tell you how to draw. 411 00:16:31,688 --> 00:16:33,230 So we're going to flip the roles now. 412 00:16:33,230 --> 00:16:35,330 You all will see the drawing on the screen. 413 00:16:35,330 --> 00:16:38,720 We ask that you tell our volunteers what to draw. 414 00:16:38,720 --> 00:16:41,840 You can use any words that you want, but you cannot ask questions and no 415 00:16:41,840 --> 00:16:44,360 physical gestures to explain. 416 00:16:44,360 --> 00:16:45,200 All right. 417 00:16:45,200 --> 00:16:47,480 Unfortunately, it's a little hard technologically here 418 00:16:47,480 --> 00:16:48,860 in that the solution is going to be there. 419 00:16:48,860 --> 00:16:50,420 The solution is going to be there. 420 00:16:50,420 --> 00:16:53,870 So we're going to have to put some visors on you, if we could-- 421 00:16:53,870 --> 00:16:54,560 [LAUGHTER] 422 00:16:54,560 --> 00:16:56,393 --so that you can only see straight forward. 423 00:16:56,393 --> 00:16:59,437 And if you don't mind hugging the board as close as possible, 424 00:16:59,437 --> 00:17:02,270 but occasionally back up so that people can see what you're drawing, 425 00:17:02,270 --> 00:17:06,020 but resist the temptation to look up, over left or right. 426 00:17:06,020 --> 00:17:06,890 All right. 427 00:17:06,890 --> 00:17:09,858 So for our audience then, the images. 428 00:17:09,858 --> 00:17:11,900 And if you two could focus only on the board now. 429 00:17:11,900 --> 00:17:14,450 Only on the board and definitely not facing that screen. 430 00:17:14,450 --> 00:17:14,950 OK. 431 00:17:14,950 --> 00:17:16,369 [LAUGHTER] 432 00:17:16,369 --> 00:17:20,619 The audience is about to see the picture in question. 433 00:17:20,619 --> 00:17:23,200 And so, we need a volunteer first from the audience 434 00:17:23,200 --> 00:17:25,329 to call out an instruction. 435 00:17:25,329 --> 00:17:26,859 Any step ones? 436 00:17:26,859 --> 00:17:28,810 Over here. 437 00:17:28,810 --> 00:17:29,580 Make a circle. 438 00:17:29,580 --> 00:17:32,898 439 00:17:32,898 --> 00:17:37,640 [LAUGHTER] 440 00:17:37,640 --> 00:17:40,280 I heard a small-- 441 00:17:40,280 --> 00:17:42,770 I heard draw a smaller circle. 442 00:17:42,770 --> 00:17:45,540 I didn't hear use the eraser, but OK. 443 00:17:45,540 --> 00:17:46,080 OK. 444 00:17:46,080 --> 00:17:46,580 OK. 445 00:17:46,580 --> 00:17:47,450 No looking at me. 446 00:17:47,450 --> 00:17:48,260 No looking at me. 447 00:17:48,260 --> 00:17:48,760 All right. 448 00:17:48,760 --> 00:17:51,120 So I'll take a third step. 449 00:17:51,120 --> 00:17:52,920 So let's go to someone else. 450 00:17:52,920 --> 00:17:54,758 Yeah. 451 00:17:54,758 --> 00:17:56,050 AUDIENCE: Draw a vertical line. 452 00:17:56,050 --> 00:17:57,592 DAVID MALAN: Draw a vertical line. 453 00:17:57,592 --> 00:17:59,259 AUDIENCE: From the center of the circle. 454 00:17:59,259 --> 00:18:01,444 DAVID MALAN: From the center of the circle. 455 00:18:01,444 --> 00:18:02,320 AUDIENCE: From the bottom of the circle and down. 456 00:18:02,320 --> 00:18:04,715 DAVID MALAN: From the bottom of the circle and down. 457 00:18:04,715 --> 00:18:07,048 AUDIENCE: Large stick figure that appears to be walking. 458 00:18:07,048 --> 00:18:08,940 [LAUGHTER] 459 00:18:08,940 --> 00:18:11,500 DAVID MALAN: I hear an abstraction. 460 00:18:11,500 --> 00:18:13,780 So we were also given a fourth instruction. 461 00:18:13,780 --> 00:18:17,818 Draw a stick figure that appears to be walking, if that helps. 462 00:18:17,818 --> 00:18:20,110 But I think we're going to need to be more precise here 463 00:18:20,110 --> 00:18:23,320 because I can imagine a stick figure doing multiple things in multiple-- 464 00:18:23,320 --> 00:18:29,730 [LAUGHTER] 465 00:18:29,730 --> 00:18:30,230 With-- 466 00:18:30,230 --> 00:18:31,910 [LAUGHTER] 467 00:18:31,910 --> 00:18:32,660 OK. 468 00:18:32,660 --> 00:18:33,680 Maybe step five. 469 00:18:33,680 --> 00:18:36,413 Do we want to make any tweaks? 470 00:18:36,413 --> 00:18:38,330 AUDIENCE: It's an almost upside down triangle. 471 00:18:38,330 --> 00:18:40,792 DAVID MALAN: Draw an almost upside down triangle, I heard. 472 00:18:40,792 --> 00:18:41,750 AUDIENCE: For the legs. 473 00:18:41,750 --> 00:18:42,995 DAVID MALAN: Through the legs. 474 00:18:42,995 --> 00:18:43,310 AUDIENCE: For the legs. 475 00:18:43,310 --> 00:18:44,393 DAVID MALAN: For the legs. 476 00:18:44,393 --> 00:18:46,934 AUDIENCE: After the vertical line coming down. 477 00:18:46,934 --> 00:18:48,533 AUDIENCE: You need to erase the legs. 478 00:18:48,533 --> 00:18:49,200 DAVID MALAN: OK. 479 00:18:49,200 --> 00:18:50,370 I heard erase the legs. 480 00:18:50,370 --> 00:18:51,620 AUDIENCE: Get rid of the arms. 481 00:18:51,620 --> 00:18:53,334 DAVID MALAN: And get rid of the arms. 482 00:18:53,334 --> 00:18:56,970 [LAUGHTER] 483 00:18:56,970 --> 00:18:59,810 OK and step five was? 484 00:18:59,810 --> 00:19:03,156 AUDIENCE: From the bottom of the vertical line, the body, 485 00:19:03,156 --> 00:19:07,232 make the two legs are like a triangle without the bottom. 486 00:19:07,232 --> 00:19:08,940 DAVID MALAN: From the bottom of the body, 487 00:19:08,940 --> 00:19:12,032 draw like a triangle to represent the legs. 488 00:19:12,032 --> 00:19:12,824 AUDIENCE: But not-- 489 00:19:12,824 --> 00:19:14,640 [LAUGHTER] 490 00:19:14,640 --> 00:19:16,560 DAVID MALAN: But not that way. 491 00:19:16,560 --> 00:19:17,440 That's good. 492 00:19:17,440 --> 00:19:18,780 Let's move on to step six. 493 00:19:18,780 --> 00:19:20,100 Step six. 494 00:19:20,100 --> 00:19:22,208 Someone over here. 495 00:19:22,208 --> 00:19:24,688 AUDIENCE: So once they erase that triangle, 496 00:19:24,688 --> 00:19:27,002 from the bottom of the vertical line, draw 497 00:19:27,002 --> 00:19:30,392 an upside V, where the center of the V is touching 498 00:19:30,392 --> 00:19:32,150 the bottom of that bottom line. 499 00:19:32,150 --> 00:19:37,857 DAVID MALAN: From the bottom of the straight line, draw an upside down V. 500 00:19:37,857 --> 00:19:38,690 I think we did that. 501 00:19:38,690 --> 00:19:41,770 Can you step aside just so the audience can see? 502 00:19:41,770 --> 00:19:42,960 Now we have a tripod. 503 00:19:42,960 --> 00:19:43,460 OK. 504 00:19:43,460 --> 00:19:45,150 [LAUGHTER] 505 00:19:45,150 --> 00:19:46,320 OK. 506 00:19:46,320 --> 00:19:46,820 OK. 507 00:19:46,820 --> 00:19:47,730 So I think we're there. 508 00:19:47,730 --> 00:19:48,200 I think we're there. 509 00:19:48,200 --> 00:19:49,380 One other instruction. 510 00:19:49,380 --> 00:19:51,170 Let's see if we can take this home. 511 00:19:51,170 --> 00:19:52,199 Yes, right here. 512 00:19:52,199 --> 00:19:55,951 AUDIENCE: Draw a less than symbol, starting from the base of the middle 513 00:19:55,951 --> 00:19:57,360 of the circle. 514 00:19:57,360 --> 00:20:00,000 DAVID MALAN: Draw a less than symbol from the base 515 00:20:00,000 --> 00:20:04,650 of the middle of the end of the circle on the left side. 516 00:20:04,650 --> 00:20:09,047 517 00:20:09,047 --> 00:20:10,380 DAVID: Wait, a less than symbol. 518 00:20:10,380 --> 00:20:11,630 DAVID MALAN: Less than symbol. 519 00:20:11,630 --> 00:20:12,200 Yep. 520 00:20:12,200 --> 00:20:14,400 DAVID: Less than. 521 00:20:14,400 --> 00:20:15,480 DAVID MALAN: Yes. 522 00:20:15,480 --> 00:20:15,980 DAVID: Here? 523 00:20:15,980 --> 00:20:18,022 DAVID MALAN: So this is what we call a condition. 524 00:20:18,022 --> 00:20:18,550 So, yes. 525 00:20:18,550 --> 00:20:19,300 AUDIENCE: Correct. 526 00:20:19,300 --> 00:20:20,180 DAVID MALAN: Correct, I hear. 527 00:20:20,180 --> 00:20:20,680 OK. 528 00:20:20,680 --> 00:20:21,550 I think we're close. 529 00:20:21,550 --> 00:20:23,530 Two more steps, maybe. 530 00:20:23,530 --> 00:20:26,890 AUDIENCE: To the top of the circle, write the word Hi 531 00:20:26,890 --> 00:20:28,933 with a capital H and lowercase I. 532 00:20:28,933 --> 00:20:29,600 DAVID MALAN: OK. 533 00:20:29,600 --> 00:20:35,390 From the top left of the head, draw the word hi, capital H lowercase I with-- 534 00:20:35,390 --> 00:20:36,960 I think did you say a line to it? 535 00:20:36,960 --> 00:20:37,700 AUDIENCE: Yes, with a line. 536 00:20:37,700 --> 00:20:38,992 DAVID MALAN: With a line to it. 537 00:20:38,992 --> 00:20:39,744 Yeah. 538 00:20:39,744 --> 00:20:42,010 AUDIENCE: [INAUDIBLE] 539 00:20:42,010 --> 00:20:42,910 DAVID MALAN: OK. 540 00:20:42,910 --> 00:20:44,830 And can you step aside, just so the audience can see? 541 00:20:44,830 --> 00:20:46,288 I think we need just one more step. 542 00:20:46,288 --> 00:20:47,270 One more step. 543 00:20:47,270 --> 00:20:47,770 OK. 544 00:20:47,770 --> 00:20:48,726 Back here. 545 00:20:48,726 --> 00:20:54,350 AUDIENCE: From the bottom of the circle on the right hand side-- 546 00:20:54,350 --> 00:20:57,142 DAVID MALAN: From the bottom of the circle on the right hand side-- 547 00:20:57,142 --> 00:21:00,930 AUDIENCE: --touching the base of the circle and the vertical line going 548 00:21:00,930 --> 00:21:01,430 down-- 549 00:21:01,430 --> 00:21:04,513 DAVID MALAN: --touching the base of the circle and the vertical line going 550 00:21:04,513 --> 00:21:05,030 down-- 551 00:21:05,030 --> 00:21:07,010 AUDIENCE: --make the letter L-- 552 00:21:07,010 --> 00:21:09,179 DAVID MALAN: --make the letter L-- 553 00:21:09,179 --> 00:21:11,840 AUDIENCE: --at a 15 degree angle. 554 00:21:11,840 --> 00:21:14,330 DAVID MALAN: I heard at a 15 degree angle? 555 00:21:14,330 --> 00:21:14,830 Sure. 556 00:21:14,830 --> 00:21:16,620 [LAUGHTER] 557 00:21:16,620 --> 00:21:17,730 OK. 558 00:21:17,730 --> 00:21:22,457 I think-- I think could we have you take several steps back and look up? 559 00:21:22,457 --> 00:21:24,165 And round of applause for our volunteers. 560 00:21:24,165 --> 00:21:26,808 [APPLAUSE] 561 00:21:26,808 --> 00:21:27,600 That's pretty good. 562 00:21:27,600 --> 00:21:29,500 Thank you both so much. 563 00:21:29,500 --> 00:21:31,930 Please keep the hats. 564 00:21:31,930 --> 00:21:32,910 Congrats. 565 00:21:32,910 --> 00:21:36,940 So clearly, abstractions can be useful, but they can also be challenging. 566 00:21:36,940 --> 00:21:38,220 Like programming is hard. 567 00:21:38,220 --> 00:21:41,670 And even though this went a bit off the rails here and there verbally, 568 00:21:41,670 --> 00:21:43,050 this really is just programming. 569 00:21:43,050 --> 00:21:46,050 And we're all trying to agree on a common language or common syntax 570 00:21:46,050 --> 00:21:48,570 to use to have the computer, or in this case, 571 00:21:48,570 --> 00:21:51,420 our human volunteers execute those instructions. 572 00:21:51,420 --> 00:21:53,390 And sometimes, these abstractions are great. 573 00:21:53,390 --> 00:21:55,380 Draw a stick figure who appears to be walking. 574 00:21:55,380 --> 00:21:57,840 I think we can all visualize what that is. 575 00:21:57,840 --> 00:22:00,090 Unfortunately, we're all probably visualizing 576 00:22:00,090 --> 00:22:02,210 slightly different stick figures. 577 00:22:02,210 --> 00:22:05,550 And that's, again, where precision comes into play and correctness too. 578 00:22:05,550 --> 00:22:09,130 Of course, sometimes the chalk went off in the wrong direction. 579 00:22:09,130 --> 00:22:10,320 So we might have to undo. 580 00:22:10,320 --> 00:22:14,500 And of course, we've spent also the past eight weeks debugging code as well. 581 00:22:14,500 --> 00:22:17,850 And so, I wish I could say that this gets easier or just gets 582 00:22:17,850 --> 00:22:19,140 absolutely easy. 583 00:22:19,140 --> 00:22:21,970 But it never does because the problems you aspire to solve, 584 00:22:21,970 --> 00:22:24,720 whether it's in the real world or in the world of computer science 585 00:22:24,720 --> 00:22:26,760 and programming, are going to be ever changing. 586 00:22:26,760 --> 00:22:29,170 And your aspirations are going to increase. 587 00:22:29,170 --> 00:22:31,740 And so, this frustration you might feel now never 588 00:22:31,740 --> 00:22:34,680 really goes away, if I can say as much some 20 plus years 589 00:22:34,680 --> 00:22:35,850 after doing this myself. 590 00:22:35,850 --> 00:22:39,000 But the problems you're solving with those same challenges 591 00:22:39,000 --> 00:22:42,935 and those same hurdles get so much more powerful, so much more interesting. 592 00:22:42,935 --> 00:22:45,060 And again, it all started from just a few weeks ago 593 00:22:45,060 --> 00:22:48,870 when Mario's pyramid was perhaps the first problem to solve. 594 00:22:48,870 --> 00:22:52,650 If we go back to where we were here, we had of course our drawings, and then 595 00:22:52,650 --> 00:22:54,120 ultimately this process. 596 00:22:54,120 --> 00:22:55,703 This, I dare say, is computer science. 597 00:22:55,703 --> 00:22:56,370 You have inputs. 598 00:22:56,370 --> 00:22:58,170 You have outputs and algorithms in between. 599 00:22:58,170 --> 00:23:00,670 But really, what are we talking about at the end of the day? 600 00:23:00,670 --> 00:23:03,828 Well, the creation of, the output of, the management of information. 601 00:23:03,828 --> 00:23:06,870 I mean, that really is what we've been talking about for these past eight 602 00:23:06,870 --> 00:23:07,920 weeks is information. 603 00:23:07,920 --> 00:23:09,210 How do you process it? 604 00:23:09,210 --> 00:23:11,190 How do you represent it? 605 00:23:11,190 --> 00:23:13,980 How do you transform it into something more and ultimately, solve 606 00:23:13,980 --> 00:23:15,190 problems with it? 607 00:23:15,190 --> 00:23:18,060 But, with this manipulation of, this creation of, 608 00:23:18,060 --> 00:23:20,970 this storage of information ever more so these days 609 00:23:20,970 --> 00:23:23,190 comes increasing responsibility. 610 00:23:23,190 --> 00:23:25,680 And I daresay one of the things that we encourage 611 00:23:25,680 --> 00:23:28,860 you, as you exit a course like this, is not just what you can do, 612 00:23:28,860 --> 00:23:30,840 but frankly whether you should do it. 613 00:23:30,840 --> 00:23:34,830 And indeed, all the more relevant today in societies of course stories. 614 00:23:34,830 --> 00:23:37,770 Horrifying stories of where our data has ended up 615 00:23:37,770 --> 00:23:40,260 or what has happened to our data, or good intentions 616 00:23:40,260 --> 00:23:42,870 perhaps gone awry because we haven't considered implications. 617 00:23:42,870 --> 00:23:45,180 And what we wanted to do today is to point out 618 00:23:45,180 --> 00:23:48,450 a few examples of opportunities to think harder 619 00:23:48,450 --> 00:23:51,990 about what it is you do in the real world as just a citizen. 620 00:23:51,990 --> 00:23:55,770 And what you do in the keyboard as a programmer, 621 00:23:55,770 --> 00:23:59,580 and how you might solve problems with one's privacy and the security of one's 622 00:23:59,580 --> 00:24:00,720 data in mind. 623 00:24:00,720 --> 00:24:02,712 Consider, for instance, passwords. 624 00:24:02,712 --> 00:24:04,920 These, of course, are perhaps the most familiar thing 625 00:24:04,920 --> 00:24:08,580 that you and I use probably every day to secure our accounts, 626 00:24:08,580 --> 00:24:10,932 and in turn maintain the privacy of our information. 627 00:24:10,932 --> 00:24:13,140 Whether it's our photographs, or financial documents, 628 00:24:13,140 --> 00:24:16,620 or emails, or text messages, or the like. 629 00:24:16,620 --> 00:24:19,470 Unfortunately, passwords really aren't the best mechanism. 630 00:24:19,470 --> 00:24:22,770 And most of us in this room probably should be more thoughtful 631 00:24:22,770 --> 00:24:25,290 when it comes to making these kinds of decisions, as well. 632 00:24:25,290 --> 00:24:29,760 For instance, in 2019 already, based on a very large data breach 633 00:24:29,760 --> 00:24:31,920 and in the analysis thereof, it turns out 634 00:24:31,920 --> 00:24:37,790 that the top 10 passwords in the world as of this year are number one, 123456. 635 00:24:37,790 --> 00:24:39,180 [LAUGHTER] 636 00:24:39,180 --> 00:24:41,580 Apparently, the result of some website or applications 637 00:24:41,580 --> 00:24:44,042 requiring a password of at least six characters. 638 00:24:44,042 --> 00:24:47,250 And this is about the least amount of effort you can do to satisfy that goal. 639 00:24:47,250 --> 00:24:50,080 Number two password was 123456789. 640 00:24:50,080 --> 00:24:51,180 [LAUGHTER] 641 00:24:51,180 --> 00:24:52,090 Slightly better. 642 00:24:52,090 --> 00:24:54,630 Slightly more secure insofar as it's longer. 643 00:24:54,630 --> 00:24:56,003 Number three is qwerty. 644 00:24:56,003 --> 00:24:58,170 And if you don't know what that means, that actually 645 00:24:58,170 --> 00:24:59,550 describes the type of keyboard. 646 00:24:59,550 --> 00:25:03,270 But because if you go to the top left hand corner of your keyboard and type 647 00:25:03,270 --> 00:25:05,910 one, two, three, four, five, six from left to right, 648 00:25:05,910 --> 00:25:09,330 you will end up spelling Q-W-E-R-T-Y. 649 00:25:09,330 --> 00:25:10,470 Easy to remember. 650 00:25:10,470 --> 00:25:13,530 Also, pretty easy for other people to remember as well. 651 00:25:13,530 --> 00:25:16,380 Password is the number four password out there. 652 00:25:16,380 --> 00:25:20,670 And number five is, as of this year, 6 ones. 653 00:25:20,670 --> 00:25:23,580 So another way of satisfying the constraints that these people 654 00:25:23,580 --> 00:25:25,110 did, but with even less effort. 655 00:25:25,110 --> 00:25:28,140 Just hitting the same key again, and again, and again. 656 00:25:28,140 --> 00:25:29,700 12345678. 657 00:25:29,700 --> 00:25:31,890 So, slightly behind the other two. 658 00:25:31,890 --> 00:25:32,603 ABC 123. 659 00:25:32,603 --> 00:25:34,770 Starting to get a little more interesting that we're 660 00:25:34,770 --> 00:25:36,510 combining letters and numbers. 661 00:25:36,510 --> 00:25:39,000 1234567 slips in there as well. 662 00:25:39,000 --> 00:25:42,780 Number nine is password1, clearly satisfying websites 663 00:25:42,780 --> 00:25:44,700 that require that you not use an English word 664 00:25:44,700 --> 00:25:47,360 but you include at least one symbol or letter here too. 665 00:25:47,360 --> 00:25:48,630 Dare say the bare minimum. 666 00:25:48,630 --> 00:25:52,020 And number 10 as of this year is 12345. 667 00:25:52,020 --> 00:25:56,040 So it's easy to poke fun at these and we won't call for a show of hands. 668 00:25:56,040 --> 00:25:59,550 But odds are some of us in this room maybe-- 669 00:25:59,550 --> 00:26:00,720 don't make eye contact-- 670 00:26:00,720 --> 00:26:04,830 have at least one of these passwords as your own. 671 00:26:04,830 --> 00:26:08,100 It's just all too easy, then, to guess certainly these. 672 00:26:08,100 --> 00:26:13,410 But even if you're practicing adhering to better practices than these, 673 00:26:13,410 --> 00:26:15,446 and you're not as simplistic as I'm going 674 00:26:15,446 --> 00:26:17,620 to pick an easy word or a very simple number. 675 00:26:17,620 --> 00:26:19,540 Suppose you're actually being more thoughtful. 676 00:26:19,540 --> 00:26:21,820 It doesn't really matter these days. 677 00:26:21,820 --> 00:26:25,600 I'm going to go ahead and turn my attention to just a moment to a text 678 00:26:25,600 --> 00:26:27,430 editing program here on my computer. 679 00:26:27,430 --> 00:26:30,542 The students in the room will recognize this is just representative 680 00:26:30,542 --> 00:26:31,750 of a programming environment. 681 00:26:31,750 --> 00:26:33,100 And today, this just happens to be something 682 00:26:33,100 --> 00:26:35,440 called Visual Studio Code, or VS code that you 683 00:26:35,440 --> 00:26:37,200 can download on your own Mac or PC. 684 00:26:37,200 --> 00:26:41,140 And I'm going to go ahead and just save a file called pin.py. 685 00:26:41,140 --> 00:26:43,283 Many of us have not only passwords, but pins. 686 00:26:43,283 --> 00:26:46,450 Personal identification numbers that you're supposed to keep secret and that 687 00:26:46,450 --> 00:26:48,460 are usually, say, six digits long. 688 00:26:48,460 --> 00:26:52,330 Well, even if you've protected your financial account or some other account 689 00:26:52,330 --> 00:26:55,330 with a six digit code, it might take a human quite a while 690 00:26:55,330 --> 00:26:58,570 to guess all of the possible codes that you might have chosen. 691 00:26:58,570 --> 00:27:00,740 But it's not terribly hard for a computer. 692 00:27:00,740 --> 00:27:02,740 In fact, we'll do it even more simply like a lot 693 00:27:02,740 --> 00:27:05,080 of times with a four digit code. 694 00:27:05,080 --> 00:27:07,630 I can simply go in a program like this, if I 695 00:27:07,630 --> 00:27:09,220 know a bit of programming in Python. 696 00:27:09,220 --> 00:27:12,640 And I can say from time import sleep. 697 00:27:12,640 --> 00:27:15,190 I can say something like for I in range. 698 00:27:15,190 --> 00:27:21,070 Well, let's start from 0000 and go all the way up to 9,999. 699 00:27:21,070 --> 00:27:22,210 A four digit number. 700 00:27:22,210 --> 00:27:25,328 But it turns out, we need to iterate up to 10,000 701 00:27:25,328 --> 00:27:28,120 because the students in the room will recall that we iterate up to, 702 00:27:28,120 --> 00:27:29,680 but not through that value. 703 00:27:29,680 --> 00:27:32,055 And then in here, I'm going to go ahead and say something 704 00:27:32,055 --> 00:27:35,980 like, I am checking this value I. So this 705 00:27:35,980 --> 00:27:39,310 is to say I'm proposing to write a program in Python that 706 00:27:39,310 --> 00:27:43,990 will try to crack someone's pin to show how easy it is to generate 707 00:27:43,990 --> 00:27:49,210 as a computer all of the possible PINs in the world that are four digits long. 708 00:27:49,210 --> 00:27:50,960 So and just to demonstrate this, I'm going 709 00:27:50,960 --> 00:27:55,090 to do it a little slowly by sleeping for 1/10 710 00:27:55,090 --> 00:27:57,200 of a second between each iteration. 711 00:27:57,200 --> 00:27:58,990 So I've gone ahead and saved my file. 712 00:27:58,990 --> 00:28:02,890 I'm going to go ahead down here now and run Python of pin.py. 713 00:28:02,890 --> 00:28:07,807 And I'll go ahead and make my screen a little taller here so we can see more. 714 00:28:07,807 --> 00:28:09,140 AUDIENCE: Close the parentheses. 715 00:28:09,140 --> 00:28:11,130 DAVID MALAN: Thank you. 716 00:28:11,130 --> 00:28:12,080 Thank you. 717 00:28:12,080 --> 00:28:12,740 Thank you. 718 00:28:12,740 --> 00:28:13,450 New here. 719 00:28:13,450 --> 00:28:14,420 OK. 720 00:28:14,420 --> 00:28:15,530 So here we go. 721 00:28:15,530 --> 00:28:19,880 We've now written a program that, granted is not cracking anything, 722 00:28:19,880 --> 00:28:24,260 but it is demonstrating how easily and how quickly we can generate numbers 723 00:28:24,260 --> 00:28:26,630 from 0 on up to 9,999. 724 00:28:26,630 --> 00:28:27,710 It's not quite right. 725 00:28:27,710 --> 00:28:30,680 These aren't four digit codes because they're being treated as numbers. 726 00:28:30,680 --> 00:28:32,840 But there's actually syntax with which we can solve this. 727 00:28:32,840 --> 00:28:34,548 And if you've never seen this before, you 728 00:28:34,548 --> 00:28:37,010 can actually just say something like this colon 0 4. 729 00:28:37,010 --> 00:28:39,750 And that's just going to reform my output as being four digits. 730 00:28:39,750 --> 00:28:41,630 And it's going to pat it with zeros instead. 731 00:28:41,630 --> 00:28:42,200 So boom. 732 00:28:42,200 --> 00:28:45,920 I've written a program that generates all possible four digit codes. 733 00:28:45,920 --> 00:28:49,250 Of course, I've been deliberately sleeping, that is pausing, 734 00:28:49,250 --> 00:28:51,400 each time I'm printing something out. 735 00:28:51,400 --> 00:28:52,940 A hacker is not going to do that. 736 00:28:52,940 --> 00:28:55,310 They are going to try to do this as quickly as possible. 737 00:28:55,310 --> 00:28:57,300 No need for sleep whatsoever. 738 00:28:57,300 --> 00:29:00,470 So let me just rerun this code, getting rid of those lines. 739 00:29:00,470 --> 00:29:01,460 Boom. 740 00:29:01,460 --> 00:29:04,190 That's every possible four digit code that you 741 00:29:04,190 --> 00:29:07,220 might have on your bank account or on some email account or the like, 742 00:29:07,220 --> 00:29:10,903 assuming the system allows you to have a relatively short number like that. 743 00:29:10,903 --> 00:29:11,570 You might think. 744 00:29:11,570 --> 00:29:12,070 OK. 745 00:29:12,070 --> 00:29:13,850 Well, what's better than four digits? 746 00:29:13,850 --> 00:29:14,700 Five digits. 747 00:29:14,700 --> 00:29:15,800 Let's just increase it. 748 00:29:15,800 --> 00:29:19,100 But I think that adversary is going to be able to crack that pin as well. 749 00:29:19,100 --> 00:29:22,500 I'm not even over at the screen yet and it's done already. 750 00:29:22,500 --> 00:29:24,500 It is not hard once you know how to program, not 751 00:29:24,500 --> 00:29:28,577 only to use these systems for good, but in this case, for some form of evil. 752 00:29:28,577 --> 00:29:31,160 Now maybe you're off the hook because you're not as simplistic 753 00:29:31,160 --> 00:29:35,240 as I claim as to use only, for instance, an alphabetical 754 00:29:35,240 --> 00:29:36,560 or rather a numeric code. 755 00:29:36,560 --> 00:29:40,910 Maybe you're using a word and not a word as simple as password. 756 00:29:40,910 --> 00:29:44,120 It's a more arcane word from English or perhaps some other language. 757 00:29:44,120 --> 00:29:46,310 That, too, doesn't really matter. 758 00:29:46,310 --> 00:29:51,170 Let me go ahead and copy from our source directory today, which for the students 759 00:29:51,170 --> 00:29:55,520 is available online, that large dictionary that we had from problem 760 00:29:55,520 --> 00:29:58,610 sets five wherein you loaded all of these words 761 00:29:58,610 --> 00:29:59,870 into a dictionary of your own. 762 00:29:59,870 --> 00:30:02,390 There was 140,000 some odd words here. 763 00:30:02,390 --> 00:30:04,640 I'm going to go ahead and create another file, though. 764 00:30:04,640 --> 00:30:05,807 This one called password.py. 765 00:30:05,807 --> 00:30:09,740 And recall from some of our building blocks over the past few weeks 766 00:30:09,740 --> 00:30:14,828 how easy it is to similarly manipulate words from a dictionary. 767 00:30:14,828 --> 00:30:16,870 Let me go ahead and again, initially import sleep 768 00:30:16,870 --> 00:30:18,500 just so that we can see this happening. 769 00:30:18,500 --> 00:30:20,450 I'm then going to say with open. 770 00:30:20,450 --> 00:30:22,610 Large in read mode. 771 00:30:22,610 --> 00:30:24,470 And I'm going to call this as file. 772 00:30:24,470 --> 00:30:28,640 And over here I'm going to go ahead and say now for word in. 773 00:30:28,640 --> 00:30:29,612 I want to say file. 774 00:30:29,612 --> 00:30:31,820 And we've not perhaps seen this one, but it turns out 775 00:30:31,820 --> 00:30:35,600 there's a really easy Python function where you can say file dot read lines. 776 00:30:35,600 --> 00:30:39,230 And it's just going to slurp in all of the 140,000 words from the file 777 00:30:39,230 --> 00:30:41,670 and allow you to iterate over them one at a time. 778 00:30:41,670 --> 00:30:45,330 And if I want to go ahead and print this out, I'll use print again, as before. 779 00:30:45,330 --> 00:30:47,330 And I'm going to go and claim that I'm checking, 780 00:30:47,330 --> 00:30:52,218 for instance, that word dot, dot, dot just as I claim to be checking a pin. 781 00:30:52,218 --> 00:30:53,760 Now again, I'm not checking anything. 782 00:30:53,760 --> 00:30:56,750 I'm just demonstrating that I could be checking this fast as by simply 783 00:30:56,750 --> 00:30:58,283 printing out these words instead. 784 00:30:58,283 --> 00:31:00,200 And I'm going to go ahead and as before, sleep 785 00:31:00,200 --> 00:31:02,420 for a tenth of a second on each iteration. 786 00:31:02,420 --> 00:31:06,290 But I'm also in anticipation going to call this function, which 787 00:31:06,290 --> 00:31:08,240 some students will recall is to strip off 788 00:31:08,240 --> 00:31:10,050 any whitespace at the end of the line. 789 00:31:10,050 --> 00:31:13,130 Recall that in large our big dictionary, there was a new line 790 00:31:13,130 --> 00:31:15,350 character at the end of every word. 791 00:31:15,350 --> 00:31:17,630 So this line of code will we'll get rid of this here. 792 00:31:17,630 --> 00:31:18,130 Yeah. 793 00:31:18,130 --> 00:31:19,165 Question over here. 794 00:31:19,165 --> 00:31:21,440 AUDIENCE: What's the significance of different colors? 795 00:31:21,440 --> 00:31:23,000 DAVID MALAN: What's the significance of the different colors? 796 00:31:23,000 --> 00:31:25,150 This is happening automatically in my text editor 797 00:31:25,150 --> 00:31:27,040 the program I'm using to write code. 798 00:31:27,040 --> 00:31:31,060 Each type of word or blocks of words that I type 799 00:31:31,060 --> 00:31:33,462 have a different semantic meaning to the computer. 800 00:31:33,462 --> 00:31:35,170 And so, the computer is highlighting them 801 00:31:35,170 --> 00:31:37,975 in that way to draw my attention to different types of words here. 802 00:31:37,975 --> 00:31:40,600 For instance, we have this preposition from that does something 803 00:31:40,600 --> 00:31:43,120 like load someone else's code. 804 00:31:43,120 --> 00:31:47,230 Time, though, and sleep are names of things that other humans have actually 805 00:31:47,230 --> 00:31:48,160 invented. 806 00:31:48,160 --> 00:31:52,000 So I'm going to go ahead now and run this as Python of password.py. 807 00:31:52,000 --> 00:31:54,255 We'll see, as the students will recall, all 808 00:31:54,255 --> 00:31:57,130 of the words in that dictionary starting with the A words, then the B 809 00:31:57,130 --> 00:31:59,920 words, then the C words, and so forth all the way down through F. 810 00:31:59,920 --> 00:32:01,960 Now, of course, I'm sleeping unnecessarily. 811 00:32:01,960 --> 00:32:06,520 But if during this demonstration you see your own password fly by the screen, 812 00:32:06,520 --> 00:32:10,570 it's not that hard for an adversary to be writing code like this 813 00:32:10,570 --> 00:32:12,700 and not just printing out the possible passwords, 814 00:32:12,700 --> 00:32:15,040 but trying to log into your account again and again 815 00:32:15,040 --> 00:32:18,100 and again until they gain access to the system. 816 00:32:18,100 --> 00:32:21,700 And in fact, if we deliberately speed this up, let's not bother sleeping. 817 00:32:21,700 --> 00:32:24,130 We'll get rid of all of the sleep related lines as before. 818 00:32:24,130 --> 00:32:25,420 Now, run this code. 819 00:32:25,420 --> 00:32:31,083 Now, I'm not even over at the board and it's already done 140,000 words. 820 00:32:31,083 --> 00:32:33,250 Which is to say if you're choosing a password that's 821 00:32:33,250 --> 00:32:36,400 just a word in the dictionary, whether it's English or some other language, 822 00:32:36,400 --> 00:32:37,400 you're not off the hook. 823 00:32:37,400 --> 00:32:40,120 You're not being so clever because anyone with a computer 824 00:32:40,120 --> 00:32:41,500 can check all of those codes. 825 00:32:41,500 --> 00:32:45,130 Now you might think, well, this is why someone had abc123. 826 00:32:45,130 --> 00:32:46,420 That's not in the dictionary. 827 00:32:46,420 --> 00:32:47,500 That's not just numbers. 828 00:32:47,500 --> 00:32:48,748 That's not just letters. 829 00:32:48,748 --> 00:32:49,290 But, come on. 830 00:32:49,290 --> 00:32:52,373 If you give me a few more minutes, I bet we could write a program together 831 00:32:52,373 --> 00:32:55,300 that starts with letters and ends with numbers or vise versa. 832 00:32:55,300 --> 00:32:57,212 We could try to concoct these patterns. 833 00:32:57,212 --> 00:32:59,170 And granted, it's going to get a little slower. 834 00:32:59,170 --> 00:33:01,270 A little slower, the more complicated it gets. 835 00:33:01,270 --> 00:33:01,930 But it can. 836 00:33:01,930 --> 00:33:05,710 The adversary, if the goal is to get your money, get your data, 837 00:33:05,710 --> 00:33:09,130 might have all the time in the world to actually wage that attack. 838 00:33:09,130 --> 00:33:12,850 And so, I would consider moving forward exactly what the implications are 839 00:33:12,850 --> 00:33:15,130 of putting your data in one place or another 840 00:33:15,130 --> 00:33:18,820 and not thinking to actually secure it because in the best case, 841 00:33:18,820 --> 00:33:21,220 someone nosily might end up getting in. 842 00:33:21,220 --> 00:33:24,340 At worst case, more than that, whether it's financial or personal, 843 00:33:24,340 --> 00:33:26,350 might be compromised. 844 00:33:26,350 --> 00:33:28,900 Well, what other forms does information come 845 00:33:28,900 --> 00:33:33,490 that might hint at potential threats for us too? 846 00:33:33,490 --> 00:33:36,502 Well you've all probably heard of cookies, when it comes to the web. 847 00:33:36,502 --> 00:33:39,460 And indeed, if you pursue our web track in a couple of weeks' time will 848 00:33:39,460 --> 00:33:41,590 you dive in deeper to what these things can do. 849 00:33:41,590 --> 00:33:43,570 But cookies are little pieces of information 850 00:33:43,570 --> 00:33:47,350 that websites plant on your Mac or PC or your phone anytime 851 00:33:47,350 --> 00:33:48,453 you visit the website. 852 00:33:48,453 --> 00:33:50,620 Now, that might seem a little creepy at first glance 853 00:33:50,620 --> 00:33:52,390 and it can be used for creepy purposes. 854 00:33:52,390 --> 00:33:55,780 Advertising and other such tracking applications among them. 855 00:33:55,780 --> 00:33:59,200 But this is actually a very useful primitive and computer science and web 856 00:33:59,200 --> 00:34:01,210 programming, in that if you have the ability 857 00:34:01,210 --> 00:34:03,940 to plant a little file on someone's computer, 858 00:34:03,940 --> 00:34:06,673 it's like the digital version of a hand stamp. 859 00:34:06,673 --> 00:34:08,590 You can remember that you've seen them before. 860 00:34:08,590 --> 00:34:11,007 And that's actually useful because when you log into Gmail 861 00:34:11,007 --> 00:34:13,659 or whatever email account you have, you don't really 862 00:34:13,659 --> 00:34:17,440 want to be typing in your username and password every time 863 00:34:17,440 --> 00:34:19,120 you look at a new message. 864 00:34:19,120 --> 00:34:21,159 Gmail or Google would be a little obnoxious 865 00:34:21,159 --> 00:34:22,780 if they kept asking you wait a minute, who are you? 866 00:34:22,780 --> 00:34:23,905 Wait a minute, who are you? 867 00:34:23,905 --> 00:34:26,920 These cookies are stored on your computer so that, unbeknownst to you, 868 00:34:26,920 --> 00:34:30,460 it's sent from you, the browser, to them, the server, 869 00:34:30,460 --> 00:34:34,201 to just remind them perpetually who you are because you've already logged in. 870 00:34:34,201 --> 00:34:35,409 And we can actually see this. 871 00:34:35,409 --> 00:34:38,440 Let me actually go over to my browser and you, too, 872 00:34:38,440 --> 00:34:41,350 might be in the habit of using Chrome just as I am here. 873 00:34:41,350 --> 00:34:47,050 And I can go in Chrome go to View, Developer, and go to Developer Tools. 874 00:34:47,050 --> 00:34:50,770 And you can do this, too, at home on your own Mac or PC. 875 00:34:50,770 --> 00:34:54,350 You can do this with Firefox, or Edge, or other browsers as well. 876 00:34:54,350 --> 00:34:57,048 And you'll see among the various things that just popped up 877 00:34:57,048 --> 00:34:58,340 are not terribly user friendly. 878 00:34:58,340 --> 00:35:01,210 This is really the domain of indeed developers or programmers. 879 00:35:01,210 --> 00:35:04,870 But I've clicked on this network tab here because on my own Mac or PC, 880 00:35:04,870 --> 00:35:09,400 if I visit some url like www.google.com and hit Enter, 881 00:35:09,400 --> 00:35:14,440 I can actually see inside of Chrome all of the requests my computer has just 882 00:35:14,440 --> 00:35:17,007 made over the internet from me to Google.com. 883 00:35:17,007 --> 00:35:19,840 And I'm going to go ahead and click on the very first of these here. 884 00:35:19,840 --> 00:35:22,632 And this, too, is going to look pretty arcane for today's purposes, 885 00:35:22,632 --> 00:35:26,050 but it's only meant to reveal what it is that's going on here. 886 00:35:26,050 --> 00:35:28,480 Let me scroll down, down, down, down, down. 887 00:35:28,480 --> 00:35:31,072 And you'll see a few things here request headers. 888 00:35:31,072 --> 00:35:34,030 These are little pieces of information that my Mac, and in term Chrome, 889 00:35:34,030 --> 00:35:37,540 just sent to Google.com com simply because I visited the website. 890 00:35:37,540 --> 00:35:40,400 And then if I scroll down here, we'll see response headers. 891 00:35:40,400 --> 00:35:44,680 This is what's coming back from Google.com to my own Mac or PC. 892 00:35:44,680 --> 00:35:47,180 And this is the line that's interesting. 893 00:35:47,180 --> 00:35:49,900 If you've ever heard about a cookie, all it 894 00:35:49,900 --> 00:35:53,380 means when I say a server is planting some information or a file 895 00:35:53,380 --> 00:35:55,720 on your computer, it's really just doing this. 896 00:35:55,720 --> 00:35:57,850 The response you're getting from Google.com 897 00:35:57,850 --> 00:36:02,883 simply says literally in English set dash cookie colon, and then some value. 898 00:36:02,883 --> 00:36:05,050 And to be fair, that value is pretty arcane looking. 899 00:36:05,050 --> 00:36:06,305 It looks a little weird. 900 00:36:06,305 --> 00:36:08,180 It apparently is going to expire in December. 901 00:36:08,180 --> 00:36:10,030 So I can infer from this that Google wants 902 00:36:10,030 --> 00:36:12,550 to be able to remember me at least for a couple 903 00:36:12,550 --> 00:36:14,380 more months to the end of the year. 904 00:36:14,380 --> 00:36:18,730 And this value here collectively would seem to be like a hand stamp 905 00:36:18,730 --> 00:36:21,590 they've put on my computer so that if I now proceed to do searches, 906 00:36:21,590 --> 00:36:25,220 if I proceed to log into Gmail, use Google Calendar, or the like, 907 00:36:25,220 --> 00:36:29,690 they know who I am or they know that it's me again and again. 908 00:36:29,690 --> 00:36:30,750 So what does this mean? 909 00:36:30,750 --> 00:36:33,290 This means that any website you visit can certainly 910 00:36:33,290 --> 00:36:36,140 be tracking what it is you're doing and where it is you're going. 911 00:36:36,140 --> 00:36:39,980 And because big companies like Google have advertising networks 912 00:36:39,980 --> 00:36:44,090 as part of their portfolio, if a website that's not Google.com 913 00:36:44,090 --> 00:36:47,600 is something else dot com, or something even else dot com, 914 00:36:47,600 --> 00:36:50,670 and they are using Google's advertising, well long story short, 915 00:36:50,670 --> 00:36:53,240 these cookies unfortunately are sent. 916 00:36:53,240 --> 00:36:58,160 These digital hand stamps are presented, not just to those individual websites, 917 00:36:58,160 --> 00:37:01,477 but also to Google again, and again, and again because they 918 00:37:01,477 --> 00:37:02,810 are the middleman in this story. 919 00:37:02,810 --> 00:37:07,040 The advertising network that's using ads on all of these different websites. 920 00:37:07,040 --> 00:37:12,740 So here a very fundamentally useful and compelling computer science principle 921 00:37:12,740 --> 00:37:15,440 can be used certainly for wonderfully useful applications, 922 00:37:15,440 --> 00:37:17,090 just remembering that I'm logged in. 923 00:37:17,090 --> 00:37:18,963 But also, if you don't think twice about it 924 00:37:18,963 --> 00:37:22,130 or if you want to make money off of it, can be used for these other purposes 925 00:37:22,130 --> 00:37:22,830 as well. 926 00:37:22,830 --> 00:37:24,622 Now we won't go down this rabbit hole today 927 00:37:24,622 --> 00:37:26,780 of well this is largely advertising what has helped 928 00:37:26,780 --> 00:37:28,280 make the internet become what it is. 929 00:37:28,280 --> 00:37:31,668 So there are trade certainly here, but that too has been thematic. 930 00:37:31,668 --> 00:37:33,710 But again, I would encourage you, as you discover 931 00:37:33,710 --> 00:37:37,340 more and more of these principles these things you can do through code, 932 00:37:37,340 --> 00:37:41,930 that you consider whether indeed you should be doing so as well. 933 00:37:41,930 --> 00:37:43,978 Well, what else might you do to mitigate this? 934 00:37:43,978 --> 00:37:46,270 Well some of you might be in the habit of using at work 935 00:37:46,270 --> 00:37:49,250 or at home incognito mode or private mode, which most browsers today 936 00:37:49,250 --> 00:37:49,970 support. 937 00:37:49,970 --> 00:37:51,620 Well what is that actually doing? 938 00:37:51,620 --> 00:37:53,328 Well, according to Google, it says Chrome 939 00:37:53,328 --> 00:37:56,162 won't save the following information, your browsing history, cookies 940 00:37:56,162 --> 00:37:58,890 and site data, information entered in forms, and so forth. 941 00:37:58,890 --> 00:38:00,320 Well, that means literally that. 942 00:38:00,320 --> 00:38:03,080 Even if Google or Facebook or some other website 943 00:38:03,080 --> 00:38:06,230 sends you a set cookie value saying please 944 00:38:06,230 --> 00:38:09,930 store this, Chrome, in this case, it's just going to throw it away. 945 00:38:09,930 --> 00:38:11,990 It's going to empty the cookie jar, so to speak, 946 00:38:11,990 --> 00:38:14,610 once you close that incognito window. 947 00:38:14,610 --> 00:38:17,900 However, your browser is still sending to Google or Facebook 948 00:38:17,900 --> 00:38:21,380 or whatever website you're visiting those values again, 949 00:38:21,380 --> 00:38:22,610 and again, and again. 950 00:38:22,610 --> 00:38:25,670 You're not private within that window, per se. 951 00:38:25,670 --> 00:38:28,250 You're only private within that window with respect 952 00:38:28,250 --> 00:38:30,110 to everything else you have opened. 953 00:38:30,110 --> 00:38:34,070 So for instance, if I go now here and go to View, Developer, and Developer 954 00:38:34,070 --> 00:38:34,990 Tools. 955 00:38:34,990 --> 00:38:37,190 And I have my network tab open again and I 956 00:38:37,190 --> 00:38:42,620 visit something like https://www.google.com and hit Enter, 957 00:38:42,620 --> 00:38:45,740 you'll see that Google is indeed still planting a cookie. 958 00:38:45,740 --> 00:38:48,650 This time, I got two cookies from Google on my computer. 959 00:38:48,650 --> 00:38:52,910 And those cookies will exist for as long as I have this incognito window open. 960 00:38:52,910 --> 00:38:54,980 So Google might be able to infer who I am 961 00:38:54,980 --> 00:38:57,823 or that I am the same person based on these cookies. 962 00:38:57,823 --> 00:38:59,240 But they know even more than that. 963 00:38:59,240 --> 00:39:02,180 If I scroll back down to where we began to these requests 964 00:39:02,180 --> 00:39:05,810 headers, the information my browser is sending to the server, 965 00:39:05,810 --> 00:39:09,020 you'll notice that among these values is something like this. 966 00:39:09,020 --> 00:39:10,640 This one, too, looks a little arcane. 967 00:39:10,640 --> 00:39:12,440 Let me go ahead and zoom in on it here. 968 00:39:12,440 --> 00:39:13,698 But it's called user agent. 969 00:39:13,698 --> 00:39:14,990 It's formatted in the same way. 970 00:39:14,990 --> 00:39:16,950 User dash agent colon. 971 00:39:16,950 --> 00:39:18,500 And then an arcane string here. 972 00:39:18,500 --> 00:39:22,070 But it looks like for whatever reason, my computer 973 00:39:22,070 --> 00:39:26,620 is telling Google without my even asking it to that I'm using a Mac, 974 00:39:26,620 --> 00:39:28,085 that I'm running Mac OS 10.14. 975 00:39:28,085 --> 00:39:29,243 6 at the moment. 976 00:39:29,243 --> 00:39:31,160 And if I keep scrolling, it's going to tell it 977 00:39:31,160 --> 00:39:33,920 further that this is a specific version of Google Chrome. 978 00:39:33,920 --> 00:39:37,670 And this is just some of the information that is leaked deliberately and often 979 00:39:37,670 --> 00:39:38,930 for good purposes. 980 00:39:38,930 --> 00:39:42,260 But these are the kinds of traces we all leave when we're using the internet. 981 00:39:42,260 --> 00:39:45,260 And we won't even go down this rabbit hole too, but all of our computers 982 00:39:45,260 --> 00:39:46,220 have unique addresses. 983 00:39:46,220 --> 00:39:48,350 You might have heard of things called IP addresses. 984 00:39:48,350 --> 00:39:51,230 You can't just get rid of those much like you can't just 985 00:39:51,230 --> 00:39:54,590 remove your postal address and expect mail to still arrival. 986 00:39:54,590 --> 00:39:58,340 All of us have unique addresses that are still being presented to these servers. 987 00:39:58,340 --> 00:40:01,640 And so, through computer science, through courses like this, 988 00:40:01,640 --> 00:40:04,850 and through reading up on these kinds of topics hereinafter realize 989 00:40:04,850 --> 00:40:09,230 that in understanding these primitives, these things like cookies 990 00:40:09,230 --> 00:40:11,390 and how they are set can you at least then, 991 00:40:11,390 --> 00:40:14,420 we hope, make a more informed decision as to whether to use them 992 00:40:14,420 --> 00:40:17,780 in that way or not or to visit websites in some way 993 00:40:17,780 --> 00:40:22,490 that you know to be using them for some purpose. 994 00:40:22,490 --> 00:40:26,390 Well what do we have besides this to perhaps worry about in the world? 995 00:40:26,390 --> 00:40:29,220 I daresay Snapchat is pretty popular these days. 996 00:40:29,220 --> 00:40:31,220 And of course, with Snapchat there's this notion 997 00:40:31,220 --> 00:40:35,000 that they popularized it being able to delete photos after 1 second or 10 998 00:40:35,000 --> 00:40:36,060 seconds or the like. 999 00:40:36,060 --> 00:40:39,350 And in fact, you all may recall from problems set four. 1000 00:40:39,350 --> 00:40:41,870 You implemented recover in a language called C 1001 00:40:41,870 --> 00:40:44,430 and you recovered photos that had been deleted. 1002 00:40:44,430 --> 00:40:48,740 So clearly already, deleted doesn't necessarily have to mean deleted. 1003 00:40:48,740 --> 00:40:51,560 And that's certainly the case even for third party services. 1004 00:40:51,560 --> 00:40:55,818 Now to be fair, we can only guess how it is Snapchat works underneath the hood. 1005 00:40:55,818 --> 00:40:58,610 They claim to be deleting your photos after some number of seconds, 1006 00:40:58,610 --> 00:41:01,070 but let's consider for a moment what that might actually 1007 00:41:01,070 --> 00:41:03,680 mean because it's our information we're putting out there, 1008 00:41:03,680 --> 00:41:05,107 in this case in pictorial form. 1009 00:41:05,107 --> 00:41:07,190 If you've never use Snapchat, when taking a photo, 1010 00:41:07,190 --> 00:41:09,690 you're able to see a screen like this and allow your message 1011 00:41:09,690 --> 00:41:12,800 to expire either never or infinitely many seconds from now, 1012 00:41:12,800 --> 00:41:14,690 or 1 to 10 seconds somewhere in between. 1013 00:41:14,690 --> 00:41:16,738 After which, the photo is deleted. 1014 00:41:16,738 --> 00:41:17,780 Well what does that mean? 1015 00:41:17,780 --> 00:41:21,340 In the context of last week, those of you with now background in SQL 1016 00:41:21,340 --> 00:41:24,190 might hope that what Snapchat is doing on their servers 1017 00:41:24,190 --> 00:41:25,830 is executing a query like this. 1018 00:41:25,830 --> 00:41:28,730 Delete from snaps where ID equals something. 1019 00:41:28,730 --> 00:41:32,170 And the question mark represents the idea of the snap you just sent, 1020 00:41:32,170 --> 00:41:34,240 the photograph that you just took. 1021 00:41:34,240 --> 00:41:35,710 But maybe they're doing that. 1022 00:41:35,710 --> 00:41:38,410 We, as outsiders as users, have no way to audit this. 1023 00:41:38,410 --> 00:41:39,948 We can only trust what they say. 1024 00:41:39,948 --> 00:41:42,240 What if they're instead just doing something like this? 1025 00:41:42,240 --> 00:41:45,400 Update snaps, set deleted equals true where 1026 00:41:45,400 --> 00:41:49,690 ID equals question mark, where that again is the identifier of your snap. 1027 00:41:49,690 --> 00:41:51,253 Now what is this representative of? 1028 00:41:51,253 --> 00:41:53,170 Well in the world of computer science, there's 1029 00:41:53,170 --> 00:41:55,720 this notion of hard deletion and soft deletion. 1030 00:41:55,720 --> 00:41:57,790 Hard delete means truly just delete the data, 1031 00:41:57,790 --> 00:42:01,510 like throw the bits away so that they really shouldn't be recoverable. 1032 00:42:01,510 --> 00:42:04,720 Soft delete is generally implemented like this, where you literally 1033 00:42:04,720 --> 00:42:09,430 change a 0 to a 1, a false to a true in your database to just remember oh 1034 00:42:09,430 --> 00:42:11,302 the user deleted this. 1035 00:42:11,302 --> 00:42:13,510 But that doesn't mean we have to throw the data away. 1036 00:42:13,510 --> 00:42:15,385 This might have value for marketing purposes, 1037 00:42:15,385 --> 00:42:17,718 for analytical purposes, business purposes, or the like. 1038 00:42:17,718 --> 00:42:19,593 So for all intents and purposes, it's deleted 1039 00:42:19,593 --> 00:42:22,510 because you the user can't get it back and no one else can see it. 1040 00:42:22,510 --> 00:42:26,260 But perhaps one or more employees at Snap can see that data. 1041 00:42:26,260 --> 00:42:28,090 And perhaps, that's the kind of data that's 1042 00:42:28,090 --> 00:42:30,310 at risk of being leaked out longer term. 1043 00:42:30,310 --> 00:42:33,357 And we've not even discussed things like backups, which too have upsides. 1044 00:42:33,357 --> 00:42:35,440 You don't want your data to get lost, but you also 1045 00:42:35,440 --> 00:42:40,120 don't want your data to get stuck on some backup in perpetuity as well. 1046 00:42:40,120 --> 00:42:43,090 So the lesson here we would propose is just consider. 1047 00:42:43,090 --> 00:42:45,760 Don't just trust what some tool or some application or developer 1048 00:42:45,760 --> 00:42:46,900 says something does. 1049 00:42:46,900 --> 00:42:50,350 Decide for yourself just how much weight to give those claims 1050 00:42:50,350 --> 00:42:53,620 and whether or not this kind of risk is worth taking photos 1051 00:42:53,620 --> 00:42:56,530 that you might regret, or wish to unsend because there really 1052 00:42:56,530 --> 00:43:02,020 is no notion of unsending, no matter what it is these applications 1053 00:43:02,020 --> 00:43:03,280 describe it as. 1054 00:43:03,280 --> 00:43:06,280 One last one that we saw just a couple of weeks ago. 1055 00:43:06,280 --> 00:43:09,410 Photo, the ability to tagged photos using artificial intelligence 1056 00:43:09,410 --> 00:43:12,190 and machine learning these days, or just simple pattern matching 1057 00:43:12,190 --> 00:43:15,400 was incredibly easy and a few lines of Python code to pick me out, 1058 00:43:15,400 --> 00:43:20,080 for instance, out of all of CS50 staff based on relatively little information. 1059 00:43:20,080 --> 00:43:22,120 This is enhanced, the closest thereof. 1060 00:43:22,120 --> 00:43:23,780 This is a fuzzy picture. 1061 00:43:23,780 --> 00:43:28,150 Didn't represent it really just by two eyes, a nose, 1062 00:43:28,150 --> 00:43:31,180 and a mouth that apparently resembles my particular face. 1063 00:43:31,180 --> 00:43:32,692 This was really easy to do. 1064 00:43:32,692 --> 00:43:35,650 And I don't have to tell you these days that if you're on social media, 1065 00:43:35,650 --> 00:43:38,800 all of us have probably been uploading or have had upload 1066 00:43:38,800 --> 00:43:42,190 on our behalf photographs of us that are then tagged 1067 00:43:42,190 --> 00:43:45,790 and we have for better or for worse been just telling the world what 1068 00:43:45,790 --> 00:43:48,010 we look like from all sorts of angles. 1069 00:43:48,010 --> 00:43:50,237 And here too, can the data perhaps be misused. 1070 00:43:50,237 --> 00:43:53,320 Yes, it's wonderfully useful when you upload an album because your friends 1071 00:43:53,320 --> 00:43:55,120 can see oh, that was a great night out. 1072 00:43:55,120 --> 00:43:57,170 We can now reminisce about those memories. 1073 00:43:57,170 --> 00:43:59,457 But someone else can be scraping all that data, 1074 00:43:59,457 --> 00:44:01,540 as we have read about having happened in the past. 1075 00:44:01,540 --> 00:44:04,275 And someone else might use that data to find you in a crowd 1076 00:44:04,275 --> 00:44:05,650 where you don't want to be found. 1077 00:44:05,650 --> 00:44:08,860 Or governments could do this too, based on driver's licenses 1078 00:44:08,860 --> 00:44:09,850 photos or the like. 1079 00:44:09,850 --> 00:44:12,460 Here, too, just because the software can do something 1080 00:44:12,460 --> 00:44:15,400 doesn't necessarily mean we should do that. 1081 00:44:15,400 --> 00:44:18,160 So we have all of these building blocks underneath our belts 1082 00:44:18,160 --> 00:44:19,795 now from week zero on through up eight. 1083 00:44:19,795 --> 00:44:21,712 We have a number of languages under our belts. 1084 00:44:21,712 --> 00:44:24,487 And for the final weeks of the class is the goal ultimately, 1085 00:44:24,487 --> 00:44:26,320 to take off the last of the training wheels. 1086 00:44:26,320 --> 00:44:29,278 In fact, the training wheels we literally took off just a few weeks ago 1087 00:44:29,278 --> 00:44:30,640 are sitting over there now. 1088 00:44:30,640 --> 00:44:33,040 And now, is there an opportunity for you in the weeks 1089 00:44:33,040 --> 00:44:36,130 ahead as the students in the room to decide on your follow on tracks. 1090 00:44:36,130 --> 00:44:38,080 All toward an end of CS50's final project. 1091 00:44:38,080 --> 00:44:40,540 And among the tracks, for instance, that are on the horizon 1092 00:44:40,540 --> 00:44:41,980 for your web programming. 1093 00:44:41,980 --> 00:44:44,110 This is taking primitives like we just saw there, 1094 00:44:44,110 --> 00:44:47,482 using JavaScript, HTML, CSS, plus some more Python and SQL 1095 00:44:47,482 --> 00:44:50,440 which you've seen over the past couple of weeks, to build applications. 1096 00:44:50,440 --> 00:44:53,170 This particular track will be led by CS50's own Brian. 1097 00:44:53,170 --> 00:44:56,230 And among the projects you'll tackle over the coming weeks 1098 00:44:56,230 --> 00:44:57,230 are something like this. 1099 00:44:57,230 --> 00:45:00,790 CS50 finance, so to speak, which is a web based application 1100 00:45:00,790 --> 00:45:05,050 via which you can buy quote unquote and sell quote unquote stocks using 1101 00:45:05,050 --> 00:45:09,220 real time data from an actual API, application programming interface, 1102 00:45:09,220 --> 00:45:12,160 to get the latest prices for stock symbols in the world. 1103 00:45:12,160 --> 00:45:15,310 So you and this track will build this application complete with the ability 1104 00:45:15,310 --> 00:45:19,720 to log in, to log out, to buy stocks, sell stocks, all using virtual dollars 1105 00:45:19,720 --> 00:45:23,890 and using a SQL database underneath the hood to keep track of that information. 1106 00:45:23,890 --> 00:45:27,460 If you pursue the mobile track instead, applying your past eight 1107 00:45:27,460 --> 00:45:30,970 weeks of skills and concepts to a domain familiar to you and the phone 1108 00:45:30,970 --> 00:45:34,720 you have in your own pocket can you explore programming on iOS 1109 00:45:34,720 --> 00:45:36,730 or iPhones with a language called Swift. 1110 00:45:36,730 --> 00:45:40,060 Or if you're an Android user exploring that domain instead, using a language 1111 00:45:40,060 --> 00:45:41,020 called Java. 1112 00:45:41,020 --> 00:45:44,680 In this track, you'll be led by CS50's own Tommy McWilliam, who will guide you 1113 00:45:44,680 --> 00:45:47,020 to a number of projects, one of which implementing 1114 00:45:47,020 --> 00:45:50,267 your own Pokemon decks, a sort of Rolodex for Pokemon characters, 1115 00:45:50,267 --> 00:45:52,600 including all of the native user interface elements that 1116 00:45:52,600 --> 00:45:54,790 come with both iOS and Android. 1117 00:45:54,790 --> 00:45:57,970 You'll be able to explore an Instagram like application reminiscent of some 1118 00:45:57,970 --> 00:46:00,160 of the filters that you did in problem set four. 1119 00:46:00,160 --> 00:46:04,240 But this one will be interactive and on your own device or in a simulator 1120 00:46:04,240 --> 00:46:08,380 much closer to the app, whether it's Instagram or Snapchat that you yourself 1121 00:46:08,380 --> 00:46:09,130 are familiar with. 1122 00:46:09,130 --> 00:46:11,713 And then lastly in this track will you implement your own note 1123 00:46:11,713 --> 00:46:12,610 taking application. 1124 00:46:12,610 --> 00:46:15,520 The ability to add and remove information to keep track of todo's, 1125 00:46:15,520 --> 00:46:19,820 whether it's a grocery list, class schedule, or something else altogether. 1126 00:46:19,820 --> 00:46:22,380 And then lastly, you have the choice of CS50's games track 1127 00:46:22,380 --> 00:46:23,970 using a language called Lua. 1128 00:46:23,970 --> 00:46:26,400 This is a language that facilitates implementing games 1129 00:46:26,400 --> 00:46:28,240 and many other applications as well. 1130 00:46:28,240 --> 00:46:30,240 And CS50's own Colton Ogden will introduce you 1131 00:46:30,240 --> 00:46:33,450 to a couple of applications, some of which our parents in the room 1132 00:46:33,450 --> 00:46:34,230 might recall. 1133 00:46:34,230 --> 00:46:37,140 This was one of the first games ever implemented on a computer, 1134 00:46:37,140 --> 00:46:37,710 for instance. 1135 00:46:37,710 --> 00:46:39,130 Not to date people in the room. 1136 00:46:39,130 --> 00:46:40,530 But this is a game called Pong. 1137 00:46:40,530 --> 00:46:42,660 And it's relatively simple mechanically. 1138 00:46:42,660 --> 00:46:46,450 You move these white paddles up, down, up, down, on the left and on the right. 1139 00:46:46,450 --> 00:46:49,990 And this little ball back in my day was represented with a pixel, if you will. 1140 00:46:49,990 --> 00:46:52,740 That ball is going to bounce back and forth against those paddles. 1141 00:46:52,740 --> 00:46:55,710 So you have to figure out exactly how to do the reflections 1142 00:46:55,710 --> 00:46:57,780 and how to implement that interface. 1143 00:46:57,780 --> 00:47:01,290 And then, as is consistent with the CS50's theme of beginning with Mario, 1144 00:47:01,290 --> 00:47:03,610 you can end the semester with Mario again, 1145 00:47:03,610 --> 00:47:07,230 implementing your own version of Super Mario Brothers, which is representative 1146 00:47:07,230 --> 00:47:11,040 of a two dimensional side scrolling game, so to speak, 1147 00:47:11,040 --> 00:47:14,920 implementing this on your own Mac or PC using your own computer. 1148 00:47:14,920 --> 00:47:19,140 Indeed, for each of these tracks do you no longer need to use CS50 IDE. 1149 00:47:19,140 --> 00:47:21,990 And while you're welcome to for at least the web track, 1150 00:47:21,990 --> 00:47:26,160 you can now use tools that are freely available and are the types of tools 1151 00:47:26,160 --> 00:47:28,530 you'll use after this course, in the real world. 1152 00:47:28,530 --> 00:47:32,228 The goal of the final few weeks of the class is indeed this final project. 1153 00:47:32,228 --> 00:47:34,020 The goal of which is to apply these lessons 1154 00:47:34,020 --> 00:47:36,240 learned now to a project of your own design. 1155 00:47:36,240 --> 00:47:39,030 In the coming weeks when you propose and then design, and then 1156 00:47:39,030 --> 00:47:43,200 implement your final project inspired perhaps by any of those tracks, 1157 00:47:43,200 --> 00:47:46,800 you'll be able, for instance, in the web track to download Python, the language, 1158 00:47:46,800 --> 00:47:49,740 and in turn, the interpreter, onto your own Mac or PC and use it. 1159 00:47:49,740 --> 00:47:51,960 You can use a popular tool like I used briefly today, 1160 00:47:51,960 --> 00:47:54,780 Visual Studio Code, which is a free and open source tool that's 1161 00:47:54,780 --> 00:47:57,600 gaining momentum in industry because it's relatively accessible 1162 00:47:57,600 --> 00:48:01,060 and has lots of features many more than CS50's own IDE. 1163 00:48:01,060 --> 00:48:03,750 Xcode, by contrast, is what you'll use if you're using a Mac 1164 00:48:03,750 --> 00:48:08,080 and developing an iOS project for your iPhone because of that 1165 00:48:08,080 --> 00:48:10,080 being the software that Apple provides for that. 1166 00:48:10,080 --> 00:48:12,780 Or in the worlds of Google's, Android Studio, 1167 00:48:12,780 --> 00:48:16,622 a free tool that you can use to build those Android applications as well. 1168 00:48:16,622 --> 00:48:18,330 But how are we going to get there and how 1169 00:48:18,330 --> 00:48:20,860 will we support you along the the way? 1170 00:48:20,860 --> 00:48:24,990 So there's this tradition in CS50 for the past decade of a CS50 hackathon. 1171 00:48:24,990 --> 00:48:29,130 This is an event that will begin at 7:00 PM sometime in December 1172 00:48:29,130 --> 00:48:31,440 and will end at 7 AM the next night. 1173 00:48:31,440 --> 00:48:34,140 But unlike most, for instance, all night affairs, 1174 00:48:34,140 --> 00:48:38,100 this one will be entirely focused on building something and creating 1175 00:48:38,100 --> 00:48:41,500 something alongside all of your classmates and all of your staff, 1176 00:48:41,500 --> 00:48:43,800 including some of our friends from Yale as well. 1177 00:48:43,800 --> 00:48:47,240 Upon arrival, we'll all CS50 staff greet you at the top of the stairs 1178 00:48:47,240 --> 00:48:49,260 where you check in, get settled for the night, 1179 00:48:49,260 --> 00:48:52,530 and ultimately spend those 12 hours working theoretically 1180 00:48:52,530 --> 00:48:54,450 on your final project. 1181 00:48:54,450 --> 00:48:56,940 Perhaps, even putting the finishing touches on it here. 1182 00:48:56,940 --> 00:49:00,630 One of the rooms from across the river where the event is held, this I think 1183 00:49:00,630 --> 00:49:03,300 is shortly after a bug was fixed later that night. 1184 00:49:03,300 --> 00:49:06,580 But along the way, there will be made several meal times as well. 1185 00:49:06,580 --> 00:49:10,530 We're in the habit of providing 100 of burritos from Philippe's around 9 PM. 1186 00:49:10,530 --> 00:49:13,410 Domino's kindly brings a few 100 pizzas around 1:00 AM. 1187 00:49:13,410 --> 00:49:15,780 And then, if you're still awake at 5:00 AM, 1188 00:49:15,780 --> 00:49:19,260 will some Harvard shuttles take us too. 1189 00:49:19,260 --> 00:49:21,850 And our therapy dog who will also be in attendance 1190 00:49:21,850 --> 00:49:26,240 will take us down the road to Ihop for pancakes at 5 AM 1191 00:49:26,240 --> 00:49:28,350 if you would like to join us there. 1192 00:49:28,350 --> 00:49:29,520 [LAUGHTER] 1193 00:49:29,520 --> 00:49:33,180 And after that is the final, the one final capstone to which everyone 1194 00:49:33,180 --> 00:49:35,310 in this room parents and families as well are 1195 00:49:35,310 --> 00:49:38,850 invited as are all faculty and staff across campus, is the CS50 fair. 1196 00:49:38,850 --> 00:49:42,960 A campus wide exhibition of all students final projects at which you'll 1197 00:49:42,960 --> 00:49:44,580 be to which you'll bring your laptop. 1198 00:49:44,580 --> 00:49:46,710 We'll have music, and popcorn, and candy, and friends, 1199 00:49:46,710 --> 00:49:47,760 and alumni from industry. 1200 00:49:47,760 --> 00:49:50,730 And it really is meant to be this exhibition of in celebration 1201 00:49:50,730 --> 00:49:54,580 of the final projects you by that point a month hence will have created. 1202 00:49:54,580 --> 00:49:57,300 Its at central Harvard Square in the Smith center 1203 00:49:57,300 --> 00:50:00,250 and will you be greeted by such visuals as these. 1204 00:50:00,250 --> 00:50:02,760 Our friends at Yale will be doing the same in parallel. 1205 00:50:02,760 --> 00:50:05,640 And it's just an opportunity to see what you and your friends 1206 00:50:05,640 --> 00:50:08,910 have done to invite them as well to see what you've accomplished this term. 1207 00:50:08,910 --> 00:50:11,100 And to ultimately share in the kinds of projects 1208 00:50:11,100 --> 00:50:14,392 that you've both created with a few passers by here, as well. 1209 00:50:14,392 --> 00:50:17,100 And here is where I wanted to thank the staff, not only those who 1210 00:50:17,100 --> 00:50:18,750 helped run the show in the room here. 1211 00:50:18,750 --> 00:50:22,470 But also a few of the course's heads, literally heads. 1212 00:50:22,470 --> 00:50:25,530 This here is CS50 staff here in Cambridge this past year. 1213 00:50:25,530 --> 00:50:29,250 All of our teaching fellows, course assistants, producers, and the like. 1214 00:50:29,250 --> 00:50:31,020 These are our team members at Yale, where 1215 00:50:31,020 --> 00:50:32,965 the course is indeed held in parallel. 1216 00:50:32,965 --> 00:50:35,340 And there is a few faces we wanted to call in particular. 1217 00:50:35,340 --> 00:50:38,610 Rodrigo, our head teaching fellow who sadly is graduating, but has 1218 00:50:38,610 --> 00:50:40,380 been with the course for so many years. 1219 00:50:40,380 --> 00:50:43,770 Emma, who is currently our head CA, will take over as head teaching fellow 1220 00:50:43,770 --> 00:50:44,670 this coming year. 1221 00:50:44,670 --> 00:50:46,680 And of course, Brian, many of whom you know 1222 00:50:46,680 --> 00:50:49,170 as the course's preceptor who himself holds 1223 00:50:49,170 --> 00:50:53,320 both of those roles over the past couple of years. 1224 00:50:53,320 --> 00:50:55,320 But this is where we'll end just as we began. 1225 00:50:55,320 --> 00:50:58,500 2/3 of you eight weeks ago had never taken CS before. 1226 00:50:58,500 --> 00:51:00,690 And when we surveyed you as to your comfort levels, 1227 00:51:00,690 --> 00:51:02,340 you might recall this breakdown. 1228 00:51:02,340 --> 00:51:05,820 That over some 49% percent of you described yourselves 1229 00:51:05,820 --> 00:51:09,210 as among those less comfortable just with the idea of taking, 1230 00:51:09,210 --> 00:51:12,480 shopping, let alone staying in the course like CS50. 1231 00:51:12,480 --> 00:51:15,150 16% of you described yourselves as more comfortable. 1232 00:51:15,150 --> 00:51:18,270 And 35% described yourselves as somewhere in between. 1233 00:51:18,270 --> 00:51:21,400 As you now embark on your final projects of your own choice, 1234 00:51:21,400 --> 00:51:26,110 I can officially decree that you are all now more comfortable. 1235 00:51:26,110 --> 00:51:28,270 This then, was just the beginning of your journey 1236 00:51:28,270 --> 00:51:30,220 toward the end of these final projects. 1237 00:51:30,220 --> 00:51:33,730 Thank you all, too, for coming today and for joining us this semester. 1238 00:51:33,730 --> 00:51:34,870 This was CS50. 1239 00:51:34,870 --> 00:51:36,720 [APPLAUSE] 1240 00:51:36,720 --> 00:51:38,000