WEBVTT X-TIMESTAMP-MAP=LOCAL:00:00:00.000,MPEGTS:900000 00:00:00.000 --> 00:00:00.625 >> [MUSIC PLAYING] 00:00:11.341 --> 00:00:12.090 NOW: Hello, world. 00:00:12.090 --> 00:00:14.330 This is CS50LIVE. 00:00:14.330 --> 00:00:17.792 We have such a good episode for you. 00:00:17.792 --> 00:00:22.110 The CEO of YouTube, a bug in Internet Explorer, 00:00:22.110 --> 00:00:26.750 the worst video game ever, and a field trip to Valve Software. 00:00:26.750 --> 00:00:33.040 But first, a trip to Tokyo, Japan where President Obama recently played 00:00:33.040 --> 00:00:36.066 soccer with a good friend of mine. 00:00:36.066 --> 00:00:37.050 >> [VIDEO PLAYBACK] 00:00:43.930 --> 00:00:44.430 -Wow. 00:00:44.430 --> 00:00:45.414 He's moving. 00:00:45.414 --> 00:00:47.382 >> -I can kick a soccer ball too. 00:00:47.382 --> 00:00:49.842 Here I go. 00:00:49.842 --> 00:00:53.286 >> -Hey, good job. 00:00:53.286 --> 00:00:54.687 >> [END VIDEO PLAYBACK] 00:00:54.687 --> 00:00:55.520 DAVID: Hello, world. 00:00:55.520 --> 00:00:57.110 I'm here with CS50's own Colton Ogden. 00:00:57.110 --> 00:00:58.430 >> COLTON OGDEN: Hello, everybody. 00:00:58.430 --> 00:00:59.940 >> DAVID: And who else do we have with us here today? 00:00:59.940 --> 00:01:02.606 >> COLTON OGDEN: This is Now, our little robotic buddy from France. 00:01:02.606 --> 00:01:05.299 DAVID: So I actually met NO alongside [? Rob Boden ?] 00:01:05.299 --> 00:01:07.590 when he and I were in Atlanta, Georgia a few weeks back 00:01:07.590 --> 00:01:09.890 as you may recall at SIGCSE, the Special Interest 00:01:09.890 --> 00:01:12.940 Group for Computer Science Education, where literally walking around 00:01:12.940 --> 00:01:14.919 the conference room floor was this guy. 00:01:14.919 --> 00:01:16.960 Well as it turns out, when we came back to campus 00:01:16.960 --> 00:01:20.360 we discovered that Professor [INAUDIBLE] of Harvard's robotics lab 00:01:20.360 --> 00:01:22.220 actually had a Now here on campus. 00:01:22.220 --> 00:01:24.742 And she's kindly allowed us to program him for you today. 00:01:24.742 --> 00:01:27.950 COLTON OGDEN: Yes, and actually, David, I think Now wants to say hello to you 00:01:27.950 --> 00:01:30.450 if you want to walk around the table here. 00:01:30.450 --> 00:01:32.815 >> DAVID: Right here? 00:01:32.815 --> 00:01:33.315 All right. 00:01:36.060 --> 00:01:36.560 All right. 00:01:39.400 --> 00:01:40.650 >> NOW: Hello, David. 00:01:40.650 --> 00:01:42.040 Nice to meet you. 00:01:42.040 --> 00:01:43.960 >> DAVID: Hello, Now. 00:01:43.960 --> 00:01:45.000 Shake his hand? 00:01:45.000 --> 00:01:48.510 >> COLTON OGDEN: Shake his hand up and down. 00:01:48.510 --> 00:01:50.310 >> DAVID: OK. 00:01:50.310 --> 00:01:52.435 >> COLTON OGDEN: And then he'll go ahead and sit down. 00:01:52.435 --> 00:01:54.476 And if you're interested, I can actually show you 00:01:54.476 --> 00:01:56.715 how I was able to get him to do all these things too. 00:01:56.715 --> 00:01:57.200 >> DAVID: Yeah, absolutely. 00:01:57.200 --> 00:01:58.320 >> COLTON OGDEN: He's a little off balance this morning. 00:01:58.320 --> 00:02:00.174 He hasn't had his coffee yet. 00:02:00.174 --> 00:02:01.840 DAVID: So what is this we're looking at? 00:02:01.840 --> 00:02:04.680 COLTON OGDEN: So we're looking at here is a core graph, which is now 00:02:04.680 --> 00:02:07.920 a graphical programming environment, which is very similar to Scratch 00:02:07.920 --> 00:02:09.317 that CS50 uses. 00:02:09.317 --> 00:02:11.150 Here we see it's set up like a flow diagram. 00:02:11.150 --> 00:02:13.370 And we have a bunch of these little building blocks here. 00:02:13.370 --> 00:02:16.203 Now if we take a look at this one for example, it's called stand up. 00:02:16.203 --> 00:02:19.190 And this block says stand up for the Now, whether he's sitting down 00:02:19.190 --> 00:02:20.320 or whatever. 00:02:20.320 --> 00:02:22.990 >> Then we see it goes into tactile head, which basically 00:02:22.990 --> 00:02:26.070 waits for a tap on top of his head as you saw earlier. 00:02:26.070 --> 00:02:31.190 Move to means move in an x, y, and z direction to a specific destination. 00:02:31.190 --> 00:02:33.980 Handshake is a module I wrote, which basically says, hello, David. 00:02:33.980 --> 00:02:34.688 Nice to meet you. 00:02:34.688 --> 00:02:36.089 Waits for a handshake. 00:02:36.089 --> 00:02:37.630 Sit down is the opposite of stand up. 00:02:37.630 --> 00:02:38.796 He'll go ahead and sit down. 00:02:38.796 --> 00:02:40.610 And then head movement is a loop whereby he 00:02:40.610 --> 00:02:42.090 will move his head in random directions. 00:02:42.090 --> 00:02:42.520 >> DAVID: Interesting. 00:02:42.520 --> 00:02:44.890 So even though these don't look like the puzzle pieces from Scratch, 00:02:44.890 --> 00:02:45.950 it's really the same idea. 00:02:45.950 --> 00:02:48.210 And you're wiring a program using these building blocks. 00:02:48.210 --> 00:02:49.020 >> COLTON OGDEN: Yes, exactly. 00:02:49.020 --> 00:02:50.590 >> DAVID: So you said you made one of them, handshake. 00:02:50.590 --> 00:02:51.990 Can we zoom in on that one? 00:02:51.990 --> 00:02:52.131 >> COLTON OGDEN: Sure. 00:02:52.131 --> 00:02:53.642 We'll take a look here at handshake. 00:02:53.642 --> 00:02:56.350 And we'll see it's set up very similar to the other flow diagram. 00:02:56.350 --> 00:02:58.850 We start off with the hello block, which [INAUDIBLE] says, hello, David. 00:02:58.850 --> 00:03:00.030 Nice to meet you. 00:03:00.030 --> 00:03:01.430 This right here is a loop. 00:03:01.430 --> 00:03:02.940 It says, detect arm movement. 00:03:02.940 --> 00:03:05.230 So it will in an infinite loop wait until its arm 00:03:05.230 --> 00:03:06.620 has been raised up and down. 00:03:06.620 --> 00:03:09.370 And then once that's happened, it'll go ahead and do these things. 00:03:09.370 --> 00:03:13.280 Set stiffness OK and go to end, which basically means send him back 00:03:13.280 --> 00:03:14.309 to his default position. 00:03:14.309 --> 00:03:15.100 DAVID: Interesting. 00:03:15.100 --> 00:03:17.910 Are you restricted to only using this graphical environment 00:03:17.910 --> 00:03:19.070 to program him in this way? 00:03:19.070 --> 00:03:19.820 >> COLTON OGDEN: Actually, no. 00:03:19.820 --> 00:03:21.950 If we go ahead and double click any of these building blocks, 00:03:21.950 --> 00:03:24.420 we can see that there's actually python code underneath the hood, 00:03:24.420 --> 00:03:26.000 powering each of these building blocks. 00:03:26.000 --> 00:03:26.750 >> DAVID: Ah, indeed. 00:03:26.750 --> 00:03:29.250 So for those unfamiliar, python is an interpreted language, 00:03:29.250 --> 00:03:32.240 very similar in spirit to PHP, which we use in CS50. 00:03:32.240 --> 00:03:35.344 And much like you can use PHP for web programming, 00:03:35.344 --> 00:03:37.010 you can also use it at the command line. 00:03:37.010 --> 00:03:39.426 And as Colton is doing here in this graphical environment, 00:03:39.426 --> 00:03:41.674 writing programs and then transmitting it via Wi-Fi-- 00:03:41.674 --> 00:03:42.590 COLTON OGDEN: Correct. 00:03:42.590 --> 00:03:43.310 DAVID: --to now. 00:03:43.310 --> 00:03:44.550 Would you have some time to stick around? 00:03:44.550 --> 00:03:45.350 >> COLTON OGDEN: Absolutely. 00:03:45.350 --> 00:03:45.710 >> DAVID: All right. 00:03:45.710 --> 00:03:48.970 Well, before Colton comes back with us for a little bit of a surprise, 00:03:48.970 --> 00:03:54.470 we now-- get it?-- have 60 seconds of former CS50 students auditioning 00:03:54.470 --> 00:03:55.844 to become teaching fellows. 00:03:55.844 --> 00:03:56.510 [VIDEO PLAYBACK] 00:03:56.510 --> 00:03:57.411 -Thank you. 00:03:57.411 --> 00:03:58.910 Thank you, everyone, for being here. 00:03:58.910 --> 00:04:00.510 >> -Hey, Mr. Bunny. 00:04:00.510 --> 00:04:02.120 >> -Welcome to this brief tutorial on-- 00:04:02.120 --> 00:04:03.810 >> [INAUDIBLE] fun with Twinkies. 00:04:03.810 --> 00:04:04.310 -Wait. 00:04:04.310 --> 00:04:05.040 Stop. 00:04:05.040 --> 00:04:07.121 >> -So now we have a problem. 00:04:07.121 --> 00:04:07.620 -It's not. 00:04:07.620 --> 00:04:08.869 And I'm going to tell you why. 00:04:08.869 --> 00:04:10.860 -A loop is repetition, like-- 00:04:10.860 --> 00:04:12.970 >> -Sort of a black box. 00:04:12.970 --> 00:04:13.935 >> -OK. 00:04:13.935 --> 00:04:15.160 I think I get it. 00:04:15.160 --> 00:04:15.660 -All right. 00:04:15.660 --> 00:04:17.140 So now I'm in a slightly hard part. 00:04:17.140 --> 00:04:18.800 >> -That's right. 00:04:18.800 --> 00:04:20.485 8 bits make a byte. 00:04:20.485 --> 00:04:24.176 >> -You take a byte and you separate it into chunks of four. 00:04:24.176 --> 00:04:26.423 >> -Beep, beep, beep, beep, beep. 00:04:26.423 --> 00:04:28.018 Beep, beep, beep, beep, beep. 00:04:28.018 --> 00:04:29.380 >> -It seems overly complicated. 00:04:29.380 --> 00:04:30.460 >> -So let's do this again. 00:04:30.460 --> 00:04:32.580 >> -If I confuse you, please feel free to stop me. 00:04:32.580 --> 00:04:33.620 >> -But wait a second. 00:04:33.620 --> 00:04:36.940 >> -Well, let's look back at the slide and break things down step by step. 00:04:36.940 --> 00:04:41.720 >> -If you remember, memory is broken up into byte-size pieces. 00:04:41.720 --> 00:04:44.080 >> -So here we have the best case scenario. 00:04:44.080 --> 00:04:46.290 >> -This is a considerable improvement over-- 00:04:46.290 --> 00:04:47.715 >> -A web browser, like Chrome. 00:04:47.715 --> 00:04:49.421 >> -It's always necessary to free any-- 00:04:49.421 --> 00:04:49.920 -People-- 00:04:49.920 --> 00:04:50.880 -You may run across. 00:04:50.880 --> 00:04:53.460 And the code can get somewhat cumbersome. 00:04:53.460 --> 00:04:55.640 >> -And that is all you need. 00:04:55.640 --> 00:04:56.960 >> -Boom! 00:04:56.960 --> 00:04:59.140 >> DAVID: Now CS50's own Dan Coffey and I recently 00:04:59.140 --> 00:05:01.850 had an opportunity to travel out to Mountain View, California, 00:05:01.850 --> 00:05:03.740 which is where the headquarters of Google is. 00:05:03.740 --> 00:05:07.350 And we had a chance to chat with Susan Wojcicki, the CEO of YouTube. 00:05:07.350 --> 00:05:10.920 It was actually in Susan's garage years ago in the '90s 00:05:10.920 --> 00:05:14.620 that Google itself was started by Larry and Sergey. 00:05:14.620 --> 00:05:17.430 >> Well, it turns out that Susan herself actually took CS50 00:05:17.430 --> 00:05:18.950 just a few years before I did. 00:05:18.950 --> 00:05:21.450 And I think it's striking as you'll soon hear just how 00:05:21.450 --> 00:05:25.040 much an introduction to computer science so influenced her life. 00:05:25.040 --> 00:05:26.892 She'd like to say hello. 00:05:26.892 --> 00:05:28.100 SUSAN WOJCICKI: Hello, world. 00:05:28.100 --> 00:05:29.620 I'm Susan Wojcicki. 00:05:29.620 --> 00:05:31.500 I'm the CEO of YouTube. 00:05:31.500 --> 00:05:36.570 And I took CS50 when I was a senior at Harvard in 1990. 00:05:36.570 --> 00:05:38.710 >> I was actually a history and literature major. 00:05:38.710 --> 00:05:44.180 And my junior summer I realized that maybe I 00:05:44.180 --> 00:05:46.450 wanted to learn something about computers. 00:05:46.450 --> 00:05:48.350 And so I came back. 00:05:48.350 --> 00:05:49.870 I took CS50. 00:05:49.870 --> 00:05:54.340 It was hard, but it was the most amazing class I took. 00:05:54.340 --> 00:05:57.030 It changed how I think about everything. 00:05:57.030 --> 00:06:03.200 >> And when I graduated from Harvard in 1990, I went to Silicon Valley 00:06:03.200 --> 00:06:04.500 and I got a job. 00:06:04.500 --> 00:06:07.490 And I've been working in tech ever since. 00:06:07.490 --> 00:06:09.780 So CS50 changed my life. 00:06:09.780 --> 00:06:12.320 I continue to learn and build. 00:06:12.320 --> 00:06:13.870 It gave me a great foundation. 00:06:13.870 --> 00:06:17.100 And I'm continuing to learn every day as the technology changes. 00:06:17.100 --> 00:06:19.660 >> And I think it's wonderful that you're all taking it 00:06:19.660 --> 00:06:22.840 because that's how the world is going to change going forward. 00:06:22.840 --> 00:06:27.490 There's just going to be more and more opportunity and innovation. 00:06:27.490 --> 00:06:31.010 Digital is going to affect our lives even more than it already has. 00:06:31.010 --> 00:06:33.870 And it's wonderful that you're all taking CS50. 00:06:33.870 --> 00:06:35.890 So this is CS50. 00:06:35.890 --> 00:06:38.080 >> DAVID: So if you've been looking for a new reason 00:06:38.080 --> 00:06:41.502 not to use a certain browser, here's a good one for you. 00:06:41.502 --> 00:06:43.210 I recently received-- along with everyone 00:06:43.210 --> 00:06:45.120 at Harvard University-- this email here. 00:06:45.120 --> 00:06:46.910 >> "Dear Members of the Harvard Community. 00:06:46.910 --> 00:06:50.930 The US Department of Homeland Security recommends that all users temporarily 00:06:50.930 --> 00:06:54.350 discontinue the use of Microsoft Internet Explorer, IE, 00:06:54.350 --> 00:06:56.270 due to a critical security flaw." 00:06:56.270 --> 00:07:01.250 >> This is documented actually in Microsoft Security Advisory 2963983. 00:07:01.250 --> 00:07:05.242 Vulnerability in Internet Explorer could allow remote code execution. 00:07:05.242 --> 00:07:07.200 Now what does this mean and what is the threat? 00:07:07.200 --> 00:07:08.950 Well, consider this diagram here, which we 00:07:08.950 --> 00:07:12.160 use in CS50 to talk about HTTP or web traffic. 00:07:12.160 --> 00:07:15.140 If we have here a web server and on the other side 00:07:15.140 --> 00:07:17.589 a browser-- Internet Explorer in this case-- of course, 00:07:17.589 --> 00:07:19.380 a browser when it first requests a web page 00:07:19.380 --> 00:07:21.310 might send an HDP message like this. 00:07:21.310 --> 00:07:26.470 GET index.HTML using version 1.1 of the protocol known as HTTP. 00:07:26.470 --> 00:07:30.820 >> Now in this case, if a bad guy has somehow had access to this web server 00:07:30.820 --> 00:07:33.990 and installed on it an exploit so to speak, 00:07:33.990 --> 00:07:36.990 he or she might be able to convince the web server to return this. 00:07:36.990 --> 00:07:41.040 Not only index.HTML itself as requested, but embedded inside 00:07:41.040 --> 00:07:43.720 of that index.HTML file could, of course, be other assets. 00:07:43.720 --> 00:07:47.230 In particular, something like exploit.SWF, 00:07:47.230 --> 00:07:50.620 a flash file that ultimately takes advantage of this security 00:07:50.620 --> 00:07:54.940 technique, heap feng shui, which is a fancy way of saying that the code 00:07:54.940 --> 00:07:59.940 inside of that flash file sprays the so-called heap inside of the computer's 00:07:59.940 --> 00:08:04.090 browser with all different chunks of memory that are designed ultimately 00:08:04.090 --> 00:08:05.810 to overwrite big chunks of memory here. 00:08:05.810 --> 00:08:09.150 >> If you recall this from our discussion in CS50 of the heap and the stack 00:08:09.150 --> 00:08:11.070 and memory management more generally. 00:08:11.070 --> 00:08:14.280 Now the memory that's actually thrown on the heap 00:08:14.280 --> 00:08:16.280 are really called flash vector objects. 00:08:16.280 --> 00:08:17.870 And this is something with which you might be familiar 00:08:17.870 --> 00:08:19.880 if you yourself had programmed Flash before. 00:08:19.880 --> 00:08:24.070 But one of those objects in particular is known as a flash media sound object. 00:08:24.070 --> 00:08:28.190 >> And herein lies an opportunity because what this exploit then proceeds to do 00:08:28.190 --> 00:08:31.540 is corrupt this chunk of memory, this object in memory, 00:08:31.540 --> 00:08:36.640 such that it tries to make this hexadecimal address executable, thereby 00:08:36.640 --> 00:08:40.600 trying to trick the program ultimately to executing some shell code so 00:08:40.600 --> 00:08:44.560 to speak, or bad guy's code, that's ultimately stored at this address here, 00:08:44.560 --> 00:08:49.530 which was injected by way of downloading unknowingly that particular flash file. 00:08:49.530 --> 00:08:53.220 >> Now the end result could be whatever the adversary wants to do to your computer. 00:08:53.220 --> 00:08:56.290 He or she could delete your files, move your files, email your files, 00:08:56.290 --> 00:08:59.960 or really do anything that you yourself could do as the owner of that computer. 00:08:59.960 --> 00:09:01.600 And that's why the threat is so scary. 00:09:01.600 --> 00:09:04.370 It allows truly anyone on the internet whose website you 00:09:04.370 --> 00:09:08.590 might visit to execute arbitrary programs on your computer. 00:09:08.590 --> 00:09:11.550 >> Now thankfully, Microsoft very recently released a fix for this 00:09:11.550 --> 00:09:14.800 because the problem actually afflicted Internet Explorer 6 00:09:14.800 --> 00:09:16.210 all the way up through 11. 00:09:16.210 --> 00:09:19.530 So it's been with us for quite some time and was only recently discovered. 00:09:19.530 --> 00:09:23.120 So if you have automatic updates turned on, you should be OK soon. 00:09:23.120 --> 00:09:26.340 But just to be safe, you could surely switch to some other browser at least 00:09:26.340 --> 00:09:27.300 in the meantime. 00:09:27.300 --> 00:09:29.650 >> Now it turns out too that Microsoft very generously 00:09:29.650 --> 00:09:33.640 also released a fix for Windows XP, an older version of Windows for which 00:09:33.640 --> 00:09:37.040 support was actually officially discontinued just a few weeks ago, 00:09:37.040 --> 00:09:40.880 but this threat was so bad that they also rolled out a fix for that OS 00:09:40.880 --> 00:09:41.810 as well. 00:09:41.810 --> 00:09:43.400 >> Now in other news this week was this. 00:09:43.400 --> 00:09:46.632 The Atari 2600, an older game console that a cousin of mine 00:09:46.632 --> 00:09:49.340 actually had growing up on which we used to play video games when 00:09:49.340 --> 00:09:50.630 we would visit their house. 00:09:50.630 --> 00:09:54.420 Now in any case, why this was in the news was for the following reason. 00:09:54.420 --> 00:09:57.180 Back in the '80s, the company behind this device, Atari, 00:09:57.180 --> 00:09:59.870 decided to bury in a landfill in New Mexico 00:09:59.870 --> 00:10:02.510 a whole bunch of old games and instruction manuals 00:10:02.510 --> 00:10:05.050 and the like that would otherwise have gone unsold. 00:10:05.050 --> 00:10:09.320 >> Now over time, the burial of these games become a bit of an urban myth. 00:10:09.320 --> 00:10:12.690 People didn't really know for sure whether this had actually happened even 00:10:12.690 --> 00:10:16.080 though, as myth went, the company had even poured a layer of concrete 00:10:16.080 --> 00:10:18.630 on top of everything in the landfill to prevent kids 00:10:18.630 --> 00:10:22.150 from actually rustling through it, trying to find free video games. 00:10:22.150 --> 00:10:26.310 Well, it turns out that a documentary is now in progress now in 2014. 00:10:26.310 --> 00:10:30.900 And a team of excavators has been trying to dig up the truth behind this story 00:10:30.900 --> 00:10:32.240 if it's indeed there. 00:10:32.240 --> 00:10:33.330 >> And guess what they found? 00:10:33.330 --> 00:10:35.940 Well, not exactly this guy, but thousands 00:10:35.940 --> 00:10:38.220 of copies of his game, which was released 00:10:38.220 --> 00:10:42.000 coincident with the release of the movie, E.T. The Extraterrestrial. 00:10:42.000 --> 00:10:47.040 So indeed, just in the past few days dozens and hundreds if not thousands 00:10:47.040 --> 00:10:52.140 ultimately of these cartridges are starting to be unearthed. 00:10:52.140 --> 00:10:56.280 >> Now why did they bury such a clearly compelling game? 00:10:56.280 --> 00:10:58.570 Well, it turns out that E.T. is actually reputed 00:10:58.570 --> 00:11:01.850 by many to be the worst video game ever. 00:11:01.850 --> 00:11:04.080 In part, because they had so little time to develop 00:11:04.080 --> 00:11:06.340 the game before that particular Christmas season, 00:11:06.340 --> 00:11:09.240 but also because it was particularly hard to play. 00:11:09.240 --> 00:11:11.630 This, of course, begs the question, can we see it? 00:11:11.630 --> 00:11:12.610 Yes, we can. 00:11:12.610 --> 00:11:13.555 Let's take a look. 00:11:13.555 --> 00:11:14.388 [VIDEO GAME PLAYING] 00:11:35.287 --> 00:11:37.870 Now it wasn't actually the graphics that people took objection 00:11:37.870 --> 00:11:41.070 to because, indeed, this was the '80s and this was the state of the art. 00:11:41.070 --> 00:11:42.840 Indeed, this was my childhood here. 00:11:42.840 --> 00:11:44.900 But what was difficult about this game was, one, 00:11:44.900 --> 00:11:46.920 you had a movie ET around the screen, looking 00:11:46.920 --> 00:11:49.820 for those little pixels, which represented Reese's Pieces. 00:11:49.820 --> 00:11:52.960 But the catch too is that if you fell into those darker diamond shapes, 00:11:52.960 --> 00:11:54.870 you would fall into a pit that was actually 00:11:54.870 --> 00:11:56.890 very hard and tedious to get out of. 00:11:56.890 --> 00:11:59.570 So thus was buried ET. 00:11:59.570 --> 00:12:02.740 >> Now also in the desert of late was this here in Wyoming. 00:12:02.740 --> 00:12:08.010 A nuclear, not to be confused with [? nucular, ?] control center. 00:12:08.010 --> 00:12:10.920 And in fact, if you look down there underneath the concrete 00:12:10.920 --> 00:12:14.330 near this white pole, there's actually a Minuteman III missile, 00:12:14.330 --> 00:12:18.230 a nuclear missile, that's actually protected by some technology that's 00:12:18.230 --> 00:12:20.980 not nearly as modern as you might hope. 00:12:20.980 --> 00:12:24.344 An American TV show, 60 Minutes, recently revealed this. 00:12:24.344 --> 00:12:25.010 [VIDEO PLAYBACK] 00:12:25.010 --> 00:12:28.210 -But the equipment is ancient. 00:12:28.210 --> 00:12:30.480 This, for example, is one of the computers that 00:12:30.480 --> 00:12:33.380 would receive a launch order from the president. 00:12:33.380 --> 00:12:35.720 It uses floppy disks. 00:12:35.720 --> 00:12:38.000 The really old, big ones. 00:12:38.000 --> 00:12:41.920 Before you got down here, you probably had never seen one? 00:12:41.920 --> 00:12:44.170 >> -I'd never seen one until I got down in this hole. 00:12:44.170 --> 00:12:44.640 >> [END VIDEO PLAYBACK] 00:12:44.640 --> 00:12:46.730 >> Now if you're thinking you've seen these disks, 00:12:46.730 --> 00:12:49.680 those 5 and 1/4-inch disks from the 1980s, uh-uh. 00:12:49.680 --> 00:12:53.180 This is an 8-inch floppy disk from the 1970s. 00:12:53.180 --> 00:12:55.930 Now CS50's own Dan Coffey and I also had an opportunity 00:12:55.930 --> 00:12:58.117 to travel to Seattle, Washington recently where 00:12:58.117 --> 00:12:59.450 we visited our friends at Valve. 00:12:59.450 --> 00:13:03.870 In fact, you may recall 60 seconds of me wearing those virtual reality goggles. 00:13:03.870 --> 00:13:07.030 >> Now we also had an opportunity to chat with three of Valve's engineers 00:13:07.030 --> 00:13:09.620 who spoke to us about what it's like to work at Valve, 00:13:09.620 --> 00:13:13.290 but better yet, what it's like to develop video games. 00:13:13.290 --> 00:13:14.315 Let's take a look. 00:13:14.315 --> 00:13:14.600 >> [VIDEO PLAYBACK] 00:13:14.600 --> 00:13:15.433 >> [VIDEO GAME PLAYING] 00:13:23.950 --> 00:13:26.420 -My name is Brian Jacobson. 00:13:26.420 --> 00:13:30.420 I made my way to Valve kind of in a slightly circuitous route. 00:13:30.420 --> 00:13:33.710 I was not actually a computer programmer in college. 00:13:33.710 --> 00:13:35.790 And I was used to back in high school being 00:13:35.790 --> 00:13:39.300 able to do programming and get stuff from idea to implementation 00:13:39.300 --> 00:13:41.320 in just a few minutes or hours. 00:13:41.320 --> 00:13:46.930 I enjoyed that rapid pace of development and seeing my ideas come to life. 00:13:46.930 --> 00:13:48.780 >> -My name is Yahn Bernier. 00:13:48.780 --> 00:13:50.740 I've been here at Valve for over 16 years. 00:13:50.740 --> 00:13:54.170 So I ended up writing just for fun a level editor for Quake 00:13:54.170 --> 00:13:57.564 called BSP, based on binary space partitioning trees. 00:13:57.564 --> 00:13:58.730 That was sort of the entree. 00:13:58.730 --> 00:14:02.780 And eventually Gabe Newell, who was the founder of Valve, and Mike Harrington 00:14:02.780 --> 00:14:06.254 sent me an email saying software development engineer opportunity. 00:14:06.254 --> 00:14:07.170 -My name is John Cook. 00:14:07.170 --> 00:14:09.380 I'm a software engineer working at Valve. 00:14:09.380 --> 00:14:14.240 I focus on our online systems, scaling, and architecture. 00:14:14.240 --> 00:14:16.060 >> A friend and I actually in university were 00:14:16.060 --> 00:14:18.660 working on a game called Team Fortress. 00:14:18.660 --> 00:14:22.810 And we just made the game, put it up on the internet. 00:14:22.810 --> 00:14:25.130 It was an addition to the game, Quake, at the time. 00:14:25.130 --> 00:14:27.620 So it was sort of a modern extension of that game. 00:14:27.620 --> 00:14:30.920 After that, we ended up getting in contact with Valve 00:14:30.920 --> 00:14:32.200 and coming over here. 00:14:32.200 --> 00:14:36.535 >> -Well, for me the graphics class was probably the most applicable course 00:14:36.535 --> 00:14:39.960 that I took in college for sure. 00:14:39.960 --> 00:14:42.940 Trigonometry, linear algebra. 00:14:42.940 --> 00:14:47.140 I took a robotics course that had a bunch of linear algebra kind of baked 00:14:47.140 --> 00:14:52.030 into it, and that is one of the keystone math concepts for any 3D graphics. 00:14:52.030 --> 00:14:57.680 It's all about orientation and doing the math of like, I'm looking over at you, 00:14:57.680 --> 00:14:58.970 but I want to aim over there. 00:14:58.970 --> 00:15:04.600 And how do I rotate and how do I figure out where I'm moving or looking. 00:15:04.600 --> 00:15:07.015 That is all linear algebra. 00:15:07.015 --> 00:15:11.380 >> -The essence of a first-person shooter is that I look through the gun sites 00:15:11.380 --> 00:15:13.630 with my eyes and aim at something and pull the trigger 00:15:13.630 --> 00:15:14.670 and I want to hit that. 00:15:14.670 --> 00:15:18.810 So you have to design your technology to deal with latency. 00:15:18.810 --> 00:15:22.020 And so John Carmack went back and said, oh, what I need to do 00:15:22.020 --> 00:15:28.440 is predict on the client the result my player's inputs, 00:15:28.440 --> 00:15:30.336 and just do that and render from where we 00:15:30.336 --> 00:15:33.460 think he's going to be and then let the server come back and fix it for me. 00:15:33.460 --> 00:15:36.470 >> -So when you're thinking about using a game engine to make a game, 00:15:36.470 --> 00:15:38.510 there's a lot more options now. 00:15:38.510 --> 00:15:41.675 >> -A game engine is kind of the infrastructure 00:15:41.675 --> 00:15:42.800 in which you make the game. 00:15:42.800 --> 00:15:46.560 It's the thing responsible for drawing the world, for simulating the world, 00:15:46.560 --> 00:15:50.970 for playing all the sounds, for helping your game code 00:15:50.970 --> 00:15:53.650 figure out what the enemy AIs are going to go do. 00:15:53.650 --> 00:15:57.260 >> -Usually, the way people would start is they'd take some amount of that logic 00:15:57.260 --> 00:15:58.020 and change it. 00:15:58.020 --> 00:16:00.280 Like, OK, now let's just change the rocket launcher 00:16:00.280 --> 00:16:04.240 to do 200 damage instead of doing 100 damage. 00:16:04.240 --> 00:16:08.580 It's a very simple, like, just take some existing piece of gameplay logic 00:16:08.580 --> 00:16:10.360 and tweak it to how you like. 00:16:10.360 --> 00:16:13.830 >> -The other higher level layer is usually called game code. 00:16:13.830 --> 00:16:17.230 And the game code is usually the thing that's all about the game rules. 00:16:17.230 --> 00:16:21.156 Like the fact that I have this particular weapon 00:16:21.156 --> 00:16:22.530 and it works in a particular way. 00:16:22.530 --> 00:16:25.480 Or the fact that there's a headcrab monster that 00:16:25.480 --> 00:16:27.130 has these particular behaviors. 00:16:27.130 --> 00:16:30.800 Those kinds of things are typically to find as game code. 00:16:30.800 --> 00:16:34.790 >> -And from there, really, with those kind of pieces and process of iteration, 00:16:34.790 --> 00:16:37.600 you can go from something like Quake to something like Half-Life. 00:16:37.600 --> 00:16:41.810 >> -Half-Life is a sci-fi, first-person shooter game. 00:16:41.810 --> 00:16:45.340 It's set in a dystopian world. 00:16:45.340 --> 00:16:50.050 The first Half-Life was set in this underground research facility 00:16:50.050 --> 00:16:51.100 called Black Mesa. 00:16:51.100 --> 00:16:53.940 And you played a character named Gordon Freeman. 00:16:53.940 --> 00:16:56.690 And it was basically about an alien invasion 00:16:56.690 --> 00:17:00.000 that was provoked when an experiment went wrong. 00:17:00.000 --> 00:17:04.720 >> And the second game, Half-Life 2, was set about 10 years later, 00:17:04.720 --> 00:17:07.940 and basically, the aliens had taken over the planet. 00:17:07.940 --> 00:17:12.547 And now you as Gordon Freeman had to basically rescue 00:17:12.547 --> 00:17:13.880 your friend, Alex, who you meet. 00:17:13.880 --> 00:17:17.960 And try to beat back the aliens and reclaim the planet. 00:17:17.960 --> 00:17:20.660 >> -Certainly, projects like Portal 2, it was just 00:17:20.660 --> 00:17:24.742 a small team, five people working on a game idea. 00:17:24.742 --> 00:17:26.950 They found some things they thought were interesting, 00:17:26.950 --> 00:17:28.283 could be interesting for a game. 00:17:28.283 --> 00:17:29.490 They expanded to 20 people. 00:17:29.490 --> 00:17:31.355 They fleshed out those ideas. 00:17:31.355 --> 00:17:32.480 You added some more people. 00:17:32.480 --> 00:17:35.827 >> They're like, OK, and now we want to ship on three consoles. 00:17:35.827 --> 00:17:36.910 We need a lot more people. 00:17:36.910 --> 00:17:38.619 Like everyone, come look at this game. 00:17:38.619 --> 00:17:39.160 It's awesome. 00:17:39.160 --> 00:17:40.909 It just needs a bunch of work to get done. 00:17:40.909 --> 00:17:43.790 So suddenly you have half the company working, 00:17:43.790 --> 00:17:47.100 you have 120 people working on this game to get it done. 00:17:47.100 --> 00:17:51.190 Obviously, the number of projects elsewhere contracts, 00:17:51.190 --> 00:17:53.354 but everyone is super happy because they know 00:17:53.354 --> 00:17:55.520 they're working on this thing that's really awesome. 00:17:55.520 --> 00:17:58.644 >> -One of the really great things about this job and this industry in general 00:17:58.644 --> 00:18:00.684 is that things change all the time. 00:18:00.684 --> 00:18:02.600 The thing that you're doing this year is going 00:18:02.600 --> 00:18:04.980 to be very difficult from the thing you do the next year. 00:18:04.980 --> 00:18:08.520 And so it keeps everything really fresh, actually, and pretty exciting. 00:18:08.520 --> 00:18:11.757 You're continually learning new things and doing new kinds of stuff. 00:18:11.757 --> 00:18:12.590 [END VIDEO PLAYBACK] 00:18:12.590 --> 00:18:13.969 DAVID: That's it for CS50LIVE. 00:18:13.969 --> 00:18:15.760 Thanks so much to this week's contributors. 00:18:15.760 --> 00:18:19.710 Thanks so much to CS50's own Colton Ogden and the team behind the camera. 00:18:19.710 --> 00:18:21.456 This was CS50. 00:18:21.456 --> 00:18:23.198 >> [MUSIC - LOS DEL RIO, "MACARENA"]