1 00:00:00,000 --> 00:00:02,787 2 00:00:02,787 --> 00:00:03,870 DAVID J. MALAN: All right. 3 00:00:03,870 --> 00:00:07,860 So this is "CS50 Explained, Behind the Pedagogy," our first session 4 00:00:07,860 --> 00:00:10,290 of the workshop that's really meant to give you a sense, 5 00:00:10,290 --> 00:00:15,060 as teachers or prospective teachers, a sense of the why we for CS50 6 00:00:15,060 --> 00:00:17,820 do things the way we do, for better or for worse. 7 00:00:17,820 --> 00:00:21,090 Ultimately, the goal of this whole initiative for the past many years 8 00:00:21,090 --> 00:00:23,760 has been to really make available as OpenCourseWare 9 00:00:23,760 --> 00:00:25,890 curricular materials that teachers like yourselves 10 00:00:25,890 --> 00:00:29,340 are welcome to adopt or adapt in any way you see fit. 11 00:00:29,340 --> 00:00:32,490 Indeed, typically, what we found is that if teachers are wanting 12 00:00:32,490 --> 00:00:36,330 to teach introductory computer science or programming or AP Computer Science 13 00:00:36,330 --> 00:00:39,630 principles or any number of variants thereof, they might, 14 00:00:39,630 --> 00:00:42,210 in their first year, especially if new to teaching itself, 15 00:00:42,210 --> 00:00:45,630 might want to adopt some of the course's or all of the course's curriculum 16 00:00:45,630 --> 00:00:49,050 in some way and really serve the role more of a teaching assistant, 17 00:00:49,050 --> 00:00:52,710 leaning on us and our videos and our homework assignments, a.k.a. 18 00:00:52,710 --> 00:00:56,130 problem sets, while they walk around focusing their most precious time, 19 00:00:56,130 --> 00:00:57,713 the human time, on their own students. 20 00:00:57,713 --> 00:00:59,588 And then, perhaps, as they get their footing, 21 00:00:59,588 --> 00:01:01,350 or if you've been teaching for many years, 22 00:01:01,350 --> 00:01:04,132 you might instead pursue more of a model of adapting the course, 23 00:01:04,132 --> 00:01:06,840 like any good teacher might when seeing someone else's materials, 24 00:01:06,840 --> 00:01:10,350 and make it your own and integrate it into your own classes as you see fit. 25 00:01:10,350 --> 00:01:12,870 What I thought we'd do, then, this morning here in Cambridge 26 00:01:12,870 --> 00:01:16,740 is just give you a sense, then, of the why behind the course's pedagogy 27 00:01:16,740 --> 00:01:18,750 and also just give you a few building blocks 28 00:01:18,750 --> 00:01:22,230 if you're only somewhat familiar with CS50 and its offerings, 29 00:01:22,230 --> 00:01:26,520 or perhaps familiar only from the perspective of being a student of sorts 30 00:01:26,520 --> 00:01:28,200 yourself, having taken the class. 31 00:01:28,200 --> 00:01:30,270 Along the way, please feel free to interject 32 00:01:30,270 --> 00:01:33,900 with any questions via the chat that I or any of my colleagues 33 00:01:33,900 --> 00:01:34,650 here can answer. 34 00:01:34,650 --> 00:01:36,990 Or if you'd like to raise a virtual hand in Zoom, 35 00:01:36,990 --> 00:01:38,950 we'll do our best to keep things interactive. 36 00:01:38,950 --> 00:01:41,640 And then we'll take and leave time for a good break at the end 37 00:01:41,640 --> 00:01:44,590 and then resume with our second session thereafter. 38 00:01:44,590 --> 00:01:48,510 So a cursory glance at the history behind this class, 39 00:01:48,510 --> 00:01:52,680 if only to give you a sense of why it combines the topics it does-- here 40 00:01:52,680 --> 00:01:54,810 at Harvard, for the past many years, there 41 00:01:54,810 --> 00:01:59,550 was this branch of courses starting with Engineering Sciences 100, Applied 42 00:01:59,550 --> 00:02:03,480 Mathematics 110, and then, finally, Computer Science 150, 43 00:02:03,480 --> 00:02:06,420 when computer science finally became a term, 44 00:02:06,420 --> 00:02:08,530 academically, that described a whole field. 45 00:02:08,530 --> 00:02:11,730 But this was an evolution of a particularly arcane set of classes, 46 00:02:11,730 --> 00:02:13,770 if you will, particularly for those who wanted 47 00:02:13,770 --> 00:02:15,897 to pursue what originally was called engineering, 48 00:02:15,897 --> 00:02:18,480 was eventually called applied mathematics, and now, of course, 49 00:02:18,480 --> 00:02:19,680 is called computer science. 50 00:02:19,680 --> 00:02:23,550 But it was fairly technical for the particularly initiated-- the already 51 00:02:23,550 --> 00:02:24,420 initiated. 52 00:02:24,420 --> 00:02:26,400 Then, at Harvard, too, some years ago, there 53 00:02:26,400 --> 00:02:28,450 was a different branch of courses, if you will, 54 00:02:28,450 --> 00:02:30,600 starting with a well-known course here on campus 55 00:02:30,600 --> 00:02:34,740 called Nat Sci 110, Natural Sciences 110, which eventually evolved 56 00:02:34,740 --> 00:02:37,230 into a course called Applied Sciences 10, 57 00:02:37,230 --> 00:02:39,870 and then eventually Quantitative Reasoning 20. 58 00:02:39,870 --> 00:02:44,400 And this was more of a path for the uninitiated, those less comfortable, 59 00:02:44,400 --> 00:02:47,860 who wanted to know something about computing and programming, ultimately, 60 00:02:47,860 --> 00:02:50,610 but didn't necessarily think they were going to major in the same. 61 00:02:50,610 --> 00:02:52,980 And then, eventually, Harvard, as a university, 62 00:02:52,980 --> 00:02:55,650 rather started to merge these two tracks in a sense. 63 00:02:55,650 --> 00:02:59,640 And we had Applied Sciences 11, Computer Science 11, and now 64 00:02:59,640 --> 00:03:03,060 what we're here today to talk about, a course known as CS50. 65 00:03:03,060 --> 00:03:07,200 And that all began back in 1989, which was the first year of CS50 66 00:03:07,200 --> 00:03:08,460 being offered here on campus. 67 00:03:08,460 --> 00:03:12,420 And it was and is our introduction to computer science and programming 68 00:03:12,420 --> 00:03:15,060 but now for majors and nonmajors. 69 00:03:15,060 --> 00:03:16,950 And that's perhaps the key characteristic 70 00:03:16,950 --> 00:03:19,980 in that it does try to serve both of those audiences. 71 00:03:19,980 --> 00:03:23,700 And you'll see today and tomorrow via what curricular means and pedagogical 72 00:03:23,700 --> 00:03:25,890 means we aspire to do so. 73 00:03:25,890 --> 00:03:29,250 As it turns out, I myself happened to be an undergrad here some years ago, 74 00:03:29,250 --> 00:03:32,910 and in 1996, as a sophomore, took this same class. 75 00:03:32,910 --> 00:03:35,040 As I tell students at the start of our own course, 76 00:03:35,040 --> 00:03:37,140 I was a government major at the time. 77 00:03:37,140 --> 00:03:40,740 I had gravitated from the get-go at college toward the familiar. 78 00:03:40,740 --> 00:03:43,445 I rather liked history and constitutional law, especially 79 00:03:43,445 --> 00:03:44,070 in high school. 80 00:03:44,070 --> 00:03:46,068 And so I figured, well, you major in college 81 00:03:46,068 --> 00:03:47,610 what you seem to like in high school. 82 00:03:47,610 --> 00:03:51,270 But it wasn't until sophomore year that I got up the nerve, the courage 83 00:03:51,270 --> 00:03:56,790 to just put my toes in the water and to step in on the first class of CS50 84 00:03:56,790 --> 00:03:58,860 in September of 1996. 85 00:03:58,860 --> 00:04:00,600 And, long story short, I was hooked. 86 00:04:00,600 --> 00:04:03,330 As I tell students today it was the first course, 87 00:04:03,330 --> 00:04:05,310 and really, the first field where-- 88 00:04:05,310 --> 00:04:07,620 not to sound too cliche-- but homework was fun. 89 00:04:07,620 --> 00:04:11,550 I had somehow gone 19 years of being a good student, focusing on my work, 90 00:04:11,550 --> 00:04:15,090 but not particularly describing school or homework as fun. 91 00:04:15,090 --> 00:04:18,810 But when I discovered computer science, and particularly programming for me 92 00:04:18,810 --> 00:04:20,459 early on, something clicked. 93 00:04:20,459 --> 00:04:23,457 And as I tell students, I would go back to my dorm at, like, 94 00:04:23,457 --> 00:04:26,790 7:00 PM on a Friday night, which is when they would officially post the homework 95 00:04:26,790 --> 00:04:30,120 assignments, and that's how I would spend my Friday night well 96 00:04:30,120 --> 00:04:30,870 into Saturday. 97 00:04:30,870 --> 00:04:32,160 And, for me, that was a sign-- 98 00:04:32,160 --> 00:04:34,050 changed my major to computer science. 99 00:04:34,050 --> 00:04:36,990 And, ultimately, that's what motivated now, really, 100 00:04:36,990 --> 00:04:40,260 a lot of my interest in, daresay passion for trying 101 00:04:40,260 --> 00:04:42,930 to create, whether it's in computer science 102 00:04:42,930 --> 00:04:45,690 or any other field for students, that sort of discovery 103 00:04:45,690 --> 00:04:49,680 and that encouragement to explore outside one's own comfort zone. 104 00:04:49,680 --> 00:04:52,770 So fast-forward several years later, after finishing college and then 105 00:04:52,770 --> 00:04:54,418 graduate school in 2007. 106 00:04:54,418 --> 00:04:56,460 I was rather in the right place at the right time 107 00:04:56,460 --> 00:05:00,460 and had an opportunity to take the helm of this same course as its instructor. 108 00:05:00,460 --> 00:05:03,997 I was meant to fill in for just a year, after which the course would 109 00:05:03,997 --> 00:05:05,080 be taught by someone else. 110 00:05:05,080 --> 00:05:08,570 And somehow or other, that was, like, coming up on 16 years ago. 111 00:05:08,570 --> 00:05:12,310 And so this will be version 16 of the course since 2007. 112 00:05:12,310 --> 00:05:16,150 And nowadays, in healthy times, it's indeed one of Harvard's largest courses 113 00:05:16,150 --> 00:05:17,200 here on campus. 114 00:05:17,200 --> 00:05:20,170 So this is a photograph of one of the most beautiful spaces here 115 00:05:20,170 --> 00:05:23,800 on campus, Sanders Theatre, so to speak, with a whole lot of students back 116 00:05:23,800 --> 00:05:27,680 in healthy times and me down here about to talk about computer science. 117 00:05:27,680 --> 00:05:31,940 And we hope, of course, to return to that kind of norm this year and beyond. 118 00:05:31,940 --> 00:05:34,960 But that is to say there's been a marked increase in interest here, 119 00:05:34,960 --> 00:05:38,150 and certainly elsewhere in the world, in computer science and programming. 120 00:05:38,150 --> 00:05:40,030 And so, really, what we'll focus on today 121 00:05:40,030 --> 00:05:41,860 is the support structure and the pedagogy 122 00:05:41,860 --> 00:05:44,980 that we've tried to build up over time. 123 00:05:44,980 --> 00:05:48,700 The course, as I alluded to earlier, has, since 2007, also 124 00:05:48,700 --> 00:05:53,170 been freely available as OpenCourseWare under what's called a Creative Commons 125 00:05:53,170 --> 00:05:58,750 license by NCSA, which means that anyone is welcome to use the material as they 126 00:05:58,750 --> 00:06:01,810 see fit so long as they attribute it by CS50, 127 00:06:01,810 --> 00:06:04,060 so as long as it's for noncommercial use, 128 00:06:04,060 --> 00:06:08,830 and so long as they, too, share their materials, be it videos or PDFs 129 00:06:08,830 --> 00:06:10,390 or adaptations thereof. 130 00:06:10,390 --> 00:06:12,940 For more details, Carter, if you wouldn't mind pasting a URL 131 00:06:12,940 --> 00:06:14,320 like this in the chat. 132 00:06:14,320 --> 00:06:18,580 Now, in 2012, it's worth noting that we had an opportunity 133 00:06:18,580 --> 00:06:22,120 to not just put material out there in the spirit of OpenCourseWare. 134 00:06:22,120 --> 00:06:25,420 But 2012 was when this MOOC craze-- 135 00:06:25,420 --> 00:06:28,960 Massive Open Online Courses, rather-- begun with Coursera, 136 00:06:28,960 --> 00:06:31,220 then edX, and a few others as well. 137 00:06:31,220 --> 00:06:34,490 And this was an opportunity for us now to focus not just, of course, 138 00:06:34,490 --> 00:06:37,540 on our own campus, on campus students, but, really, anyone 139 00:06:37,540 --> 00:06:40,840 online who might like to learn but learn as actively as possible. 140 00:06:40,840 --> 00:06:44,290 For many years, we had put our videos, our PDFs, the assignments, 141 00:06:44,290 --> 00:06:45,740 and so forth on the internet. 142 00:06:45,740 --> 00:06:48,610 But if a student on elsewhere in the world online 143 00:06:48,610 --> 00:06:52,840 didn't have a Harvard University login account to connect to some Linux 144 00:06:52,840 --> 00:06:55,780 or Unix server here on campus, the onus was on them 145 00:06:55,780 --> 00:07:00,070 to figure out how to install a compiler, an interpreter, or a debugger 146 00:07:00,070 --> 00:07:05,650 on their own Mac or PC-- doable, but not necessarily doable by many students who 147 00:07:05,650 --> 00:07:08,897 don't yet have that footing and might otherwise struggle with "hello, world," 148 00:07:08,897 --> 00:07:11,230 let alone just trying to configure things like your path 149 00:07:11,230 --> 00:07:12,830 and your terminal window and the like. 150 00:07:12,830 --> 00:07:16,270 And so we began to focus in 2012, too, on really making 151 00:07:16,270 --> 00:07:19,750 tooling and software available for students and teachers 152 00:07:19,750 --> 00:07:22,190 alike to eliminate a lot of that complexity 153 00:07:22,190 --> 00:07:24,190 so that they could focus truly on the curriculum 154 00:07:24,190 --> 00:07:28,660 and less so on the mechanics of just getting requisite software set up. 155 00:07:28,660 --> 00:07:32,350 And so thus was born what we now call CS50x, which is essentially 156 00:07:32,350 --> 00:07:36,250 the OpenCourseWare version of the class, typically targeted 157 00:07:36,250 --> 00:07:38,440 at university or older students. 158 00:07:38,440 --> 00:07:41,800 But it is exactly the same curriculum technologically 159 00:07:41,800 --> 00:07:44,860 and curricularly as the course here on campus. 160 00:07:44,860 --> 00:07:46,660 Students, of course, on campus have access 161 00:07:46,660 --> 00:07:50,740 to additional support structures, like human teaching assistants or TAs, 162 00:07:50,740 --> 00:07:52,870 as you might find in universities typically. 163 00:07:52,870 --> 00:07:55,960 But otherwise-- curricularly, technologically-- everything 164 00:07:55,960 --> 00:07:57,422 is exactly the same. 165 00:07:57,422 --> 00:08:00,130 And Carter has kindly pasted this, and Carter, if you don't mind, 166 00:08:00,130 --> 00:08:02,800 some of our upcoming URLs as well. 167 00:08:02,800 --> 00:08:07,600 CS50 has generally steered in the direction of existing online platforms 168 00:08:07,600 --> 00:08:08,960 for bringing people together. 169 00:08:08,960 --> 00:08:10,930 And so if you go to this URL here, you'll 170 00:08:10,930 --> 00:08:13,510 see any number of CS50's online communities-- 171 00:08:13,510 --> 00:08:17,080 Facebook and Reddit and Stack Overflow and Discord and the like-- 172 00:08:17,080 --> 00:08:20,380 where we've rather tried to bring the course to the students to decrease, 173 00:08:20,380 --> 00:08:22,490 rather, the transaction distance, so to speak, 174 00:08:22,490 --> 00:08:25,780 between them and asking and answering questions as opposed 175 00:08:25,780 --> 00:08:28,930 to focusing on walled gardens or proprietary tools that 176 00:08:28,930 --> 00:08:32,049 might require the activation energy to come into the course. 177 00:08:32,049 --> 00:08:34,120 Rather, we've tried to bring folks to it. 178 00:08:34,120 --> 00:08:38,210 And we've also tried to focus, in recent years since 2012, again, 179 00:08:38,210 --> 00:08:41,830 not just in putting curricular materials out there for folks to use, 180 00:08:41,830 --> 00:08:46,390 but trying to incubate, encourage, foster, really, in-person communities. 181 00:08:46,390 --> 00:08:48,970 182 00:08:48,970 --> 00:08:52,870 The real opportunity at hand, whether with teachers formally in place 183 00:08:52,870 --> 00:08:54,790 or just students who want to learn together, 184 00:08:54,790 --> 00:08:56,710 is to try to bring them together as humans. 185 00:08:56,710 --> 00:08:58,660 And Zoom and other technologies have certainly 186 00:08:58,660 --> 00:09:00,430 accelerated this trend online. 187 00:09:00,430 --> 00:09:03,850 But we have also focused, in healthier times, and hopefully, this coming year 188 00:09:03,850 --> 00:09:07,450 and beyond, on helping incubate in-person communities, be it 189 00:09:07,450 --> 00:09:10,330 at high schools, middle schools, universities, nonprofits, 190 00:09:10,330 --> 00:09:12,080 community groups, or the like. 191 00:09:12,080 --> 00:09:16,180 And so just to paint a picture of some of your predecessors, if you will, 192 00:09:16,180 --> 00:09:19,840 or perhaps some of you here, here is one of our groups 193 00:09:19,840 --> 00:09:22,000 in healthier times at Miami-Dade College, 194 00:09:22,000 --> 00:09:24,490 led by one of our faculty member friends there. 195 00:09:24,490 --> 00:09:28,060 And these are students holding proudly their CS50 certificates, so to speak, 196 00:09:28,060 --> 00:09:29,050 at term's end. 197 00:09:29,050 --> 00:09:31,360 Here are some students in healthier times from London, 198 00:09:31,360 --> 00:09:34,840 when we held, with University College London, a so-called CS50 199 00:09:34,840 --> 00:09:36,670 hackathon that drew people together to work 200 00:09:36,670 --> 00:09:39,100 on their code and their final projects. 201 00:09:39,100 --> 00:09:43,150 Here are some of our students in India working on something called CS50x 202 00:09:43,150 --> 00:09:47,080 Puzzle Day-- more on that in a bit-- bringing students together as well. 203 00:09:47,080 --> 00:09:49,600 Here in Myanmar was a student who actually 204 00:09:49,600 --> 00:09:54,940 organized this many of his classmates to teach CS50 or introductory programming 205 00:09:54,940 --> 00:09:57,220 more generally to some of his own classmates. 206 00:09:57,220 --> 00:10:01,950 Here, after a CS50x Puzzle Day, are students in Pakistan. 207 00:10:01,950 --> 00:10:04,380 Here are students after the same in Egypt. 208 00:10:04,380 --> 00:10:06,810 Here are some of our students before the same in Congo 209 00:10:06,810 --> 00:10:08,822 about to tackle these printouts of puzzles. 210 00:10:08,822 --> 00:10:10,530 And here are some of our friends who have 211 00:10:10,530 --> 00:10:14,330 been especially in our thoughts in recent months in Ukraine as well. 212 00:10:14,330 --> 00:10:16,080 And these are just some of the communities 213 00:10:16,080 --> 00:10:17,770 that have been incubated over time. 214 00:10:17,770 --> 00:10:20,603 But this has, I think, been a very deliberate charge on our part 215 00:10:20,603 --> 00:10:22,770 not to just put curricular materials out there, but, 216 00:10:22,770 --> 00:10:27,630 again, to try to bring people, teachers, and students alike 217 00:10:27,630 --> 00:10:31,680 together in the form of these more traditional in-person support 218 00:10:31,680 --> 00:10:32,580 structures. 219 00:10:32,580 --> 00:10:35,850 You've heard me allude now to CS50 AP, which 220 00:10:35,850 --> 00:10:39,060 is a bit of a deliberate misnomer in that it isn't necessarily 221 00:10:39,060 --> 00:10:41,880 an AP or advanced placement version of the course, 222 00:10:41,880 --> 00:10:45,660 but really an adaptation designed for high schools and middle schools alike. 223 00:10:45,660 --> 00:10:49,673 Its release coincided with the creation of AP Computer Science 224 00:10:49,673 --> 00:10:51,840 Principles, with which some of you might be familiar 225 00:10:51,840 --> 00:10:54,150 here in the US or also abroad. 226 00:10:54,150 --> 00:10:56,700 And CS50 is one of the endorsed curriculum 227 00:10:56,700 --> 00:10:58,710 providers of that same framework. 228 00:10:58,710 --> 00:11:01,830 But CS50 AP, when we say it, really just refers 229 00:11:01,830 --> 00:11:04,680 to a high school or middle school, a younger audience 230 00:11:04,680 --> 00:11:09,082 adaptation of the same course that also happens to satisfy those requirements. 231 00:11:09,082 --> 00:11:11,040 But it's an offering typically that is designed 232 00:11:11,040 --> 00:11:15,840 to be spread over not maybe 12 or 16 weeks in a typical US semester, 233 00:11:15,840 --> 00:11:22,300 but maybe 32 or 36 weeks over a typical US school year. 234 00:11:22,300 --> 00:11:26,190 With that said, at its inception, CS50 AP here, which has, 235 00:11:26,190 --> 00:11:30,190 again, the same curricular materials as CS50x itself. 236 00:11:30,190 --> 00:11:33,660 Here's an early snapshot of all of the high schools 237 00:11:33,660 --> 00:11:37,110 and universities and others that were working with us at the course's debut. 238 00:11:37,110 --> 00:11:39,720 Every circle in red represents a high school 239 00:11:39,720 --> 00:11:41,220 with which we've worked in the past. 240 00:11:41,220 --> 00:11:43,110 Every blue represents a university. 241 00:11:43,110 --> 00:11:44,820 This now is several years old. 242 00:11:44,820 --> 00:11:46,830 But this, too, was an opportunity for us to try 243 00:11:46,830 --> 00:11:48,660 to bring people together as well. 244 00:11:48,660 --> 00:11:52,960 And I wish you and I were literally on that same stage right now. 245 00:11:52,960 --> 00:11:55,560 This is a photograph of one of our earliest cohorts 246 00:11:55,560 --> 00:11:59,940 of teachers at our very first CS50 educator workshop here at Harvard. 247 00:11:59,940 --> 00:12:02,800 Hopefully, health circumstances permitting, 248 00:12:02,800 --> 00:12:06,782 we'll be able to hold this same workshop both in person and online next year. 249 00:12:06,782 --> 00:12:09,240 But these are some of our teachers with whom we got to meet 250 00:12:09,240 --> 00:12:13,200 and the original network of teachers that began via this whole initiative 251 00:12:13,200 --> 00:12:13,770 as well. 252 00:12:13,770 --> 00:12:16,800 And in healthier times, too, did we focus on the students as well. 253 00:12:16,800 --> 00:12:18,930 Margaret, whom you met earlier, kindly helped 254 00:12:18,930 --> 00:12:23,250 us coordinate with a few other teachers in New York, public and private, 255 00:12:23,250 --> 00:12:24,840 a CS50 hackathon. 256 00:12:24,840 --> 00:12:28,530 Unlike our university hackathon, which tends to start at 7:00 PM 257 00:12:28,530 --> 00:12:33,100 and end at 7:00 AM the next day, this was our first 10:00 AM 258 00:12:33,100 --> 00:12:36,035 to 2:00 PM CS50 hackathon-- a little more high school 259 00:12:36,035 --> 00:12:38,910 and teacher and parent-friendly-- that just brought students together 260 00:12:38,910 --> 00:12:42,420 from five different schools in the area to work on their problem sets, 261 00:12:42,420 --> 00:12:48,300 to attend some stand-up workshops and the like, and generally just have fun 262 00:12:48,300 --> 00:12:51,240 learning and asking questions and solving problems, 263 00:12:51,240 --> 00:12:55,120 all within this domain here of computer science. 264 00:12:55,120 --> 00:12:58,720 So at the risk of overwhelming, just to give you the lay of the land, 265 00:12:58,720 --> 00:13:01,290 but the whole goal of today and tomorrow is to just give you 266 00:13:01,290 --> 00:13:03,430 a sense of what is available to you. 267 00:13:03,430 --> 00:13:06,185 It is not the sort of menu via which you must choose 268 00:13:06,185 --> 00:13:07,560 a little something of everything. 269 00:13:07,560 --> 00:13:11,220 But just to give you a sense of what now exists, one of the FAQs 270 00:13:11,220 --> 00:13:15,750 we began to receive shortly after the course launched in 2015, especially 271 00:13:15,750 --> 00:13:18,630 in the form of AP for high schools and middle schools, 272 00:13:18,630 --> 00:13:23,100 was, OK, I've taught this course now to my first-years or sophomores or maybe 273 00:13:23,100 --> 00:13:23,880 seniors. 274 00:13:23,880 --> 00:13:26,650 What now, at least for those younger students? 275 00:13:26,650 --> 00:13:30,960 And so in recent years have I and some of our colleagues here at Harvard 276 00:13:30,960 --> 00:13:35,430 began focusing on other curricular offerings as well, 277 00:13:35,430 --> 00:13:37,380 all under the CS50 umbrella. 278 00:13:37,380 --> 00:13:40,140 And so while you've had the whirlwind tour of the history, where 279 00:13:40,140 --> 00:13:45,060 CS50 was the course that existed as of 1989 and ever since, now 280 00:13:45,060 --> 00:13:48,600 we use that same moniker with suffixes to describe other curricular 281 00:13:48,600 --> 00:13:52,710 offerings that assume either as background CS50 itself 282 00:13:52,710 --> 00:13:56,740 or assume as a next step CS50 itself. 283 00:13:56,740 --> 00:13:59,940 So here is the current list of all curricular offerings-- 284 00:13:59,940 --> 00:14:03,420 CS50x, which, again, is the online university and adult 285 00:14:03,420 --> 00:14:07,107 offering of the same; CS50 AP, which is that for younger audiences. 286 00:14:07,107 --> 00:14:08,940 But thanks to some of our amazing colleagues 287 00:14:08,940 --> 00:14:13,020 here do we now have CS50AI, which is an introduction to artificial intelligence 288 00:14:13,020 --> 00:14:14,940 with Python specifically. 289 00:14:14,940 --> 00:14:18,750 It's indeed more software-centric than it is mathematically-oriented. 290 00:14:18,750 --> 00:14:21,810 It introduces students to any requisite mathematics they need, 291 00:14:21,810 --> 00:14:25,320 but it's not a theory course as much as it is a software course. 292 00:14:25,320 --> 00:14:29,475 CS50B is computer science for business professionals, something 293 00:14:29,475 --> 00:14:31,350 for students in management school or the like 294 00:14:31,350 --> 00:14:35,550 who just are interested not so much in the lower-level implementation details, 295 00:14:35,550 --> 00:14:38,550 but rather how you can leverage technology in business 296 00:14:38,550 --> 00:14:40,890 or just make more informed decisions. 297 00:14:40,890 --> 00:14:43,500 CS50G, introduction to gaming development 298 00:14:43,500 --> 00:14:47,040 that uses a language called Lua that allows students on their own Macs 299 00:14:47,040 --> 00:14:49,860 or PCs to create their own two-dimensional, and then, later 300 00:14:49,860 --> 00:14:53,670 in the course via Unity, three-dimensional games as well. 301 00:14:53,670 --> 00:14:56,310 CS50L for lawyers-- computer science. 302 00:14:56,310 --> 00:14:59,520 This is similar to B but targeted specifically 303 00:14:59,520 --> 00:15:03,330 at the legally-minded folks out there, paralegals and the like, 304 00:15:03,330 --> 00:15:05,670 who want to explore the intersection of computing 305 00:15:05,670 --> 00:15:09,490 with law in particular-- issues of security and privacy, 306 00:15:09,490 --> 00:15:11,100 intellectual property, and the like. 307 00:15:11,100 --> 00:15:13,770 There's a similar backbone among many of these courses. 308 00:15:13,770 --> 00:15:15,930 But their focus tends, then, to vary. 309 00:15:15,930 --> 00:15:20,880 CS50P, which is hot off the press, so to speak-- an introduction to Programming 310 00:15:20,880 --> 00:15:22,650 with Python specifically. 311 00:15:22,650 --> 00:15:27,090 We go all the more into detail on the syntax of Python, the features thereof. 312 00:15:27,090 --> 00:15:33,570 We stop short of any topics that really are, and daresay belong in CS50, a.k.a. 313 00:15:33,570 --> 00:15:38,860 CS50x or CS50 AP, which is a proper introduction to computer science. 314 00:15:38,860 --> 00:15:41,250 So while we might take for granted in CS50P 315 00:15:41,250 --> 00:15:45,220 that there's a function that sorts for you, it's in the original course, 316 00:15:45,220 --> 00:15:50,280 CS50 itself, that we actually pull the lid off of sorting and searching 317 00:15:50,280 --> 00:15:52,410 and algorithms and data structures more generally. 318 00:15:52,410 --> 00:15:55,560 So CS50P is very much focused on programming itself 319 00:15:55,560 --> 00:15:58,140 and is designed now to be a course that students 320 00:15:58,140 --> 00:16:02,790 can take before or during or after CS50 itself, 321 00:16:02,790 --> 00:16:06,750 as either additional material or perhaps preparatory material for the same. 322 00:16:06,750 --> 00:16:10,230 CS50S, perhaps for your younger students or less comfortable students, 323 00:16:10,230 --> 00:16:13,740 is an introduction to programming with Scratch, the graphical language that we 324 00:16:13,740 --> 00:16:15,570 ourselves use in CS50. 325 00:16:15,570 --> 00:16:18,150 And just the first week of the class, this 326 00:16:18,150 --> 00:16:23,130 is a version of an introductory course that you might take three weeks, maybe 327 00:16:23,130 --> 00:16:25,710 even six with your younger or older students, 328 00:16:25,710 --> 00:16:28,500 to go through at a slower pace but with a higher ceiling 329 00:16:28,500 --> 00:16:31,080 as to what they can then do with Scratch itself. 330 00:16:31,080 --> 00:16:35,400 CS50T is an introduction to understanding technology. 331 00:16:35,400 --> 00:16:40,410 So it's similar to CS50B, the business class, similar to CS50L, law class. 332 00:16:40,410 --> 00:16:43,860 But it focuses more on consumer-type technologies-- 333 00:16:43,860 --> 00:16:47,040 how the internet works, how your own Mac or PC works-- and uses 334 00:16:47,040 --> 00:16:49,080 some of the shared backbone but focuses, really, 335 00:16:49,080 --> 00:16:52,740 on folks who aren't necessarily business or law-centric 336 00:16:52,740 --> 00:16:55,110 but more generally using technology. 337 00:16:55,110 --> 00:16:58,440 And then lastly but not least is CS50W, a course 338 00:16:58,440 --> 00:17:00,660 on web programming with Python and JavaScript 339 00:17:00,660 --> 00:17:04,290 that's meant to, like many of these, pick up where CS50 leaves off 340 00:17:04,290 --> 00:17:08,310 and be a second course, be it for students in high school or university 341 00:17:08,310 --> 00:17:12,480 or folks in the real world, to dive in more deeply into web programming 342 00:17:12,480 --> 00:17:17,250 specifically, assuming as prior knowledge CS50 or some similar course 343 00:17:17,250 --> 00:17:17,970 as well. 344 00:17:17,970 --> 00:17:21,000 Carter, I think, no need to copy and paste all of these links. 345 00:17:21,000 --> 00:17:23,290 But if you have the URL of these slides-- 346 00:17:23,290 --> 00:17:26,310 which, maybe, Carter, it would make sense to paste the URL of this slide 347 00:17:26,310 --> 00:17:28,318 into the chat-- you're welcome to click on each 348 00:17:28,318 --> 00:17:30,360 and every one of these links, which will lead you 349 00:17:30,360 --> 00:17:36,210 to the free OpenCourseWare curriculum of all of these same courses in one place. 350 00:17:36,210 --> 00:17:39,760 And I'll note here that characterizing all of these classes, 351 00:17:39,760 --> 00:17:44,190 but especially the original class, CS50 itself, are really these two themes. 352 00:17:44,190 --> 00:17:47,520 And in fact, after one or two or three years of teaching, 353 00:17:47,520 --> 00:17:51,587 I began to reflect on what I was actually doing and why. 354 00:17:51,587 --> 00:17:54,420 I daresay that, first year of the course, second year of the course, 355 00:17:54,420 --> 00:17:56,913 I was just focused on keeping my head above water. 356 00:17:56,913 --> 00:17:58,830 And it's only in recent years that I've really 357 00:17:58,830 --> 00:18:01,483 noticed themes in my own approaches, for better or for worse, 358 00:18:01,483 --> 00:18:02,400 to teaching the class. 359 00:18:02,400 --> 00:18:06,360 And I daresay two of them are really this, accessibility and rigor-- 360 00:18:06,360 --> 00:18:09,330 sort of lowering the floor, so to speak, metaphorically, 361 00:18:09,330 --> 00:18:12,450 for students to make it easier for them, similar in spirit to what 362 00:18:12,450 --> 00:18:16,080 I hope to do back in 1996, just put a foot in the door 363 00:18:16,080 --> 00:18:19,770 and get some exposure to CS, but simultaneously preserving what 364 00:18:19,770 --> 00:18:22,710 at least here on campus has been a historical rigor 365 00:18:22,710 --> 00:18:26,310 so that the returns, so to speak, of taking this course 366 00:18:26,310 --> 00:18:28,290 are especially high for students. 367 00:18:28,290 --> 00:18:31,860 And it's a particularly immersive, it's a particularly intensive experience. 368 00:18:31,860 --> 00:18:37,210 But hopefully are the returns all the more proportional as well. 369 00:18:37,210 --> 00:18:42,660 And so I daresay students taking this course, CS50, off campus, 370 00:18:42,660 --> 00:18:47,040 be it online or locally elsewhere or through high school, 371 00:18:47,040 --> 00:18:51,210 where you don't have the constraints, temporally, of 12 or just 16 weeks, 372 00:18:51,210 --> 00:18:53,860 but you indeed have 32 weeks at your disposal, 373 00:18:53,860 --> 00:18:56,070 maybe even 52 weeks in total-- 374 00:18:56,070 --> 00:18:58,870 that, I think, is indeed the enabling technology. 375 00:18:58,870 --> 00:19:01,080 This isn't a Harvard course per se. 376 00:19:01,080 --> 00:19:04,380 We are just confined by the traditional model of a semester. 377 00:19:04,380 --> 00:19:08,970 I think, really, the key ingredient for students of any academic or curricular 378 00:19:08,970 --> 00:19:12,130 background is just to allow themselves sufficient time. 379 00:19:12,130 --> 00:19:14,280 And so that's a knob that we generally recommend 380 00:19:14,280 --> 00:19:18,060 folks turn rather than jettisoning material or making things easier 381 00:19:18,060 --> 00:19:20,910 and chipping away, therefore, at these primitives, the second one, 382 00:19:20,910 --> 00:19:24,150 of rigor in particular, just allowing and structuring, perhaps, 383 00:19:24,150 --> 00:19:27,120 your own classes to just give students more time-- instead 384 00:19:27,120 --> 00:19:29,700 of one week for a given problem set or homework assignment, 385 00:19:29,700 --> 00:19:32,280 perhaps two or even three, and as Margaret 386 00:19:32,280 --> 00:19:35,430 might address in her experience, and our friend Douglas tomorrow 387 00:19:35,430 --> 00:19:37,980 speak to their own experience with turning these knobs 388 00:19:37,980 --> 00:19:40,320 and adapting the material as they see fit, 389 00:19:40,320 --> 00:19:43,020 as might be best for their own students. 390 00:19:43,020 --> 00:19:47,130 This, too, was a key curricular design early on here on campus, at least, 391 00:19:47,130 --> 00:19:52,300 where we had within the same class, CS50, different tracks, so to speak. 392 00:19:52,300 --> 00:19:55,650 We, like a lot of universities, have a model where we have weekly lectures. 393 00:19:55,650 --> 00:19:59,130 So I will lecture once a week to all of the students in the class, 394 00:19:59,130 --> 00:20:01,260 presenting the week's concepts and really setting 395 00:20:01,260 --> 00:20:02,830 the stage for the week's assignment. 396 00:20:02,830 --> 00:20:04,780 But our teaching assistants, who are typically 397 00:20:04,780 --> 00:20:09,130 undergraduates themself who've taken the class and perhaps others in CS, 398 00:20:09,130 --> 00:20:13,060 they then lead sections or recitations for maybe 12 to 20 399 00:20:13,060 --> 00:20:15,820 or 30 students in total, generally on campus, 400 00:20:15,820 --> 00:20:19,120 but for our online extension school students or adults 401 00:20:19,120 --> 00:20:21,820 through continuing education, via Zoom as well. 402 00:20:21,820 --> 00:20:25,240 But we've typically, on campus, had different tracks of these sections 403 00:20:25,240 --> 00:20:28,510 or recitations for those more comfortable, those less comfortable, 404 00:20:28,510 --> 00:20:30,040 and those somewhere in between. 405 00:20:30,040 --> 00:20:32,822 And we just ask students to categorize themselves 406 00:20:32,822 --> 00:20:34,030 at the start of the semester. 407 00:20:34,030 --> 00:20:36,190 And we tell them, you're more comfortable 408 00:20:36,190 --> 00:20:38,740 if you've been, in fact, programming since you were six years 409 00:20:38,740 --> 00:20:41,380 old or the like, but maybe you don't have a formal background 410 00:20:41,380 --> 00:20:42,430 in CS or programming. 411 00:20:42,430 --> 00:20:46,000 And that's why you're nonetheless taking a formal introduction thereto. 412 00:20:46,000 --> 00:20:49,720 You're among those less comfortable if, like me in 1995, 413 00:20:49,720 --> 00:20:51,580 you didn't even consider taking the class. 414 00:20:51,580 --> 00:20:53,410 Or you have one foot in the door and the other one 415 00:20:53,410 --> 00:20:55,160 still out the door because you're not sure 416 00:20:55,160 --> 00:20:57,535 if computer science or programming is for you. 417 00:20:57,535 --> 00:20:59,410 And if you're not really sure where you fall, 418 00:20:59,410 --> 00:21:02,000 we assure students that they're just somewhere in between. 419 00:21:02,000 --> 00:21:06,280 So we have three different tracks that generally offer students 420 00:21:06,280 --> 00:21:09,610 the same introduction to computer science but at a different pace. 421 00:21:09,610 --> 00:21:11,890 And the teaching assistant leading these tracks might 422 00:21:11,890 --> 00:21:15,340 speak to students at a different level, allow the conversations, perhaps 423 00:21:15,340 --> 00:21:18,963 if more comfortable, to go all the more down a detailed rabbit hole, 424 00:21:18,963 --> 00:21:21,130 or, at least, pumping the brakes, perhaps, for those 425 00:21:21,130 --> 00:21:24,640 less comfortable to make sure everyone is comfortable on the same page. 426 00:21:24,640 --> 00:21:29,810 I'll note, though, that in recent years, as the course has grown in size 427 00:21:29,810 --> 00:21:32,590 and as the demographics of our student body have changed, 428 00:21:32,590 --> 00:21:36,350 we were actually motivated this past year to introduce a fourth track, 429 00:21:36,350 --> 00:21:39,730 if you will, for those euphemistically least comfortable, 430 00:21:39,730 --> 00:21:44,440 who really need some additional support not just with taking the class itself, 431 00:21:44,440 --> 00:21:45,940 but perhaps just with college. 432 00:21:45,940 --> 00:21:48,340 Perhaps they didn't have the strongest high school or middle school 433 00:21:48,340 --> 00:21:48,840 background. 434 00:21:48,840 --> 00:21:51,010 They don't necessarily have the instincts, 435 00:21:51,010 --> 00:21:53,890 or they didn't have the high school that trained them 436 00:21:53,890 --> 00:21:56,170 to take advantage of the online resources 437 00:21:56,170 --> 00:21:58,430 and the professor's office hours and the like. 438 00:21:58,430 --> 00:22:01,690 And so in this particular track for our university 439 00:22:01,690 --> 00:22:04,750 students do we also just help them structure their days, 440 00:22:04,750 --> 00:22:07,450 structure their time so as to be successful in college, 441 00:22:07,450 --> 00:22:11,350 because CS50 here on campus has actually gotten younger over the years. 442 00:22:11,350 --> 00:22:14,278 We used to have a plurality of sophomore, second-year students. 443 00:22:14,278 --> 00:22:17,320 But over the years, students have started taking the course more and more 444 00:22:17,320 --> 00:22:21,520 as first-years, which means ours is the first of maybe four classes 445 00:22:21,520 --> 00:22:23,770 they might take ever in college. 446 00:22:23,770 --> 00:22:27,640 And so the onus has come to us to be all the more supportive of them just 447 00:22:27,640 --> 00:22:30,680 getting their footing on campus. 448 00:22:30,680 --> 00:22:33,850 It's also been important, if you know CS50's curriculum, 449 00:22:33,850 --> 00:22:37,630 that we introduce, in my mind, different languages to students. 450 00:22:37,630 --> 00:22:42,400 Back in the day, in 1996, when I took the class, it was a course in C. 451 00:22:42,400 --> 00:22:44,500 And the vernacular on campus was, I know how 452 00:22:44,500 --> 00:22:48,310 to program in C because I took a course in C. 453 00:22:48,310 --> 00:22:52,570 We eventually introduced, though, other languages into the same course. 454 00:22:52,570 --> 00:22:55,240 And nowadays, we start with one week of Scratch. 455 00:22:55,240 --> 00:22:57,653 We then have several weeks of C, which is still 456 00:22:57,653 --> 00:23:00,070 the backbone of the course as introduction to programming. 457 00:23:00,070 --> 00:23:04,810 And then we have a few weeks of Python, added to that some SQL and JavaScript 458 00:23:04,810 --> 00:23:07,810 and the requisite HTML and CSS so that for many students, 459 00:23:07,810 --> 00:23:10,690 CS50 is designed to be either a foundation 460 00:23:10,690 --> 00:23:14,230 in computer science for further studies in a traditional way, 461 00:23:14,230 --> 00:23:17,500 but also a terminal class for about half of our students, 462 00:23:17,500 --> 00:23:20,620 whereby we know a priori that half of our students 463 00:23:20,620 --> 00:23:23,650 are not going to take another CS or programming class. 464 00:23:23,650 --> 00:23:26,620 And we want them to have not just that foundational mental model 465 00:23:26,620 --> 00:23:30,490 for solving problems with technology, but also the practical skills 466 00:23:30,490 --> 00:23:33,400 to bring back to the arts, the humanities, the social sciences, 467 00:23:33,400 --> 00:23:37,090 or the like, so as to solve real-world problems even with just a semester 468 00:23:37,090 --> 00:23:38,740 of computer science under their belt. 469 00:23:38,740 --> 00:23:43,000 And so our goal with these various languages and the intensity 470 00:23:43,000 --> 00:23:46,660 of the course is so that students exit the class with a mental model of, I 471 00:23:46,660 --> 00:23:49,870 learned how to program, period, as opposed to, 472 00:23:49,870 --> 00:23:53,230 back in my day, what would have been, I learned how to program in C. 473 00:23:53,230 --> 00:23:56,290 To be fair, we focus on procedural programming. 474 00:23:56,290 --> 00:23:58,540 It's in other courses that students here at Harvard 475 00:23:58,540 --> 00:24:02,290 tend to learn a bit more object-oriented programming, functional programming, 476 00:24:02,290 --> 00:24:05,200 although we touch on briefly some of those topics. 477 00:24:05,200 --> 00:24:08,890 We hint at them when we introduce languages like Python and JavaScript, 478 00:24:08,890 --> 00:24:12,970 which lend themselves to some of those chats. 479 00:24:12,970 --> 00:24:15,850 So I thought it might be fun, or helpful, perhaps, 480 00:24:15,850 --> 00:24:21,100 to share the few vignettes of curricular content from the course itself. 481 00:24:21,100 --> 00:24:23,980 Some of you might recognize these scenes or similar. 482 00:24:23,980 --> 00:24:28,150 I took a few screenshots or photos from our lectures two years ago. 483 00:24:28,150 --> 00:24:31,930 To be fair, I should qualify this as this was the first year of COVID 484 00:24:31,930 --> 00:24:33,880 in fall of 2020. 485 00:24:33,880 --> 00:24:36,670 Everything here on campus was shut down, and almost everyone 486 00:24:36,670 --> 00:24:38,950 was, therefore, online, except us. 487 00:24:38,950 --> 00:24:41,680 We had this a wonderful silver lining opportunity 488 00:24:41,680 --> 00:24:46,390 to collaborate with a theater here on campus whose staff was otherwise idled. 489 00:24:46,390 --> 00:24:48,430 And so what you're about to see is admittedly 490 00:24:48,430 --> 00:24:53,600 a grand implementation of visions that I've had for 15, 20 years as a teacher. 491 00:24:53,600 --> 00:24:57,700 But when it turns out when you have a prop shop behind you in the theater, 492 00:24:57,700 --> 00:25:00,220 and talented artisans who can build things out 493 00:25:00,220 --> 00:25:04,480 of wood and electricity and the like, you'll see some examples of curriculum 494 00:25:04,480 --> 00:25:05,660 that we brought to life. 495 00:25:05,660 --> 00:25:08,260 But every one of these examples have I done 496 00:25:08,260 --> 00:25:13,060 in yesteryear using a scrap of paper that I brought with me or a Sharpie 497 00:25:13,060 --> 00:25:14,200 on the board or the like. 498 00:25:14,200 --> 00:25:18,010 There are lower-budget versions of each of these demonstrations as well. 499 00:25:18,010 --> 00:25:20,230 But the goal, really, of each of these vignettes 500 00:25:20,230 --> 00:25:23,950 is to paint a picture of why, in CS50, we, or I personally, 501 00:25:23,950 --> 00:25:28,037 spend so much time teaching something like linear search, which maybe we 502 00:25:28,037 --> 00:25:30,370 could get away with just a few minutes of a description, 503 00:25:30,370 --> 00:25:32,960 maybe a drawing on the board or a few slides. 504 00:25:32,960 --> 00:25:35,560 But instead, we might spend 15 or 20 minutes 505 00:25:35,560 --> 00:25:38,500 inviting students in healthy times up to the front of the class 506 00:25:38,500 --> 00:25:41,290 to demonstrate something with me, bringing in props 507 00:25:41,290 --> 00:25:43,270 and creating all the more visuals. 508 00:25:43,270 --> 00:25:46,030 The goal in my mind, just as a teacher, is 509 00:25:46,030 --> 00:25:48,310 to not just get through the course's curriculum 510 00:25:48,310 --> 00:25:52,150 and say the words or the topics that we want students to learn, but to create 511 00:25:52,150 --> 00:25:55,540 these memorable moments, spending perhaps an unusual amount of time 512 00:25:55,540 --> 00:25:59,650 to create those things they can latch on to mentally, even for years, that 513 00:25:59,650 --> 00:26:03,550 help them orient some arcane topic in the practicality 514 00:26:03,550 --> 00:26:05,140 that it actually offers. 515 00:26:05,140 --> 00:26:07,090 So you might recognize something like this. 516 00:26:07,090 --> 00:26:12,760 I, at least, have been a fan since 2007 of talking about binary using lights. 517 00:26:12,760 --> 00:26:16,840 Back in the day, I used some desk lamps that I found from IKEA. 518 00:26:16,840 --> 00:26:18,760 Nowadays, I might have a few students come up 519 00:26:18,760 --> 00:26:20,560 and turn on the light bulbs on their phone. 520 00:26:20,560 --> 00:26:22,353 Turns out when you're in a proper theater, 521 00:26:22,353 --> 00:26:25,270 you might have dozens of light bulbs right in front of you, literally, 522 00:26:25,270 --> 00:26:26,270 on the stage. 523 00:26:26,270 --> 00:26:28,660 And so here is an opportunity where I introduced students 524 00:26:28,660 --> 00:26:33,070 each year to the concept of binary, but really representation of information, 525 00:26:33,070 --> 00:26:37,450 but rather bringing it to life visually by turning and turning off light bulbs. 526 00:26:37,450 --> 00:26:41,530 A goal I had had for 14 years, that first year of COVID when 527 00:26:41,530 --> 00:26:45,730 we were in this theater, was to actually do searching with physical doors, 528 00:26:45,730 --> 00:26:49,900 to be able to walk up to it, open the door, and look for something behind it. 529 00:26:49,900 --> 00:26:52,000 I didn't really have access to seven or eight 530 00:26:52,000 --> 00:26:55,000 or more doors in our typical classroom in healthy times. 531 00:26:55,000 --> 00:26:57,730 But thankfully, what you're seeing here is seven doors 532 00:26:57,730 --> 00:27:02,500 from seven different plays that had used doors with their actual sets 533 00:27:02,500 --> 00:27:03,760 back in healthy times. 534 00:27:03,760 --> 00:27:06,070 Our friends kindly got these all out of the warehouse 535 00:27:06,070 --> 00:27:10,060 and brought to life here me searching for the number 6. 536 00:27:10,060 --> 00:27:13,257 We went all out-- or, really, our friends and artists went all out. 537 00:27:13,257 --> 00:27:15,340 And we didn't just put a number 6 behind the door. 538 00:27:15,340 --> 00:27:18,520 We put a fuzzy number 6 with googly eyes behind it 539 00:27:18,520 --> 00:27:21,160 as well, really, just for fun and to bring this to life. 540 00:27:21,160 --> 00:27:24,520 Mind you, too, I was the only one really in the room, 541 00:27:24,520 --> 00:27:27,250 other than colleagues running our cameras and such. 542 00:27:27,250 --> 00:27:30,640 All of our students were actually, this particular year, watching online. 543 00:27:30,640 --> 00:27:33,910 But here you see, for instance, all of the numbers randomly ordered 544 00:27:33,910 --> 00:27:34,870 behind the doors. 545 00:27:34,870 --> 00:27:37,790 Linear search is the best you can do with this demo. 546 00:27:37,790 --> 00:27:40,480 We then do a subsequent demo where a colleague secretly 547 00:27:40,480 --> 00:27:43,490 sorts all of the numbers behind the closed doors. 548 00:27:43,490 --> 00:27:46,420 And then we do it again with something like binary search. 549 00:27:46,420 --> 00:27:49,720 Now, with this said, I don't have access to seven doors 550 00:27:49,720 --> 00:27:51,800 anymore in our more traditional classroom. 551 00:27:51,800 --> 00:27:55,210 And so I sort of revert to just grabbing something like a whiteboard 552 00:27:55,210 --> 00:27:59,500 and pieces of paper and drawing with marker or chalk each of the numbers 553 00:27:59,500 --> 00:28:02,770 I have in mind, covering them with some scotch tape and paper, 554 00:28:02,770 --> 00:28:04,270 and then treating those as the door. 555 00:28:04,270 --> 00:28:08,410 So here, too, is an example of how, back in the day and now, 556 00:28:08,410 --> 00:28:12,820 do we do things, really, with the accessories we have on our desks 557 00:28:12,820 --> 00:28:14,000 and in our cabinets. 558 00:28:14,000 --> 00:28:17,260 This is a colleague of mine, Brian Yu, who teaches, in fact, 559 00:28:17,260 --> 00:28:20,290 the AI class and web class we mentioned, where he and I were not 560 00:28:20,290 --> 00:28:23,620 allowed to be in the same room in 2020 while teaching unmasked. 561 00:28:23,620 --> 00:28:27,670 But here are some plastic numbers that we found here on Amazon 562 00:28:27,670 --> 00:28:31,840 by searching Amazon for "plastic numbers," just to bring to life now 563 00:28:31,840 --> 00:28:33,490 the actual sorting of numbers. 564 00:28:33,490 --> 00:28:35,830 And so thanks to these shelves that we found in back 565 00:28:35,830 --> 00:28:39,310 was Brian able to do something like sorting, 566 00:28:39,310 --> 00:28:42,100 be it with merge sorts or the like, and actually give 567 00:28:42,100 --> 00:28:45,640 a visual to that as opposed to just using PowerPoints or the like. 568 00:28:45,640 --> 00:28:48,970 In CS50, we, of course, use C. And C has, 569 00:28:48,970 --> 00:28:51,640 for better or for worse, pointers and memory management. 570 00:28:51,640 --> 00:28:55,360 And you and I often talk about pointers in the context of addresses 571 00:28:55,360 --> 00:28:57,620 or maybe even addresses on mailboxes. 572 00:28:57,620 --> 00:29:01,190 So it turns out when you have a prop shop, you can actually use mailboxes. 573 00:29:01,190 --> 00:29:05,050 So here, for instance, was a variable P representing a pointer. 574 00:29:05,050 --> 00:29:07,840 And when I opened up that mailbox, I found inside of it 575 00:29:07,840 --> 00:29:09,505 the address of some value-- 576 00:29:09,505 --> 00:29:11,760 0x123, for instance. 577 00:29:11,760 --> 00:29:16,560 Brian, in the other room, of course, had the mailbox at address 0x123. 578 00:29:16,560 --> 00:29:21,790 And inside of his mailbox was the value, once dereferenced, that we found. 579 00:29:21,790 --> 00:29:24,440 So this, I daresay, is doable on a more modest scale 580 00:29:24,440 --> 00:29:26,940 if you have a local Home Depot or hardware store or the like 581 00:29:26,940 --> 00:29:28,560 to get some inexpensive mailboxes. 582 00:29:28,560 --> 00:29:31,050 But this, too, was an example of just something we wanted 583 00:29:31,050 --> 00:29:33,090 to create memorably for students. 584 00:29:33,090 --> 00:29:35,040 We have another example that he and I tag 585 00:29:35,040 --> 00:29:39,210 team where, when we talk about variables and something simple like swapping, 586 00:29:39,210 --> 00:29:41,800 we typically invite a student on stage-- or, in this case, 587 00:29:41,800 --> 00:29:44,250 Brian-- to just swap the value of two variables. 588 00:29:44,250 --> 00:29:47,310 Those values, in this case, were represented by two glasses of water 589 00:29:47,310 --> 00:29:50,250 with some food coloring in them so they'd stand out on camera-- 590 00:29:50,250 --> 00:29:51,960 orange and purple in this case. 591 00:29:51,960 --> 00:29:55,155 And then I sort of playfully, since Brian's in on the joke, 592 00:29:55,155 --> 00:29:56,973 ask him to swap the two values. 593 00:29:56,973 --> 00:29:58,890 And it's not a matter of swapping the glasses. 594 00:29:58,890 --> 00:30:02,640 I wanted the purple liquid in the one glass and the orange liquid 595 00:30:02,640 --> 00:30:05,310 in the other, which, of course, you can't really 596 00:30:05,310 --> 00:30:09,390 do unless you introduce, of course, a temporary variable, at least 597 00:30:09,390 --> 00:30:13,140 using traditional means and not something fancy like bitwise operations 598 00:30:13,140 --> 00:30:13,870 or the like. 599 00:30:13,870 --> 00:30:16,230 So here we had just a way of bringing to life 600 00:30:16,230 --> 00:30:19,500 why students, when they need to swap values, which becomes 601 00:30:19,500 --> 00:30:22,320 germane quickly when we start talking about sorting 602 00:30:22,320 --> 00:30:24,870 and moving things around in array, hopefully 603 00:30:24,870 --> 00:30:27,450 a memorable moment they can latch on to. 604 00:30:27,450 --> 00:30:32,310 We talk later in the semester about, as well, hashing. 605 00:30:32,310 --> 00:30:36,210 And here, for instance, is me with some jumbo playing cards, also found 606 00:30:36,210 --> 00:30:40,110 on Amazon as jumbo playing cards so that they're not this big but this big. 607 00:30:40,110 --> 00:30:42,120 And this is me bucketizing them, literally, 608 00:30:42,120 --> 00:30:44,970 with four buckets, each with a suit from a deck of cards, 609 00:30:44,970 --> 00:30:49,500 and me just figuring out how to hash each card into the diamonds bucket 610 00:30:49,500 --> 00:30:51,640 or the hearts bucket or the like. 611 00:30:51,640 --> 00:30:57,090 So then, I can at least create four collections of size 13 instead of 52 612 00:30:57,090 --> 00:31:00,690 and then maybe sort each of those individual buckets. 613 00:31:00,690 --> 00:31:02,700 I have a habit of wearing today-- 614 00:31:02,700 --> 00:31:05,700 and really, always-- black T-shirts or sweaters. 615 00:31:05,700 --> 00:31:08,010 Well, I realized at some point that this would actually 616 00:31:08,010 --> 00:31:12,728 be kind of a fun way of introducing stacks and explaining, perhaps, 617 00:31:12,728 --> 00:31:14,520 that the reason I always seem to wear black 618 00:31:14,520 --> 00:31:18,083 is because my stack of sweaters at home looks, of course, like this. 619 00:31:18,083 --> 00:31:21,000 And every time I do the wash, I just put the new sweaters back on top. 620 00:31:21,000 --> 00:31:23,550 And even though I own a blue and a red sweater, 621 00:31:23,550 --> 00:31:27,300 if you keep pushing onto the top of the stack but never exhausting the stack, 622 00:31:27,300 --> 00:31:31,200 you're, of course, going to reuse and redress in the same way. 623 00:31:31,200 --> 00:31:34,410 Back in the day, when I in college took a course on databases, 624 00:31:34,410 --> 00:31:36,780 this was not done physically but just verbally. 625 00:31:36,780 --> 00:31:40,590 But it stayed with me nonetheless, this idea of locking a database, 626 00:31:40,590 --> 00:31:43,380 be it with locks or nowadays with transactions. 627 00:31:43,380 --> 00:31:46,710 And so it turns out when you have colleagues who work in a prop shop, 628 00:31:46,710 --> 00:31:49,380 you can just ask them to bring out the old-school fridge. 629 00:31:49,380 --> 00:31:54,180 And we use this in CS50 to talk about issues of databases and concurrency 630 00:31:54,180 --> 00:31:57,930 and not wanting to have two different users see 631 00:31:57,930 --> 00:32:00,030 two different states of the same variable, 632 00:32:00,030 --> 00:32:01,780 and therefore, make incorrect decisions. 633 00:32:01,780 --> 00:32:05,940 So it turns out, when you have an actual refrigerator on stage and a padlock, 634 00:32:05,940 --> 00:32:09,420 you can lock the refrigerator, the metaphor here being, 635 00:32:09,420 --> 00:32:13,020 what happens if I have a refrigerator in my home and my roommates 636 00:32:13,020 --> 00:32:15,930 and I both, a few minutes apart, open the fridge 637 00:32:15,930 --> 00:32:19,170 and realize, wait a minute, we're out of milk, close the fridge, 638 00:32:19,170 --> 00:32:20,580 and then go to the store? 639 00:32:20,580 --> 00:32:23,370 The next roommate then comes in and makes that same decision 640 00:32:23,370 --> 00:32:27,660 based on a now-misleading state because my roommate doesn't 641 00:32:27,660 --> 00:32:29,100 know that I've gone to the store. 642 00:32:29,100 --> 00:32:29,940 So what happens? 643 00:32:29,940 --> 00:32:32,490 He too closes the fridge, goes to some other store. 644 00:32:32,490 --> 00:32:34,380 We don't bump into each other in this story. 645 00:32:34,380 --> 00:32:35,250 What happens then? 646 00:32:35,250 --> 00:32:38,970 We get back to the apartment, and boom, we now have two gallons of milk. 647 00:32:38,970 --> 00:32:41,730 And that's not going to last long. 648 00:32:41,730 --> 00:32:43,380 That's going to spoil before long. 649 00:32:43,380 --> 00:32:44,760 And so we've got a problem. 650 00:32:44,760 --> 00:32:47,670 But we would not have that problem if I instead 651 00:32:47,670 --> 00:32:51,900 locked the refrigerator, much like you might lock a table or a row 652 00:32:51,900 --> 00:32:52,860 in a database. 653 00:32:52,860 --> 00:32:56,550 And then one last visual here toward the end of the CS50 semester-- 654 00:32:56,550 --> 00:33:00,150 we introduced students to a bit of JavaScript and a paradigm 655 00:33:00,150 --> 00:33:03,280 like asynchronicity and callback functions. 656 00:33:03,280 --> 00:33:06,690 And so this is me on an old-timey phone calling Brian, 657 00:33:06,690 --> 00:33:08,700 asking him, like, what the weather is. 658 00:33:08,700 --> 00:33:10,170 He didn't know when he picked up. 659 00:33:10,170 --> 00:33:13,680 So he hung up the phone, went outside to check the weather, 660 00:33:13,680 --> 00:33:16,590 and then he called me back on that old-timey phone. 661 00:33:16,590 --> 00:33:19,320 And I then picked up some number of seconds or minutes later, 662 00:33:19,320 --> 00:33:23,580 thereby demonstrating, in this case, the example of a callback function 663 00:33:23,580 --> 00:33:28,660 that's particularly germane again in the context of JavaScript. 664 00:33:28,660 --> 00:33:32,710 So separate from these curricular memorable moments 665 00:33:32,710 --> 00:33:36,310 and these demonstrations on stage, we also do a lot of live coding. 666 00:33:36,310 --> 00:33:38,567 And whether you've taught or not taught before, 667 00:33:38,567 --> 00:33:40,400 you might have a different approach to this. 668 00:33:40,400 --> 00:33:42,970 But I daresay it can definitely be nerve-wracking and perhaps 669 00:33:42,970 --> 00:33:44,360 something, even, to avoid. 670 00:33:44,360 --> 00:33:47,470 And I will say I myself rather split the difference where I do 671 00:33:47,470 --> 00:33:51,220 think, pedagogically, there's value in doing live coding as opposed to just 672 00:33:51,220 --> 00:33:53,440 walking through static slides thereof. 673 00:33:53,440 --> 00:33:55,660 I do admittedly think there's value in screwing 674 00:33:55,660 --> 00:33:58,120 up in front of your roomful of students, ideally in a way 675 00:33:58,120 --> 00:34:01,210 that you can figure it out within a few awkward seconds or minutes. 676 00:34:01,210 --> 00:34:03,220 But that, too, of course, has value. 677 00:34:03,220 --> 00:34:07,180 And I do try to generally split the difference where I, for instance, might 678 00:34:07,180 --> 00:34:08,540 take code like this. 679 00:34:08,540 --> 00:34:11,380 So, for instance, I'll pull up this URL myself if, Carter, you 680 00:34:11,380 --> 00:34:13,150 wouldn't mind copy and pasting it, too. 681 00:34:13,150 --> 00:34:18,429 This is just an example, for instance, of what my own approach to week one's 682 00:34:18,429 --> 00:34:20,380 lecture in CS50 might be. 683 00:34:20,380 --> 00:34:24,550 I've got a whole folder here called, by my own convention, src1, that just 684 00:34:24,550 --> 00:34:26,469 has a whole bunch of demonstrations. 685 00:34:26,469 --> 00:34:28,900 And these demonstrations are generally named 686 00:34:28,900 --> 00:34:32,380 in a way that describes what it is I want to demonstrate, not necessarily 687 00:34:32,380 --> 00:34:35,440 conceptually or curricularly, but functionally, 688 00:34:35,440 --> 00:34:38,739 like, what does this program do just, so I and a student can find the demo they 689 00:34:38,739 --> 00:34:41,510 vaguely remember later as well. 690 00:34:41,510 --> 00:34:42,670 And I tend to do this. 691 00:34:42,670 --> 00:34:45,070 As you can see from this calculator example, 692 00:34:45,070 --> 00:34:49,120 I tend to have calculator 0, 1, 2, 3, 4, which 693 00:34:49,120 --> 00:34:51,100 is really a set of five progressions. 694 00:34:51,100 --> 00:34:54,909 And this is really a cue to myself that, when I live code, 695 00:34:54,909 --> 00:34:57,472 I want to first implement for my students version 0. 696 00:34:57,472 --> 00:34:59,680 And then we might have a quick discussion of the same 697 00:34:59,680 --> 00:35:04,120 because version 0 is usually correct but just not very well implemented. 698 00:35:04,120 --> 00:35:05,210 It might be messy. 699 00:35:05,210 --> 00:35:08,650 It might not decompose lots of code very well. 700 00:35:08,650 --> 00:35:10,360 There's opportunities for improvement. 701 00:35:10,360 --> 00:35:15,760 And yet by checkpointing myself with, then, version 1, 2, 3, 4, and onward, 702 00:35:15,760 --> 00:35:19,030 I then sort of redo or relive code the same. 703 00:35:19,030 --> 00:35:21,880 I do admittedly, behind the scenes, always 704 00:35:21,880 --> 00:35:24,380 have a very old-school technology next to me, 705 00:35:24,380 --> 00:35:27,430 including, right now today, which is paper. 706 00:35:27,430 --> 00:35:31,120 If you're curious, or if this might be helpful, just one of CS50's tools 707 00:35:31,120 --> 00:35:33,250 is this tool here called Render50. 708 00:35:33,250 --> 00:35:36,640 There's both a command line version and a web-based version. 709 00:35:36,640 --> 00:35:39,040 And this is just a program that facilitates 710 00:35:39,040 --> 00:35:44,557 generating landscape-mode, syntax-highlighted PDFs of source code 711 00:35:44,557 --> 00:35:45,640 you've written in advance. 712 00:35:45,640 --> 00:35:49,720 And to this day, even though I have all this technology in front of me, 713 00:35:49,720 --> 00:35:52,990 this is my comfort blanket because I can always 714 00:35:52,990 --> 00:35:55,990 rely on having an answer for myself or a next step, 715 00:35:55,990 --> 00:35:59,240 even though I do sometimes diverge from that same script-- 716 00:35:59,240 --> 00:36:01,630 so just to give you a sense of, how I personally 717 00:36:01,630 --> 00:36:04,870 walk the line of doing live coding but not in a way that 718 00:36:04,870 --> 00:36:09,220 gets me into unrecoverable problems? 719 00:36:09,220 --> 00:36:11,020 And the problem sets themselves-- this is 720 00:36:11,020 --> 00:36:13,750 our nomenclature for programming assignments or homework 721 00:36:13,750 --> 00:36:15,640 assignments, a.k.a. problem sets. 722 00:36:15,640 --> 00:36:17,830 And a problem set literally might mean that. 723 00:36:17,830 --> 00:36:20,290 It might mean, early in the semester, the problem 724 00:36:20,290 --> 00:36:24,190 set for students has three or four smaller problems to solve. 725 00:36:24,190 --> 00:36:26,230 Maybe, later in the course, a problem set 726 00:36:26,230 --> 00:36:28,457 has just one problem for them to solve. 727 00:36:28,457 --> 00:36:30,790 But these are really just our homework assignments here. 728 00:36:30,790 --> 00:36:33,730 And I thought I'd share just the process by which I and now some 729 00:36:33,730 --> 00:36:35,950 of my colleagues, among them Carter and Brian, 730 00:36:35,950 --> 00:36:38,140 go about creating these homework assignments. 731 00:36:38,140 --> 00:36:45,100 And in my mind, too, I have always tried to avoid using or creating problems 732 00:36:45,100 --> 00:36:48,460 that you might typically find at the end of a textbook, 733 00:36:48,460 --> 00:36:51,370 the end of a chapter, which are fairly mundane, 734 00:36:51,370 --> 00:36:55,060 fairly uninspiring problems that absolutely have value when it 735 00:36:55,060 --> 00:36:56,800 comes to the mechanics of programming. 736 00:36:56,800 --> 00:36:59,470 Maybe they touch on some topic specifically. 737 00:36:59,470 --> 00:37:02,710 But in general, our approach in CS50 and all of our classes 738 00:37:02,710 --> 00:37:07,900 now has been to find some idea, some application, 739 00:37:07,900 --> 00:37:10,930 some domain that we can use to inspire the problem 740 00:37:10,930 --> 00:37:14,800 and then use that as a pivot to the underlying implementation details 741 00:37:14,800 --> 00:37:16,960 that we really do want students to glean. 742 00:37:16,960 --> 00:37:19,780 So, for instance, I think the very first problem 743 00:37:19,780 --> 00:37:24,310 set I wrote for CS50 back in 2007, give or take, 744 00:37:24,310 --> 00:37:26,950 would have been this, a program we call Mario. 745 00:37:26,950 --> 00:37:29,470 This is not what students implement for Mario, though. 746 00:37:29,470 --> 00:37:32,740 But this is a screenshot from the original Nintendo Super Mario Brothers 747 00:37:32,740 --> 00:37:33,460 game. 748 00:37:33,460 --> 00:37:35,530 But I did notice at the time-- 749 00:37:35,530 --> 00:37:39,130 well, this is kind of an interesting pattern, this pyramid-like shape. 750 00:37:39,130 --> 00:37:42,910 And if you're using a language like C or most languages that generally print 751 00:37:42,910 --> 00:37:45,790 on the terminal window from top to bottom, left to right, 752 00:37:45,790 --> 00:37:48,310 this is actually maybe a little nontrivial. 753 00:37:48,310 --> 00:37:51,310 It'd be a lot easier if the pyramid were this way because then you could 754 00:37:51,310 --> 00:37:53,770 print one brick, then two, then three. 755 00:37:53,770 --> 00:37:57,380 But here you have to somehow print out all of this empty sky. 756 00:37:57,380 --> 00:38:00,460 So this inspires one of CS50's first problems that still, 757 00:38:00,460 --> 00:38:04,900 to this day, which is to have students create, using C and a terminal window 758 00:38:04,900 --> 00:38:07,720 only, none of the colors, none of the Mario or pipe, 759 00:38:07,720 --> 00:38:12,340 but just pivot from this picture to implement, using hashtags, 760 00:38:12,340 --> 00:38:15,400 these individual bricks instead. 761 00:38:15,400 --> 00:38:17,890 Later in the class, we happen to draw some inspiration 762 00:38:17,890 --> 00:38:22,450 from the world of imagery, if not forensics or steganography, 763 00:38:22,450 --> 00:38:24,200 the art of hiding information. 764 00:38:24,200 --> 00:38:27,820 And if you kind of look at your Zoom screen just right, perhaps, 765 00:38:27,820 --> 00:38:31,950 or tilt your laptop, you might kind of see that this isn't all just red noise 766 00:38:31,950 --> 00:38:33,970 with white dots as well. 767 00:38:33,970 --> 00:38:38,100 There's some cyan in here-- some light blue, essentially-- wherein there's 768 00:38:38,100 --> 00:38:38,910 a secret message. 769 00:38:38,910 --> 00:38:41,790 And so for this problem set, we have students 770 00:38:41,790 --> 00:38:44,310 inspired by what I remembered from my childhood 771 00:38:44,310 --> 00:38:47,280 being something that looked like this in a cereal box 772 00:38:47,280 --> 00:38:50,130 that also came with those red glasses that 773 00:38:50,130 --> 00:38:53,950 puts red plastic in front of your eyes that somehow reveals a secret message. 774 00:38:53,950 --> 00:38:56,910 So we have students in CS50, using C in this case, 775 00:38:56,910 --> 00:38:58,860 implement the equivalent of a red filter so 776 00:38:58,860 --> 00:39:01,560 that when they put on those glasses metaphorically, 777 00:39:01,560 --> 00:39:04,410 or run their now-program, they see this. 778 00:39:04,410 --> 00:39:06,750 And if you grew up playing Clue or Cluedo, 779 00:39:06,750 --> 00:39:10,890 it was Professor Plum in the lounge with the candlestick this particular year. 780 00:39:10,890 --> 00:39:14,190 But there, too, this is, again, a problem that, really, like Mario, 781 00:39:14,190 --> 00:39:17,500 is maybe a couple of loops, iterating from top to bottom, 782 00:39:17,500 --> 00:39:21,030 left to right-- so some basic mechanics of procedural programming, 783 00:39:21,030 --> 00:39:24,170 but inspired, ideally now, by an idea that students can latch on to, 784 00:39:24,170 --> 00:39:27,300 or something that just packages it in a way that inspires. 785 00:39:27,300 --> 00:39:29,520 Most recently, Carter and I and the team have 786 00:39:29,520 --> 00:39:32,760 been working on a course called CS50P, this introduction to programming 787 00:39:32,760 --> 00:39:33,930 with Python. 788 00:39:33,930 --> 00:39:36,700 I'm a big fan of Seinfeld, even though the older I get, 789 00:39:36,700 --> 00:39:40,020 the fewer my same-age students seem to this particular show. 790 00:39:40,020 --> 00:39:41,682 So we're finding new shows. 791 00:39:41,682 --> 00:39:44,640 But there is this scene here where Kramer, if you've watched this show, 792 00:39:44,640 --> 00:39:45,660 goes into a bank. 793 00:39:45,660 --> 00:39:47,490 And the bank is having a promotion where, 794 00:39:47,490 --> 00:39:52,050 if you are not greeted with a hello, you receive $100 from the bank. 795 00:39:52,050 --> 00:39:55,080 He goes into this bank, and the teller says something like "hi" 796 00:39:55,080 --> 00:39:55,830 to him instead. 797 00:39:55,830 --> 00:39:57,510 Kramer demands his $100. 798 00:39:57,510 --> 00:40:00,390 But the banker says, "No, no, I greeted you with hi. 799 00:40:00,390 --> 00:40:01,740 But hi is not hello. 800 00:40:01,740 --> 00:40:03,120 So some hilarity ensues. 801 00:40:03,120 --> 00:40:05,920 And, long story short, it occurred to us, well, wait a minute. 802 00:40:05,920 --> 00:40:07,878 Why don't we have students write a program that 803 00:40:07,878 --> 00:40:10,590 prompts the user via standard input for a greeting. 804 00:40:10,590 --> 00:40:14,055 And if that greeting starts with-- 805 00:40:14,055 --> 00:40:17,610 is not a hello, we print out $100 they're owed. 806 00:40:17,610 --> 00:40:20,670 But if it starts with an H, which was the eventual compromise, 807 00:40:20,670 --> 00:40:23,370 they should print out $20 instead, like Kramer got. 808 00:40:23,370 --> 00:40:27,180 And if they print out anything else that doesn't start with an H or isn't hello, 809 00:40:27,180 --> 00:40:29,670 well, they get printed out $0. 810 00:40:29,670 --> 00:40:32,520 So here this is actually early on in CS50P. 811 00:40:32,520 --> 00:40:35,400 It's really just a prompt to get input. 812 00:40:35,400 --> 00:40:38,790 It's an if-elif-else kind of construct, and that's it. 813 00:40:38,790 --> 00:40:41,460 But here, too, we try to package it in a more fun way. 814 00:40:41,460 --> 00:40:45,180 And these URLs, too, will lead you to the particular specifications. 815 00:40:45,180 --> 00:40:48,917 There's another problem on CamelCase converting between it and snake case, 816 00:40:48,917 --> 00:40:51,000 so to speak, to help students realize that there's 817 00:40:51,000 --> 00:40:52,920 different conventions out there. 818 00:40:52,920 --> 00:40:55,800 There's a problem set where we have students implement a very, very 819 00:40:55,800 --> 00:40:59,160 lightweight version of a deterministic finite automaton, a DFA, 820 00:40:59,160 --> 00:41:03,180 or, really, just a soda machine that somehow maintains state with a variable 821 00:41:03,180 --> 00:41:07,860 and keeps track of how much coin a user has virtually typed in in order to say, 822 00:41:07,860 --> 00:41:10,980 yes, you're now given your Coke. 823 00:41:10,980 --> 00:41:15,227 Drawing inspiration from the first tweet ever on Twitter, 824 00:41:15,227 --> 00:41:17,310 which was this from Jack Dorsey-- "just setting up 825 00:41:17,310 --> 00:41:19,600 my twttr," which was its nickname early on, 826 00:41:19,600 --> 00:41:21,540 you'll notice there's no vowels in this word. 827 00:41:21,540 --> 00:41:24,330 So here the pivot for us was prompt the user for input 828 00:41:24,330 --> 00:41:26,260 and strip out all of the values. 829 00:41:26,260 --> 00:41:30,660 So Twitter becomes T-W-T-T-R, but do this for any word as well. 830 00:41:30,660 --> 00:41:33,180 In Massachusetts, you can get a so-called vanity plate. 831 00:41:33,180 --> 00:41:35,940 But there's actually almost an algorithmic definition 832 00:41:35,940 --> 00:41:39,210 of what the rules are for what letters you can use and numbers 833 00:41:39,210 --> 00:41:40,003 and in what order. 834 00:41:40,003 --> 00:41:42,420 So we have students implement something that will validate 835 00:41:42,420 --> 00:41:44,580 an actual Massachusetts license plate. 836 00:41:44,580 --> 00:41:48,480 We have students take a look at something they might see on their car 837 00:41:48,480 --> 00:41:50,640 or their parents' that has, of course, fractions. 838 00:41:50,640 --> 00:41:54,570 And we use this as an opportunity to have students type in a fraction using, 839 00:41:54,570 --> 00:41:58,890 in Python, some try and some excepts, actually parse that fraction, 840 00:41:58,890 --> 00:42:01,500 printing out the equivalent percentage, or, if it's 841 00:42:01,500 --> 00:42:05,000 close enough to empty or full, E or F, respectively. 842 00:42:05,000 --> 00:42:06,750 There's a very popular place down the road 843 00:42:06,750 --> 00:42:09,330 called Felipe's Taqueria here in Cambridge that we hope, 844 00:42:09,330 --> 00:42:11,700 if students ever visit Boston, they might visit as well. 845 00:42:11,700 --> 00:42:15,930 But that's a great demonstration for now grabbing a whole bunch of menu items, 846 00:42:15,930 --> 00:42:18,930 like the burritos and quesadillas and others that they have on the menu, 847 00:42:18,930 --> 00:42:23,040 and using a Python dictionary to map those menu items to prices, 848 00:42:23,040 --> 00:42:27,120 giving students an opportunity now to index into a dictionary, 849 00:42:27,120 --> 00:42:29,100 at least in a more familiar way. 850 00:42:29,100 --> 00:42:31,530 I grew up with this thing here, Little Professor, 851 00:42:31,530 --> 00:42:36,090 which was a little device that generates pseudo-randomly mathematical formulas 852 00:42:36,090 --> 00:42:38,280 on the screen, like one plus two. 853 00:42:38,280 --> 00:42:40,830 And the student has to type in the answer. 854 00:42:40,830 --> 00:42:44,100 But it's therefore sort of an opportunity to quiz them on math. 855 00:42:44,100 --> 00:42:46,920 So we have students implement a Python version thereof. 856 00:42:46,920 --> 00:42:49,350 We have this tradition on campus, and optionally, 857 00:42:49,350 --> 00:42:52,680 online, for students, where at the end of the course 858 00:42:52,680 --> 00:42:55,080 and be given an "I took CS50" T-shirt. 859 00:42:55,080 --> 00:42:56,622 We tend to have some extras of these. 860 00:42:56,622 --> 00:42:59,288 So if you are teaching your own class in the coming year, let us 861 00:42:59,288 --> 00:43:02,100 know, and we'll do our best to oblige with one or more of these. 862 00:43:02,100 --> 00:43:06,300 But we have students implement their own image generator. 863 00:43:06,300 --> 00:43:08,820 So I can't do it with the green screen here. 864 00:43:08,820 --> 00:43:13,380 But they have to take as input a photograph, for instance, of themselves 865 00:43:13,380 --> 00:43:15,930 and then overlay that T-shirt in a way that 866 00:43:15,930 --> 00:43:19,140 makes it look virtually like they're wearing, if prematurely, 867 00:43:19,140 --> 00:43:20,910 their "I took CS50" T-shirt. 868 00:43:20,910 --> 00:43:23,100 Any of you who've used Google Forms, it turns out 869 00:43:23,100 --> 00:43:25,990 if you poke around with this response validation, 870 00:43:25,990 --> 00:43:30,330 there's a word there called "regular expression" that most typical users 871 00:43:30,330 --> 00:43:31,780 might not even know what it means. 872 00:43:31,780 --> 00:43:35,160 But we introduce students in CS50P to regular expressions 873 00:43:35,160 --> 00:43:39,960 to somehow now bring this familiar Google form UI to students to life, 874 00:43:39,960 --> 00:43:42,870 and, oh, that's what that now means, and just connecting it 875 00:43:42,870 --> 00:43:44,430 to their own real world. 876 00:43:44,430 --> 00:43:48,150 And then, lastly, we now have not only CS50 certificates, PDFs, 877 00:43:48,150 --> 00:43:51,120 that we give to students, proudly congratulating them 878 00:43:51,120 --> 00:43:53,250 on finishing any of CS50's courses. 879 00:43:53,250 --> 00:43:55,260 We now playfully have a problem set where 880 00:43:55,260 --> 00:44:00,000 they generate, for this assignment, a PDF of a shirtificate, which 881 00:44:00,000 --> 00:44:03,390 says their own name, virtually, on the T-shirt here, and then 882 00:44:03,390 --> 00:44:06,240 some other text above and below, so here, too, 883 00:44:06,240 --> 00:44:09,210 just examples along the way of some of CS50's classes 884 00:44:09,210 --> 00:44:13,200 wherein we try to bring fundamentals of procedural programming, still, 885 00:44:13,200 --> 00:44:15,270 but all the more to life. 886 00:44:15,270 --> 00:44:17,520 And the last visuals I thought I'd share with everyone 887 00:44:17,520 --> 00:44:19,890 here are just now some of the course's traditions, which 888 00:44:19,890 --> 00:44:23,850 feed into those earlier missions of accessibility and rigor 889 00:44:23,850 --> 00:44:26,850 but also generating, ultimately, a community among students, 890 00:44:26,850 --> 00:44:29,022 certainly on campus, but even now off. 891 00:44:29,022 --> 00:44:31,230 And some of you might know or heard me allude earlier 892 00:44:31,230 --> 00:44:33,030 to what we call CS50 Puzzle Day. 893 00:44:33,030 --> 00:44:36,690 This is an event that we hold here at Harvard in September of each year 894 00:44:36,690 --> 00:44:41,100 and then online in March or April of the subsequent year for students online, 895 00:44:41,100 --> 00:44:44,820 wherein we give students a printed packet of puzzles-- 896 00:44:44,820 --> 00:44:47,460 not jigsaw puzzles, but logic problems of sorts. 897 00:44:47,460 --> 00:44:50,490 We use this in the first week of CS50 to send the message 898 00:44:50,490 --> 00:44:53,580 that computer science is really about problem-solving more generally. 899 00:44:53,580 --> 00:44:54,930 It's not about programming. 900 00:44:54,930 --> 00:44:57,330 And we invite students to invite their own friends, 901 00:44:57,330 --> 00:44:59,640 even if they've never studied computer science before. 902 00:44:59,640 --> 00:45:01,200 They can use laptops and Google. 903 00:45:01,200 --> 00:45:05,160 But no programming is needed or expected for this event. 904 00:45:05,160 --> 00:45:07,770 And it draws hundreds of students here on campus together, 905 00:45:07,770 --> 00:45:10,020 and in our case, thousands of students online. 906 00:45:10,020 --> 00:45:12,360 But if you follow a traditional semester where 907 00:45:12,360 --> 00:45:15,522 your classes might start in August or September, by all means, 908 00:45:15,522 --> 00:45:16,980 reach out to us after the workshop. 909 00:45:16,980 --> 00:45:20,640 We can provide you with the same packet of puzzles to run the event locally. 910 00:45:20,640 --> 00:45:24,540 Or we'll also do the same on scale the subsequent spring. 911 00:45:24,540 --> 00:45:27,270 We end our semester with the CS50 hackathon. 912 00:45:27,270 --> 00:45:30,030 I alluded to this being our 7:00 PM to 7:00 AM event. 913 00:45:30,030 --> 00:45:32,460 But it can be time-shifted as you see fit, certainly, 914 00:45:32,460 --> 00:45:36,030 when we bring students together just more socially, more collaboratively, 915 00:45:36,030 --> 00:45:40,020 to work on in CS50 their capstone project, their final project, which 916 00:45:40,020 --> 00:45:44,130 is an open-ended challenge at the end of the semester to build most any piece 917 00:45:44,130 --> 00:45:47,535 of software of interest, subject to the guidance of their teaching fellow 918 00:45:47,535 --> 00:45:49,410 or teaching assistant, so that they calibrate 919 00:45:49,410 --> 00:45:52,790 their expectations accordingly, of course, doing this at 7:00 PM 920 00:45:52,790 --> 00:45:53,670 to 7:00 AM. 921 00:45:53,670 --> 00:45:55,470 Not all students make it through the night. 922 00:45:55,470 --> 00:45:59,082 Among my favorite photos is this one here around 4:00 or 5:00 AM. 923 00:45:59,082 --> 00:46:01,290 But at least, in our case, we typically wake students 924 00:46:01,290 --> 00:46:04,480 up at the end of the event for pancakes as well. 925 00:46:04,480 --> 00:46:07,380 And then, lastly, an event that we've long held both on campus 926 00:46:07,380 --> 00:46:10,950 and off is a so-called CS50 Fair, inspired, really, by what I remember 927 00:46:10,950 --> 00:46:12,790 is like a middle-school science fair. 928 00:46:12,790 --> 00:46:15,570 But at this event, we have students gather in a large space 929 00:46:15,570 --> 00:46:19,020 on campus, bringing their laptops at sort of bar-height desks 930 00:46:19,020 --> 00:46:22,470 and just presenting to passersby-- students, faculty, and staff 931 00:46:22,470 --> 00:46:26,820 alike-- what it is they created for that final capstone project. 932 00:46:26,820 --> 00:46:30,000 And we have music and popcorn and candy in the background. 933 00:46:30,000 --> 00:46:32,650 We typically invite alumni or friends from industry 934 00:46:32,650 --> 00:46:35,400 to have their own tables and just chat with students, in our case, 935 00:46:35,400 --> 00:46:39,000 at the university level, about full-time or summertime jobs or the like 936 00:46:39,000 --> 00:46:41,160 or what computer science is like in the real world, 937 00:46:41,160 --> 00:46:43,530 but generally try to make it as much of a social event 938 00:46:43,530 --> 00:46:47,100 as it is academic so that you get expressions and interactions 939 00:46:47,100 --> 00:46:49,620 like these-- students not in the class, not 940 00:46:49,620 --> 00:46:53,310 in computer science, showing off or seeing what their computer science 941 00:46:53,310 --> 00:46:54,600 classmates have had. 942 00:46:54,600 --> 00:46:57,190 This is one of my favorite candid photos we took years ago, 943 00:46:57,190 --> 00:47:00,060 clearly amazed at what he saw. 944 00:47:00,060 --> 00:47:01,770 But indeed, that there is the goal. 945 00:47:01,770 --> 00:47:05,310 And in our case-- and this is something we can sometimes help out with if we 946 00:47:05,310 --> 00:47:06,360 have spares-- 947 00:47:06,360 --> 00:47:09,210 but offering up at the end of the semester, as you see here, 948 00:47:09,210 --> 00:47:15,900 the "I took CS50" T-shirts that mark the end of CS50 students' experience. 949 00:47:15,900 --> 00:47:18,850 And along the way, suffice it to say we at least here on campus 950 00:47:18,850 --> 00:47:20,370 take a lot of photos and videos. 951 00:47:20,370 --> 00:47:22,200 We navigate through language. 952 00:47:22,200 --> 00:47:25,530 We're happy to share what the requisite opt-in or opt-out language is. 953 00:47:25,530 --> 00:47:28,960 Particularly in the K-12 level, you might need parents' blessing as well. 954 00:47:28,960 --> 00:47:32,760 But I would encourage you to consider, if your circumstances allow, capturing, 955 00:47:32,760 --> 00:47:37,140 if teaching CS50 or anything like it, as many of these moments, 956 00:47:37,140 --> 00:47:41,050 academic and otherwise, because it turns out, one, it's a wonderful way 957 00:47:41,050 --> 00:47:43,800 to look back and for your students to look back on what it is they 958 00:47:43,800 --> 00:47:44,770 did in your class. 959 00:47:44,770 --> 00:47:47,340 But it's also a wonderful mechanism for recruiting, 960 00:47:47,340 --> 00:47:50,760 in some sense, to open other students' eyes to what goes on in your 961 00:47:50,760 --> 00:47:54,090 or their friends' classrooms, bringing to life a fairly arcane 962 00:47:54,090 --> 00:47:57,030 otherwise subject like CSS in a way that they might not 963 00:47:57,030 --> 00:47:58,860 have realized was possible. 964 00:47:58,860 --> 00:48:01,260 In the coming sessions today and tomorrow, 965 00:48:01,260 --> 00:48:04,320 you'll see glimpses of some of the lower-level implementation details. 966 00:48:04,320 --> 00:48:07,800 Carter and [? Rangshin ?] alluded to this earlier, 967 00:48:07,800 --> 00:48:10,950 a new tool CS50 uses called VS Code, a.k.a. 968 00:48:10,950 --> 00:48:12,450 Code Spaces in the cloud. 969 00:48:12,450 --> 00:48:15,480 This is a tool that you'll be welcome to use in your own class, 970 00:48:15,480 --> 00:48:17,020 certainly try out this weekend. 971 00:48:17,020 --> 00:48:19,920 It's freely available thanks to Microsoft and GitHub nowadays. 972 00:48:19,920 --> 00:48:23,550 You'll see a little something about how students access this tool now 973 00:48:23,550 --> 00:48:24,510 via the web. 974 00:48:24,510 --> 00:48:27,150 This, though, is consistent with my very first comment 975 00:48:27,150 --> 00:48:31,180 about really in the course accessible, not just in a curricular sense, 976 00:48:31,180 --> 00:48:34,360 but also for teachers and students who might only have Chromebooks 977 00:48:34,360 --> 00:48:37,000 or might have computer labs but no administrative access. 978 00:48:37,000 --> 00:48:41,590 Everything in CS50 can be done with just a browser these days. 979 00:48:41,590 --> 00:48:45,100 And you, the teachers, then, needn't worry about some 980 00:48:45,100 --> 00:48:47,050 of those lower-level details as well. 981 00:48:47,050 --> 00:48:50,020 For those familiar with some of CS50's prior tools, a.k.a. 982 00:48:50,020 --> 00:48:53,830 CS50 IDE, almost all of those features now exist in VS Code, 983 00:48:53,830 --> 00:48:55,750 and more are still to be ported. 984 00:48:55,750 --> 00:48:58,600 This is the environment that you'll soon see that provides students 985 00:48:58,600 --> 00:49:01,870 with a cloud-based programming environment, terminal window, File 986 00:49:01,870 --> 00:49:03,820 Explorer, code tabs, and all. 987 00:49:03,820 --> 00:49:07,090 This is a built-in debugger that, thanks to [? Rangshin, ?] is all the easier 988 00:49:07,090 --> 00:49:11,770 to use at the command line so as to step through, yourself or your students, 989 00:49:11,770 --> 00:49:13,310 code line by line. 990 00:49:13,310 --> 00:49:18,760 This is a VS Code extension that Brian and now [? Rangshin ?] 991 00:49:18,760 --> 00:49:22,583 have created that allows you to implement rubber duck debugging 992 00:49:22,583 --> 00:49:23,500 in your own classroom. 993 00:49:23,500 --> 00:49:25,120 We actually have a whole lot of rubber ducks 994 00:49:25,120 --> 00:49:27,370 that we're happy to send out as best we can, too. 995 00:49:27,370 --> 00:49:30,110 But barring a physical rubber duck in your classroom, 996 00:49:30,110 --> 00:49:32,650 you can use a virtual duck as well, the idea being, 997 00:49:32,650 --> 00:49:35,830 pedagogically, to help students here any illogic in their thoughts. 998 00:49:35,830 --> 00:49:38,950 And all this, too, if curious, can be done locally 999 00:49:38,950 --> 00:49:40,720 on students' own Macs or PCs. 1000 00:49:40,720 --> 00:49:43,270 And for us, this is a goal at the end of the semester. 1001 00:49:43,270 --> 00:49:47,540 We start students with a completely self-service cloud-based environment, 1002 00:49:47,540 --> 00:49:50,932 but ultimately aspire now to off-board them at the end of the course 1003 00:49:50,932 --> 00:49:52,640 so that they can then stand on their own, 1004 00:49:52,640 --> 00:49:55,390 especially if this was the one and only CS course for them. 1005 00:49:55,390 --> 00:50:00,290 And, ultimately, they can now do everything locally as well. 1006 00:50:00,290 --> 00:50:03,280 I hope you'll forgive that I'm just a few minutes after our mark. 1007 00:50:03,280 --> 00:50:05,890 Why don't we officially end this session here? 1008 00:50:05,890 --> 00:50:08,620 I'm happy to stick around in the same Zoom for questions. 1009 00:50:08,620 --> 00:50:16,270 But we will officially return at 12:30 PM, which is in 24 minutes 1010 00:50:16,270 --> 00:50:20,200 here, for a session by Margaret on using the CS50 AP curriculum. 1011 00:50:20,200 --> 00:50:24,560 But, again, it's really also the CS50 and CS50x curriculum as well. 1012 00:50:24,560 --> 00:50:28,900 So it's targeted not just at K-12, but really, audiences younger and older 1013 00:50:28,900 --> 00:50:29,650 alike. 1014 00:50:29,650 --> 00:50:31,570 This, though, was "CS50 Explained." 1015 00:50:31,570 --> 00:50:35,080 Feel free to drop off, do some work, take a break. 1016 00:50:35,080 --> 00:50:38,860 But otherwise, we'll see you again in 23 minutes here. 1017 00:50:38,860 --> 00:50:41,200 And I'll be happy to take questions one-on-one now. 1018 00:50:41,200 --> 00:50:43,260 See you in a bit. 1019 00:50:43,260 --> 00:50:44,000