DAVID J. MALAN: Hello world. This is CS50 Live and this is March 14, which means, happy pi day. Now it's been a while since we've seen you, because last Friday, Rob Bowden and I were actually away at a conference in Atlanta, Georgia. A conference known as SIGCSE, the Special Interest Group on Computer Science Education, which every year brings together some 1,000 educators to talk about and to work on improvements on computer science education. One of the keynote speakers this year, in fact, was the founder of code.org, which you might have seen in the press over the past year. They've done an extraordinary job over the past year getting people excited about computer science, and about programming in particular. In fact, one of their most well known initiatives is known as The Hour of Code which is an opportunity and a curriculum via which you, or a friend, or a family member, or colleague, could get your hands dirty with a bit of computer science and programming for just an hour to see if you take to it. In fact, if you yourself have a friend, family member, or colleague who would like to try his or her hand at some computer science, but you think throwing them into CS50's curriculum might be a bit too much too soon, well by all means, refer them to code.org/learn where they can try their hand for just one hour at a bit of computer science. Or better yet, show them this clip. [VIDEO PLAYBACK] -Hi, I'm Leah. -And I'm Tonya. -And we're lucky enough to be studying computer science. We think it's terrible that 90% of school don't teach it. -They definitely didn't offer it at my high school. -So we're trying to make this video to show that anybody can learn. We want to get 10 million students to do The Hour of Code. -Hour of Code. -Hour of Code. -The Hour of Code. -Hour of Code. -Hour of Code. -Hour of Code. -Hour of Code. -The Hour of Code. -How do you get him to get to the sunflower. He needs to do some actions. -I got it. Yay. -And then we'll run it and see what happens. -Amazing. -There we go. -You just wrote your first program. -I wrote it? -Yeah. -This is the code you just wrote. -Very awesome. -I thought like, code was like FBI hacker, symbols and stuff. -A little bit of problem solving, a little bit of logic. -It's like instructions. -Programming is a lot easier today. -Don't just play on your phone. Program it. -All right. -Awesome. -How does someone go about getting a job? -Maybe take an online class, find a class at a community college. -You can get one of the best paying jobs in the world. -I think medicine's moving into the whole computer age. -Technology touches every part of our lives. If you can create technology, you can change the world. -So we're excited that you're participating in today's Hour of Code. -We just did two lines of code. -Three lines of code. -Four lines. -Seven lines. -Five lines. -16 lines of codes. -99 lines of code. -60 lines. -18 lines of code. -75 lines of code. -It doesn't matter how old you are. -Hour of Code. -Hour of Code. -The Hour of Code. -The Hour of Code. -The Hour of Code. -Whether you're young man or a young woman. Whether you live in a city or rural area. -Everybody in this country should learn how to program a computer. -And I just completed the-- -Hour of Code. -It's actually really easy to learn. -Girls should learn this, too. -Understand that language that's going to be the future. -Anyone can learn computer science. -And you can learn too. -Jack Dorsey, Mark Zuckerberg, Bill Gates, all of y'all, I'm learning. -Give it a shot. [END VIDEO PLAYBACK] Now something tells me that if you're in CS50 or is in CS50x, you've spent well more than just an hour on coding. But for any family members, friends, or colleagues that you'd like to introduce to this world, here's another incentive. Remember this guy? Very popular of late, has been a so-called flappy bird on various platforms. And here we have a URL, at code.org/flappy, where the kind folks at code.org can put together a tool via which you or a friend can make your own implementation of that popular game. So do check it out. Now that conference, and last Friday. Rob Bowden and I where again, away at this conference, and we thought about having a guest host. And we tried out quite a few folks for auditions. None of them seemed to work out, so we thought we'd show you a few clips of what did transpire. [VIDEO PLAYBACK] RAMON GALVAN: I'm Ramon Galvan filling in for your normal host, David Malan. The US military's passcode was 000000, not really safe if you ask me. Nevertheless, I love you. Unlike David, who circles you. Let's not go over this mistake. What is this about? Let's just see a video with Harry Lewis. [END VIDEO PLAYBACK] DAVID J. MALAN: Now, what's most funny about that clip is not how Ramon performed in front of the camera, but how Ramon does not know, until as of a few moments ago, that we were going to play those clips back here for you on the internet. So CS50's own, Ramon Galvan. Coming back perhaps in some future episode. Now meanwhile, you may recall we left last times episode on a bit of a cliffhanger, where we mentioned that Rob Bowden has a twin brother, Paul. Who, again, fancies himself a bit of a comedian. But he also happened to appear in a popular American game show, and we asked you which one. Well several of you wrote in with the answer. And here's one such example. In CS50 live, David mentioned about Robert's twin brother, Paul Bowden, and asked about to Google it. Well looks like he's in Harvard, too. And, Who Wants To Be A Millionaire, and yes, if I'm the first one to report this, David, sir, I would be glad to be famous on the next CS50 live. So consider yourself famous because the answer was indeed, Who Wants To Be A Millionaire. And in fact, pictured here is Paul Bowden alongside that TV show's host. And we also did a bit of digging, and found this clip for you. [VIDEO PLAYBACK] -Paul Bowden from Franklin, New Jersey. Hey Paul. Welcome to the show. -Thank you. -Paul it says here you are a Sophomore at Harvard University, obviously a smart guy. -I guess. -Well in my book that certainly suggests so. And I know when you were standing in line for Millionaire, a sign from heaven said you're probably going to do well, right? -You could say that. When I was standing in line I had a Polo shirt that was tucked in and a bird happened to poop right down the back of my shirt. And it was still tucked in. But it ended up being good luck. -It is good luck, see? There you go, you're here. All right, Paul. Are you ready? -I am ready. -All right. Then let's play Millionaire. And your brother's been sitting behind you, your brother Rob. How are you, Rob? -I'm good how are you? -Twin brother. -Yes. -Now you're, the younger though, you came out six minutes later, right? Is that correct? -I am, yes. -But are you the smarter brother? -Well, I don't want to brag. So I can't answer that. [END VIDEO PLAYBACK] -So Rob has a twin, writes another of your classmates, hmm interesting. How deep does the rabbit hole go? I have a question, why do problem sets take so long to be autograded? What goes on behind the scenes? So we thought this would actually be a good question to answer because it does suggest a bit of an underlying interesting technical details. Contrary to popular belief, they are not in fact graded by Muppets, but rather by an infrastructure that we know as Check 50 on the client. And an infrastructure we know its sandbox 50 on the server side. Now for those unfamiliar, in order to test the correctness of some of CS50's problem set problems, you can run a command in the CS50 appliance known as check 50, where you specify a unique identifier for the test that you want to run. And then you specify the paths to the file or files that you want to upload to the servers for testing. Now, when the response comes back from the server, hopefully you see all green smiley faces, like those here, indicating that I wrote "hello, world" very correctly. By contrast, if I did something wrong, like not actually naming the file correctly, I might get this scary red unhappy face saying hello.c exists, which means it does not in fact, as indicated by the red. And if something's in yellow, meanwhile, it means that those checks didn't even run because of some dependency, some earlier test did not in fact succeed. So what's really happening underneath the hood? Well when you run this check 50 command, we're essentially zipping up all of your files, compressing them, sending them up to see CS50's cluster of servers, where we then create what's called a sandbox around them. Essentially you can think of this as a folder, and as a special user that exists solely for the purpose of compiling and running that specific code in isolation from anyone else's, so that just in case a student has an accidental infinite loop or worse, it's not going to necessarily affect anyone else on the system. Nor can any files be manipulated or deleted that shouldn't be allowed. Now, how does the code get tested? Well, we wrote a whole infrastructure called again, sandbox-- CS 50 sandbox. And this infrastructure is written, surprise, in a language called JavaScript. Which you might know, from clientside experiences, but it turns out you can also use JavaScript on the server side. What do some of the tests actually look like? Well here's some server side JavaScript code, and it's just an excerpt thereof. But this represents two checks that we might run on your code. The first of which up top there, checks whether the file hello.c exists, and the second one actually checks if your file compiles OK. And that is what ultimately generates those unhappy faces or those happy faces that you see in the form of check 50 results. Now, for much more technical detail, you're welcome to take a look at this paper here, which coincidentally was actually presented at last year's SIGCSE conference, and it dives into much more detail as to how that system works and why we built it last year. Now, in the media of late, has been this expression here-- goto fail, the so-called goto fail bug that plagued Apple Computer recently. Now, we don't introduce this in CS 50, because the goto statement in C is generally frowned upon, even though it definitely has its uses. And what this means here, goto fail, is that whatever program has this line of code, should go to, that is jump to, another line of code irrespective of any lines in between it, and that line of code will be labeled with the keyword fail. And fail could be anything, a FUBAR [? BES ?] but in this case, Apple chose to call it fail because it's the chunk of code that should execute if and when something has failed. Now, unfortunately, Apple made a mistake with this statement, as we'll soon see. And they recently released this announcement in one of their bug fix reports. An attacker with a privileged network position may capture or modify data in sessions protected by SSL/TLS. SSL, recall, was secure sockets layer, and it's the technology used to typically encrypt traffic between a web browser, say on a Mac or an iPhone, or any other device, and a web server. And TLS is related to that. This issue was addressed by restoring missing validation steps. So this was Apple's description of the problem and solution thereto. But what did this really mean? So we did some digging, and we actually found the source code for Apple's own implementation of SSL, which again affects Macs or iPhone, particularly if you're using Safari on those computers. Here's an excerpt from that code. Now, you might not recognize some of the functions. And you might not recognize the use of a go to statement up until now. But this is somewhat familiar syntax. We have some if conditions, some indentation, a function, curly braces. So not all that foreign. But let's zoom in a little bit. Here, adjust to those conditions, and here's mention of goto fail. Now, what is fail? Well let's actually scroll down further in the program. These are the lines of code, those three lines that are executed if you do indeed go to fail. Now, what's the issue then? Well, let's go back up to those conditions where I've highlighted in yellow all mentions of goto fail. See anything curious? Focus on the bottom there. Right? The code might be new, but the ideas are not. If we zoom in here, you'll notice that the programmer has written goto fail twice, but indented both of them. But you may have made this same mistake yourself in some problems for CS 50. Just because you indent two lines of code inside of a condition does not mean that they're both going to execute. They're only both going to execute if you actually surround both of them with what? Curly braces. So what's really happening if I sort of fix the indentation and don't add any curly braces, what's really happening underneath the hood, is that goto fail has essentially left alliance here, which means it's going to execute no matter what. And you're going to go to, or jump to, those three lines of code we looked at a moment ago. So what's the implication? Well, take a look at those bottom most two lines right here. Those lines will never, ever get reached. Because no matter what, that second goto fail is going to compel the program to jump right over those lines. And long story short, those last two lines are actually important for the correctness of SSL. Indeed, if they do not execute, it is possible or an adversary, a bad guy, to wage what is generally known as a man in the middle attack, pretending to be a secure website like Facebook, or Amazon, or Google. But really just see-- having an encrypted connection to you, and they then forward your traffic along, for better or for worse. Possibly your username, possibly your password, possibly your credit card information, to the actual site in question. Or not even at all. In other words, this breaks SSL. Now thankfully, Apple did address this. Both for Mac OS and iOS recently. But if you'd like to double check your computer is now up to date, assuming you have auto updates on, head to gotofail.com and you'll see a nice little test that will tell you as much. Meanwhile, if you'd like to take a look at the actual source code, this is a long URL, but here's the entire source code for that file if you'd like to get a sense of what the real world programming is like, and frankly real world bugs. Speaking of bugs, this meme was circulated quite a bit of late. 99 little bugs in the code, 99 little bugs in the code, take one down, patch it around, 127 little bugs in the code. So what is this referring to? Possibly, this is an experience you yourself have had, where you try to chase down some bug, and then another, or maybe even more bugs spring up as a result of your having tried to address one problem. In fact, for this to hit home even further, let's pull up a face that is perhaps familiar. Hal, from Malcolm in the Middle. [VIDEO PLAYBACK] [MUSIC PLAYING] [END VIDEO PLAYBACK] DAVID J. MALAN: And now some hellos from some of your classmates. Up first is Khalid, and a friend of his who hail from northern Virginia in the United States. KHALID: Ahoy CS50 mates, my name is Khalid [INAUDIBLE]. Meet my parrot, [INAUDIBLE] I live in northern Virginia. I'm an eighth grader and I'm excited to be part of CS50 class. This is great to experience a college but stay at home. As you can guess, I am enrolled in the online learning program. Feel free to experience my first project here. See you around. DAVID J. MALAN:And now let's head to Kansas City, Missouri where Derek awaits. Derek was at work when he filmed this so you might hear a bit of noise in the background since he works in a data center. DEREK MITCHELL: Hello world, my name is Derek Mitchell. I am in Kansas City, Missouri. And I'm taking the CS50 class because I really need to learn some programming for my job. This is where I work. I am a regional support technician for Cabela's, world's foremost outfitter. And I'm just trying to learn some more programming so I can excel at my career and just be a better technician. So again, my name is Derek Mitchell and this is CS50. [SPEAKING ITALIAN] FEDERICO: Hello world. My name is Federico Grivelli. I am from Italy. I was born in one of the largest cities in the country, Milan. And I was actually raised in a smaller city next to Milan. So here starts my desire on expanding my horizons. And this why today I am a foreign exchange student in Washington state. Of course, the United States of America. So American education is really different from Italian. Here I get much more hands on experience, rather than studies and memorization. So this was me, my name again is Federico Grivelli, and this is a CS50. DAVID J. MALAN: And now a hello from someone we weren't expecting. SARAH COFFEY: Hello world. My name is Sarah Coffey, I'm from Maltham, Massachusetts, and I'm married to CS50's own Dan Coffey. Dan, I just wanted to wish you a very happy birthday. DAVID J. MALAN:He doesn't know this is about to happen, but CS50's own, Danny Coffey, is right now in the control room. But is about to be on the internet, because today is 29th birthday. Come on out Dan. Please come out, Dan, otherwise this is about to be very awkward. Dan? This year is Dan Coffey, did not know this was going to be happening-- we of course have prepared this. So happy 29th birthday, and we hope you are, indeed, surprised. No, that, other way, other way. No it was. DAN COFFEY: There we go. DAVID J. MALAN: Dan Coffey, everyone. Thank you very much Dan, for coming out. And now, 60 seconds of pandas. [VIDEO PLAYBACK] [MUSIC PLAYING] [END VIDEO PLAYBACK] DAVID J. MALAN: Now you may recall from a recent episode, that we introduced LaunchCode, an initiative in Saint Louis, Missouri, run by volunteers who have been following along with CS50's curriculum and guiding citizens of Saint Louis through that material toward an end of helping to pair them with programming jobs at the end of the semester. You may recall in fact, that this initiative was so popular in Saint Louis, that they nearly overflowed the local opera house. Well, LaunchCode's founders very graciously came to campus recently and agreed to sit down with us in Sanders Theatre for a chat about what LaunchCode is and how it's been going on. DAVID J. MALAN:We're here today with our friends from LaunchCode who have flown in all the way from St. Louis to say hello. Hello everyone. JIM MCKELVEY:Hello. DAVID J. MALAN: Who do we have here with us today from LaunchCode. JIM MCKELVEY: So, I'm Jim McKelvey. BRENDAN LIND:And I'm Brendan Lind. ZACH LOU: And I'm Zach Lou. DAVID J. MALAN: And for those unfamiliar, could you tell us a little about what LaunchCode is? JIM MCKELVEY: So LaunchCode is a job placement system that we are pioneering starting in St. Louis, but we're going to bring it nationwide. The idea basically is to get companies to change their hiring practices to accept people who have nontraditional credentials. So as we know, as programmers, that a lot of the best programmers are self-taught to some extent. And companies don't necessarily recognize this in their hiring practices. So if you're a good coder, you still don't necessarily have a way to a good job. And so, we started working with a hundred companies from billion dollar firms like Enterprise, and MasterCard, down to two-man start-ups. And we've gotten them all to agree to take LaunchCode candidates into, basically an apprenticeship system. DAVID J. MALAN: And how did you find CS50's materials in the first place. JIM MCKELVEY: So it was really funny. My wife took your class online through Harvard Extension. And she took Fall 2012 CS50. And while we were, I'm a computer scientist by training. And so I was helping her through the class, I was watching it. And she said, you know, this is being offered online through edX, and we're placing these people, who have very little traditional credentials, and we're like, this would be fantastic. So that's how we found out about it. Through m wife, Anna. And your Harvard Extension Program. DAVID J. MALAN: That's funny. It's such a small decision, her taking the classes had such an impact then. JIM MCKELVEY: It was super lucky. And we were really excited to see that you guys were working with edX and making it available, and all the supplemental materials. And it's fantastic resource for training. DAVID J. MALAN:OK. Well, in the news, we actually came across a look at what the first night of LaunchCode was when you were in the opera house. Can you give us a firsthand account of what your experience was like that evening? JIM MCKELVEY: Yeah, so I was in Rome. And Brendan called me at 3:00 in the morning, and said, we've overflowed all three venues. So we had the Christ Church Cathedral, the Downtown Library, and the Soldiers Memorial, which are three fairly large venues. And we were expecting a few hundred people. We had over 1,000 people sign up. So we overflowed everything and Brendan calls me, like, we need a bigger building. And they got us this giant, this giant opera house, where we held the first class. DAVID J. MALAN: Oh that's great. JIM MCKELVEY:And people were so grateful. I mean, the people who we are reaching are people who you just want to help these folks. DAVID J. MALAN: And from what you've seen, just how realistic is it, someone who enters the course with no prior background. And some months later, they have 13 weeks of CS50 under their belt to actually feel confident enough and be qualified enough for an actual programming job. JIM MCKELVEY: So David, we really don't know, OK? Because we haven't done it at any sort of scale yet. You know, our data points right now are what I've learned was possible. And then the 50 some people that we've placed, we know generally where they are. And our guess is that somebody who comes through CS50 is going to be generally as skilled as some of the people we have already successfully placed. So we haven't proven its scale yet. And I'm not saying that it's a complete in education by any means. But it's such a great start. And it gives people a context. And it also, you know, it's a rigorous class. So anyone who completes this class has proven something. That they've demonstrated some character or a combination of you know, either tenacity or intelligence, or whatever that magical formula is that gets them through the pretty tough class, we think that's going to bode very well for their success. And we have companies that are willing to back up on that. So, so we don't really know. But we're very optimistic that anyone who gets through CS50, we can get a job. BRENDAN LIND: And the thing is that LaunchCode is not like your typical entry level hire. Right, it's not where you come in and say normally you might need a C.S. degree and two years of work experience to get a lot of jobs, right? But then, LaunchCode comes in, you don't need any of those things. You don't need to be qualified to that point. Where you have to be is have that aptitude and drive to get to that level. So it's an apprenticeship. And it lasts until you're at that level, where you would be brought in for the normal position. And the company can let you go at any point. DAVID J. MALAN: So the companies are the ones doing, ultimately, that initial partnership. BRENDAN LIND: Right. So what CS50-- what we're doing trying to do with CS50 is get them to the point where then, hey if you can take CS50, like you have that drive, you have that will to learn, and you have that aptitude to self-learn and work in a company, to handle whatever it is that is needed. And then we can get them, we get them in the door. And they get paid, they get paid $15 an hour for the duration apprenticeship. And whenever they're ready, the company turns them into a salaried position. If they don't, if the company doesn't think that they're on their way, they can let them go. And so far, that success is that pretty much everybody is still with their company. DAVID J. MALAN:OK. So right now you're focused on Saint Louis, but I gather you'd like to take the initiative nationally. So what is indeed next for you? JIM MCKELVEY: So next are a series of cities around the country. So, we don't want to go national until we refine the model, and maybe laid a couple of those sidewalks through the dirt. The completion of this first CS50 class is going to be really important, because we're getting good data from that. But once we know what works and what we really should be doing and scaling, then we're going to scale as quickly as possible, because the need exists everywhere. And we're not trying to make this some sort of local, Saint Louis phenomenon. We're just using that as a test bed. And then we'll be expanding you know, as quickly as we can to places that have similar needs. DAVID J. MALAN: Well, thank you so much for everything you've been doing. We're flattered to even be part of it. It's been quite inspiring. JIM MCKELVEY: Thank you. This has been so generous of just a world class education that is available for people who genuinely appreciate it. I wish you could meet some of the students and see the people who you know, it's changing lives. And I just wish we could reach through the cameras and bring them here. But it's so meaningful. And it's moving the needle and it's really good. So thank you. DAVID J. MALAN: Thank you from us as well. Appreciate it. Thanks so much for joining us. launchcodestl.com for more. So we got chatting shortly after that chat about what more we could do. And we came upon the following. We are so pleased to announce the first ever CS50 Hackathon that will be going on the road to Saint Louis. The LaunchCode edition. In fact, we will be taking with us, if you'd like to meet these folks. If you yourself hail from St. Louis, or would ultimately like to tune in online, CS50's own Andrew will be there. CS50's Chang, Colton, Dan, whom you just met, Devin, Gabriel, Jason, Ramon, who you also met earlier. Rob Bowden, Shelly, whom you may remember from such films as-- and [? Zemaila ?]. So indeed, if you would like to join us in St. Louis or online at live.cs50.net, tune in for the next live show on Friday March 28 at 6:00 PM Eastern Time. We're going to be awake for quite a few hours that evening. And we hope you'll stay up with us as well. That's it for this week's CS50 Live. Thanks so much to everyone behind the camera. Thanks so much to our contributors. We'll see you in St. Louis, this was CS50. RAMON: What does the fox say?