1 00:00:00,000 --> 00:00:00,625 >> [MUSIC PLAYING] 2 00:00:00,625 --> 00:00:11,341 3 00:00:11,341 --> 00:00:12,090 NOW: Hello, world. 4 00:00:12,090 --> 00:00:14,330 This is CS50LIVE. 5 00:00:14,330 --> 00:00:17,792 We have such a good episode for you. 6 00:00:17,792 --> 00:00:22,110 The CEO of YouTube, a bug in Internet Explorer, 7 00:00:22,110 --> 00:00:26,750 the worst video game ever, and a field trip to Valve Software. 8 00:00:26,750 --> 00:00:33,040 But first, a trip to Tokyo, Japan where President Obama recently played 9 00:00:33,040 --> 00:00:36,066 soccer with a good friend of mine. 10 00:00:36,066 --> 00:00:37,050 >> [VIDEO PLAYBACK] 11 00:00:37,050 --> 00:00:43,930 12 00:00:43,930 --> 00:00:44,430 -Wow. 13 00:00:44,430 --> 00:00:45,414 He's moving. 14 00:00:45,414 --> 00:00:47,382 >> -I can kick a soccer ball too. 15 00:00:47,382 --> 00:00:49,842 Here I go. 16 00:00:49,842 --> 00:00:53,286 >> -Hey, good job. 17 00:00:53,286 --> 00:00:54,687 >> [END VIDEO PLAYBACK] 18 00:00:54,687 --> 00:00:55,520 DAVID: Hello, world. 19 00:00:55,520 --> 00:00:57,110 I'm here with CS50's own Colton Ogden. 20 00:00:57,110 --> 00:00:58,430 >> COLTON OGDEN: Hello, everybody. 21 00:00:58,430 --> 00:00:59,940 >> DAVID: And who else do we have with us here today? 22 00:00:59,940 --> 00:01:02,606 >> COLTON OGDEN: This is Now, our little robotic buddy from France. 23 00:01:02,606 --> 00:01:05,299 DAVID: So I actually met NO alongside [? Rob Boden ?] 24 00:01:05,299 --> 00:01:07,590 when he and I were in Atlanta, Georgia a few weeks back 25 00:01:07,590 --> 00:01:09,890 as you may recall at SIGCSE, the Special Interest 26 00:01:09,890 --> 00:01:12,940 Group for Computer Science Education, where literally walking around 27 00:01:12,940 --> 00:01:14,919 the conference room floor was this guy. 28 00:01:14,919 --> 00:01:16,960 Well as it turns out, when we came back to campus 29 00:01:16,960 --> 00:01:20,360 we discovered that Professor [INAUDIBLE] of Harvard's robotics lab 30 00:01:20,360 --> 00:01:22,220 actually had a Now here on campus. 31 00:01:22,220 --> 00:01:24,742 And she's kindly allowed us to program him for you today. 32 00:01:24,742 --> 00:01:27,950 COLTON OGDEN: Yes, and actually, David, I think Now wants to say hello to you 33 00:01:27,950 --> 00:01:30,450 if you want to walk around the table here. 34 00:01:30,450 --> 00:01:32,815 >> DAVID: Right here? 35 00:01:32,815 --> 00:01:33,315 All right. 36 00:01:33,315 --> 00:01:36,060 37 00:01:36,060 --> 00:01:36,560 All right. 38 00:01:36,560 --> 00:01:39,400 39 00:01:39,400 --> 00:01:40,650 >> NOW: Hello, David. 40 00:01:40,650 --> 00:01:42,040 Nice to meet you. 41 00:01:42,040 --> 00:01:43,960 >> DAVID: Hello, Now. 42 00:01:43,960 --> 00:01:45,000 Shake his hand? 43 00:01:45,000 --> 00:01:48,510 >> COLTON OGDEN: Shake his hand up and down. 44 00:01:48,510 --> 00:01:50,310 >> DAVID: OK. 45 00:01:50,310 --> 00:01:52,435 >> COLTON OGDEN: And then he'll go ahead and sit down. 46 00:01:52,435 --> 00:01:54,476 And if you're interested, I can actually show you 47 00:01:54,476 --> 00:01:56,715 how I was able to get him to do all these things too. 48 00:01:56,715 --> 00:01:57,200 >> DAVID: Yeah, absolutely. 49 00:01:57,200 --> 00:01:58,320 >> COLTON OGDEN: He's a little off balance this morning. 50 00:01:58,320 --> 00:02:00,174 He hasn't had his coffee yet. 51 00:02:00,174 --> 00:02:01,840 DAVID: So what is this we're looking at? 52 00:02:01,840 --> 00:02:04,680 COLTON OGDEN: So we're looking at here is a core graph, which is now 53 00:02:04,680 --> 00:02:07,920 a graphical programming environment, which is very similar to Scratch 54 00:02:07,920 --> 00:02:09,317 that CS50 uses. 55 00:02:09,317 --> 00:02:11,150 Here we see it's set up like a flow diagram. 56 00:02:11,150 --> 00:02:13,370 And we have a bunch of these little building blocks here. 57 00:02:13,370 --> 00:02:16,203 Now if we take a look at this one for example, it's called stand up. 58 00:02:16,203 --> 00:02:19,190 And this block says stand up for the Now, whether he's sitting down 59 00:02:19,190 --> 00:02:20,320 or whatever. 60 00:02:20,320 --> 00:02:22,990 >> Then we see it goes into tactile head, which basically 61 00:02:22,990 --> 00:02:26,070 waits for a tap on top of his head as you saw earlier. 62 00:02:26,070 --> 00:02:31,190 Move to means move in an x, y, and z direction to a specific destination. 63 00:02:31,190 --> 00:02:33,980 Handshake is a module I wrote, which basically says, hello, David. 64 00:02:33,980 --> 00:02:34,688 Nice to meet you. 65 00:02:34,688 --> 00:02:36,089 Waits for a handshake. 66 00:02:36,089 --> 00:02:37,630 Sit down is the opposite of stand up. 67 00:02:37,630 --> 00:02:38,796 He'll go ahead and sit down. 68 00:02:38,796 --> 00:02:40,610 And then head movement is a loop whereby he 69 00:02:40,610 --> 00:02:42,090 will move his head in random directions. 70 00:02:42,090 --> 00:02:42,520 >> DAVID: Interesting. 71 00:02:42,520 --> 00:02:44,890 So even though these don't look like the puzzle pieces from Scratch, 72 00:02:44,890 --> 00:02:45,950 it's really the same idea. 73 00:02:45,950 --> 00:02:48,210 And you're wiring a program using these building blocks. 74 00:02:48,210 --> 00:02:49,020 >> COLTON OGDEN: Yes, exactly. 75 00:02:49,020 --> 00:02:50,590 >> DAVID: So you said you made one of them, handshake. 76 00:02:50,590 --> 00:02:51,990 Can we zoom in on that one? 77 00:02:51,990 --> 00:02:52,131 >> COLTON OGDEN: Sure. 78 00:02:52,131 --> 00:02:53,642 We'll take a look here at handshake. 79 00:02:53,642 --> 00:02:56,350 And we'll see it's set up very similar to the other flow diagram. 80 00:02:56,350 --> 00:02:58,850 We start off with the hello block, which [INAUDIBLE] says, hello, David. 81 00:02:58,850 --> 00:03:00,030 Nice to meet you. 82 00:03:00,030 --> 00:03:01,430 This right here is a loop. 83 00:03:01,430 --> 00:03:02,940 It says, detect arm movement. 84 00:03:02,940 --> 00:03:05,230 So it will in an infinite loop wait until its arm 85 00:03:05,230 --> 00:03:06,620 has been raised up and down. 86 00:03:06,620 --> 00:03:09,370 And then once that's happened, it'll go ahead and do these things. 87 00:03:09,370 --> 00:03:13,280 Set stiffness OK and go to end, which basically means send him back 88 00:03:13,280 --> 00:03:14,309 to his default position. 89 00:03:14,309 --> 00:03:15,100 DAVID: Interesting. 90 00:03:15,100 --> 00:03:17,910 Are you restricted to only using this graphical environment 91 00:03:17,910 --> 00:03:19,070 to program him in this way? 92 00:03:19,070 --> 00:03:19,820 >> COLTON OGDEN: Actually, no. 93 00:03:19,820 --> 00:03:21,950 If we go ahead and double click any of these building blocks, 94 00:03:21,950 --> 00:03:24,420 we can see that there's actually python code underneath the hood, 95 00:03:24,420 --> 00:03:26,000 powering each of these building blocks. 96 00:03:26,000 --> 00:03:26,750 >> DAVID: Ah, indeed. 97 00:03:26,750 --> 00:03:29,250 So for those unfamiliar, python is an interpreted language, 98 00:03:29,250 --> 00:03:32,240 very similar in spirit to PHP, which we use in CS50. 99 00:03:32,240 --> 00:03:35,344 And much like you can use PHP for web programming, 100 00:03:35,344 --> 00:03:37,010 you can also use it at the command line. 101 00:03:37,010 --> 00:03:39,426 And as Colton is doing here in this graphical environment, 102 00:03:39,426 --> 00:03:41,674 writing programs and then transmitting it via Wi-Fi-- 103 00:03:41,674 --> 00:03:42,590 COLTON OGDEN: Correct. 104 00:03:42,590 --> 00:03:43,310 DAVID: --to now. 105 00:03:43,310 --> 00:03:44,550 Would you have some time to stick around? 106 00:03:44,550 --> 00:03:45,350 >> COLTON OGDEN: Absolutely. 107 00:03:45,350 --> 00:03:45,710 >> DAVID: All right. 108 00:03:45,710 --> 00:03:48,970 Well, before Colton comes back with us for a little bit of a surprise, 109 00:03:48,970 --> 00:03:54,470 we now-- get it?-- have 60 seconds of former CS50 students auditioning 110 00:03:54,470 --> 00:03:55,844 to become teaching fellows. 111 00:03:55,844 --> 00:03:56,510 [VIDEO PLAYBACK] 112 00:03:56,510 --> 00:03:57,411 -Thank you. 113 00:03:57,411 --> 00:03:58,910 Thank you, everyone, for being here. 114 00:03:58,910 --> 00:04:00,510 >> -Hey, Mr. Bunny. 115 00:04:00,510 --> 00:04:02,120 >> -Welcome to this brief tutorial on-- 116 00:04:02,120 --> 00:04:03,810 >> [INAUDIBLE] fun with Twinkies. 117 00:04:03,810 --> 00:04:04,310 -Wait. 118 00:04:04,310 --> 00:04:05,040 Stop. 119 00:04:05,040 --> 00:04:07,121 >> -So now we have a problem. 120 00:04:07,121 --> 00:04:07,620 -It's not. 121 00:04:07,620 --> 00:04:08,869 And I'm going to tell you why. 122 00:04:08,869 --> 00:04:10,860 -A loop is repetition, like-- 123 00:04:10,860 --> 00:04:12,970 >> -Sort of a black box. 124 00:04:12,970 --> 00:04:13,935 >> -OK. 125 00:04:13,935 --> 00:04:15,160 I think I get it. 126 00:04:15,160 --> 00:04:15,660 -All right. 127 00:04:15,660 --> 00:04:17,140 So now I'm in a slightly hard part. 128 00:04:17,140 --> 00:04:18,800 >> -That's right. 129 00:04:18,800 --> 00:04:20,485 8 bits make a byte. 130 00:04:20,485 --> 00:04:24,176 >> -You take a byte and you separate it into chunks of four. 131 00:04:24,176 --> 00:04:26,423 >> -Beep, beep, beep, beep, beep. 132 00:04:26,423 --> 00:04:28,018 Beep, beep, beep, beep, beep. 133 00:04:28,018 --> 00:04:29,380 >> -It seems overly complicated. 134 00:04:29,380 --> 00:04:30,460 >> -So let's do this again. 135 00:04:30,460 --> 00:04:32,580 >> -If I confuse you, please feel free to stop me. 136 00:04:32,580 --> 00:04:33,620 >> -But wait a second. 137 00:04:33,620 --> 00:04:36,940 >> -Well, let's look back at the slide and break things down step by step. 138 00:04:36,940 --> 00:04:41,720 >> -If you remember, memory is broken up into byte-size pieces. 139 00:04:41,720 --> 00:04:44,080 >> -So here we have the best case scenario. 140 00:04:44,080 --> 00:04:46,290 >> -This is a considerable improvement over-- 141 00:04:46,290 --> 00:04:47,715 >> -A web browser, like Chrome. 142 00:04:47,715 --> 00:04:49,421 >> -It's always necessary to free any-- 143 00:04:49,421 --> 00:04:49,920 -People-- 144 00:04:49,920 --> 00:04:50,880 -You may run across. 145 00:04:50,880 --> 00:04:53,460 And the code can get somewhat cumbersome. 146 00:04:53,460 --> 00:04:55,640 >> -And that is all you need. 147 00:04:55,640 --> 00:04:56,960 >> -Boom! 148 00:04:56,960 --> 00:04:59,140 >> DAVID: Now CS50's own Dan Coffey and I recently 149 00:04:59,140 --> 00:05:01,850 had an opportunity to travel out to Mountain View, California, 150 00:05:01,850 --> 00:05:03,740 which is where the headquarters of Google is. 151 00:05:03,740 --> 00:05:07,350 And we had a chance to chat with Susan Wojcicki, the CEO of YouTube. 152 00:05:07,350 --> 00:05:10,920 It was actually in Susan's garage years ago in the '90s 153 00:05:10,920 --> 00:05:14,620 that Google itself was started by Larry and Sergey. 154 00:05:14,620 --> 00:05:17,430 >> Well, it turns out that Susan herself actually took CS50 155 00:05:17,430 --> 00:05:18,950 just a few years before I did. 156 00:05:18,950 --> 00:05:21,450 And I think it's striking as you'll soon hear just how 157 00:05:21,450 --> 00:05:25,040 much an introduction to computer science so influenced her life. 158 00:05:25,040 --> 00:05:26,892 She'd like to say hello. 159 00:05:26,892 --> 00:05:28,100 SUSAN WOJCICKI: Hello, world. 160 00:05:28,100 --> 00:05:29,620 I'm Susan Wojcicki. 161 00:05:29,620 --> 00:05:31,500 I'm the CEO of YouTube. 162 00:05:31,500 --> 00:05:36,570 And I took CS50 when I was a senior at Harvard in 1990. 163 00:05:36,570 --> 00:05:38,710 >> I was actually a history and literature major. 164 00:05:38,710 --> 00:05:44,180 And my junior summer I realized that maybe I 165 00:05:44,180 --> 00:05:46,450 wanted to learn something about computers. 166 00:05:46,450 --> 00:05:48,350 And so I came back. 167 00:05:48,350 --> 00:05:49,870 I took CS50. 168 00:05:49,870 --> 00:05:54,340 It was hard, but it was the most amazing class I took. 169 00:05:54,340 --> 00:05:57,030 It changed how I think about everything. 170 00:05:57,030 --> 00:06:03,200 >> And when I graduated from Harvard in 1990, I went to Silicon Valley 171 00:06:03,200 --> 00:06:04,500 and I got a job. 172 00:06:04,500 --> 00:06:07,490 And I've been working in tech ever since. 173 00:06:07,490 --> 00:06:09,780 So CS50 changed my life. 174 00:06:09,780 --> 00:06:12,320 I continue to learn and build. 175 00:06:12,320 --> 00:06:13,870 It gave me a great foundation. 176 00:06:13,870 --> 00:06:17,100 And I'm continuing to learn every day as the technology changes. 177 00:06:17,100 --> 00:06:19,660 >> And I think it's wonderful that you're all taking it 178 00:06:19,660 --> 00:06:22,840 because that's how the world is going to change going forward. 179 00:06:22,840 --> 00:06:27,490 There's just going to be more and more opportunity and innovation. 180 00:06:27,490 --> 00:06:31,010 Digital is going to affect our lives even more than it already has. 181 00:06:31,010 --> 00:06:33,870 And it's wonderful that you're all taking CS50. 182 00:06:33,870 --> 00:06:35,890 So this is CS50. 183 00:06:35,890 --> 00:06:38,080 >> DAVID: So if you've been looking for a new reason 184 00:06:38,080 --> 00:06:41,502 not to use a certain browser, here's a good one for you. 185 00:06:41,502 --> 00:06:43,210 I recently received-- along with everyone 186 00:06:43,210 --> 00:06:45,120 at Harvard University-- this email here. 187 00:06:45,120 --> 00:06:46,910 >> "Dear Members of the Harvard Community. 188 00:06:46,910 --> 00:06:50,930 The US Department of Homeland Security recommends that all users temporarily 189 00:06:50,930 --> 00:06:54,350 discontinue the use of Microsoft Internet Explorer, IE, 190 00:06:54,350 --> 00:06:56,270 due to a critical security flaw." 191 00:06:56,270 --> 00:07:01,250 >> This is documented actually in Microsoft Security Advisory 2963983. 192 00:07:01,250 --> 00:07:05,242 Vulnerability in Internet Explorer could allow remote code execution. 193 00:07:05,242 --> 00:07:07,200 Now what does this mean and what is the threat? 194 00:07:07,200 --> 00:07:08,950 Well, consider this diagram here, which we 195 00:07:08,950 --> 00:07:12,160 use in CS50 to talk about HTTP or web traffic. 196 00:07:12,160 --> 00:07:15,140 If we have here a web server and on the other side 197 00:07:15,140 --> 00:07:17,589 a browser-- Internet Explorer in this case-- of course, 198 00:07:17,589 --> 00:07:19,380 a browser when it first requests a web page 199 00:07:19,380 --> 00:07:21,310 might send an HDP message like this. 200 00:07:21,310 --> 00:07:26,470 GET index.HTML using version 1.1 of the protocol known as HTTP. 201 00:07:26,470 --> 00:07:30,820 >> Now in this case, if a bad guy has somehow had access to this web server 202 00:07:30,820 --> 00:07:33,990 and installed on it an exploit so to speak, 203 00:07:33,990 --> 00:07:36,990 he or she might be able to convince the web server to return this. 204 00:07:36,990 --> 00:07:41,040 Not only index.HTML itself as requested, but embedded inside 205 00:07:41,040 --> 00:07:43,720 of that index.HTML file could, of course, be other assets. 206 00:07:43,720 --> 00:07:47,230 In particular, something like exploit.SWF, 207 00:07:47,230 --> 00:07:50,620 a flash file that ultimately takes advantage of this security 208 00:07:50,620 --> 00:07:54,940 technique, heap feng shui, which is a fancy way of saying that the code 209 00:07:54,940 --> 00:07:59,940 inside of that flash file sprays the so-called heap inside of the computer's 210 00:07:59,940 --> 00:08:04,090 browser with all different chunks of memory that are designed ultimately 211 00:08:04,090 --> 00:08:05,810 to overwrite big chunks of memory here. 212 00:08:05,810 --> 00:08:09,150 >> If you recall this from our discussion in CS50 of the heap and the stack 213 00:08:09,150 --> 00:08:11,070 and memory management more generally. 214 00:08:11,070 --> 00:08:14,280 Now the memory that's actually thrown on the heap 215 00:08:14,280 --> 00:08:16,280 are really called flash vector objects. 216 00:08:16,280 --> 00:08:17,870 And this is something with which you might be familiar 217 00:08:17,870 --> 00:08:19,880 if you yourself had programmed Flash before. 218 00:08:19,880 --> 00:08:24,070 But one of those objects in particular is known as a flash media sound object. 219 00:08:24,070 --> 00:08:28,190 >> And herein lies an opportunity because what this exploit then proceeds to do 220 00:08:28,190 --> 00:08:31,540 is corrupt this chunk of memory, this object in memory, 221 00:08:31,540 --> 00:08:36,640 such that it tries to make this hexadecimal address executable, thereby 222 00:08:36,640 --> 00:08:40,600 trying to trick the program ultimately to executing some shell code so 223 00:08:40,600 --> 00:08:44,560 to speak, or bad guy's code, that's ultimately stored at this address here, 224 00:08:44,560 --> 00:08:49,530 which was injected by way of downloading unknowingly that particular flash file. 225 00:08:49,530 --> 00:08:53,220 >> Now the end result could be whatever the adversary wants to do to your computer. 226 00:08:53,220 --> 00:08:56,290 He or she could delete your files, move your files, email your files, 227 00:08:56,290 --> 00:08:59,960 or really do anything that you yourself could do as the owner of that computer. 228 00:08:59,960 --> 00:09:01,600 And that's why the threat is so scary. 229 00:09:01,600 --> 00:09:04,370 It allows truly anyone on the internet whose website you 230 00:09:04,370 --> 00:09:08,590 might visit to execute arbitrary programs on your computer. 231 00:09:08,590 --> 00:09:11,550 >> Now thankfully, Microsoft very recently released a fix for this 232 00:09:11,550 --> 00:09:14,800 because the problem actually afflicted Internet Explorer 6 233 00:09:14,800 --> 00:09:16,210 all the way up through 11. 234 00:09:16,210 --> 00:09:19,530 So it's been with us for quite some time and was only recently discovered. 235 00:09:19,530 --> 00:09:23,120 So if you have automatic updates turned on, you should be OK soon. 236 00:09:23,120 --> 00:09:26,340 But just to be safe, you could surely switch to some other browser at least 237 00:09:26,340 --> 00:09:27,300 in the meantime. 238 00:09:27,300 --> 00:09:29,650 >> Now it turns out too that Microsoft very generously 239 00:09:29,650 --> 00:09:33,640 also released a fix for Windows XP, an older version of Windows for which 240 00:09:33,640 --> 00:09:37,040 support was actually officially discontinued just a few weeks ago, 241 00:09:37,040 --> 00:09:40,880 but this threat was so bad that they also rolled out a fix for that OS 242 00:09:40,880 --> 00:09:41,810 as well. 243 00:09:41,810 --> 00:09:43,400 >> Now in other news this week was this. 244 00:09:43,400 --> 00:09:46,632 The Atari 2600, an older game console that a cousin of mine 245 00:09:46,632 --> 00:09:49,340 actually had growing up on which we used to play video games when 246 00:09:49,340 --> 00:09:50,630 we would visit their house. 247 00:09:50,630 --> 00:09:54,420 Now in any case, why this was in the news was for the following reason. 248 00:09:54,420 --> 00:09:57,180 Back in the '80s, the company behind this device, Atari, 249 00:09:57,180 --> 00:09:59,870 decided to bury in a landfill in New Mexico 250 00:09:59,870 --> 00:10:02,510 a whole bunch of old games and instruction manuals 251 00:10:02,510 --> 00:10:05,050 and the like that would otherwise have gone unsold. 252 00:10:05,050 --> 00:10:09,320 >> Now over time, the burial of these games become a bit of an urban myth. 253 00:10:09,320 --> 00:10:12,690 People didn't really know for sure whether this had actually happened even 254 00:10:12,690 --> 00:10:16,080 though, as myth went, the company had even poured a layer of concrete 255 00:10:16,080 --> 00:10:18,630 on top of everything in the landfill to prevent kids 256 00:10:18,630 --> 00:10:22,150 from actually rustling through it, trying to find free video games. 257 00:10:22,150 --> 00:10:26,310 Well, it turns out that a documentary is now in progress now in 2014. 258 00:10:26,310 --> 00:10:30,900 And a team of excavators has been trying to dig up the truth behind this story 259 00:10:30,900 --> 00:10:32,240 if it's indeed there. 260 00:10:32,240 --> 00:10:33,330 >> And guess what they found? 261 00:10:33,330 --> 00:10:35,940 Well, not exactly this guy, but thousands 262 00:10:35,940 --> 00:10:38,220 of copies of his game, which was released 263 00:10:38,220 --> 00:10:42,000 coincident with the release of the movie, E.T. The Extraterrestrial. 264 00:10:42,000 --> 00:10:47,040 So indeed, just in the past few days dozens and hundreds if not thousands 265 00:10:47,040 --> 00:10:52,140 ultimately of these cartridges are starting to be unearthed. 266 00:10:52,140 --> 00:10:56,280 >> Now why did they bury such a clearly compelling game? 267 00:10:56,280 --> 00:10:58,570 Well, it turns out that E.T. is actually reputed 268 00:10:58,570 --> 00:11:01,850 by many to be the worst video game ever. 269 00:11:01,850 --> 00:11:04,080 In part, because they had so little time to develop 270 00:11:04,080 --> 00:11:06,340 the game before that particular Christmas season, 271 00:11:06,340 --> 00:11:09,240 but also because it was particularly hard to play. 272 00:11:09,240 --> 00:11:11,630 This, of course, begs the question, can we see it? 273 00:11:11,630 --> 00:11:12,610 Yes, we can. 274 00:11:12,610 --> 00:11:13,555 Let's take a look. 275 00:11:13,555 --> 00:11:14,388 [VIDEO GAME PLAYING] 276 00:11:14,388 --> 00:11:35,287 277 00:11:35,287 --> 00:11:37,870 Now it wasn't actually the graphics that people took objection 278 00:11:37,870 --> 00:11:41,070 to because, indeed, this was the '80s and this was the state of the art. 279 00:11:41,070 --> 00:11:42,840 Indeed, this was my childhood here. 280 00:11:42,840 --> 00:11:44,900 But what was difficult about this game was, one, 281 00:11:44,900 --> 00:11:46,920 you had a movie ET around the screen, looking 282 00:11:46,920 --> 00:11:49,820 for those little pixels, which represented Reese's Pieces. 283 00:11:49,820 --> 00:11:52,960 But the catch too is that if you fell into those darker diamond shapes, 284 00:11:52,960 --> 00:11:54,870 you would fall into a pit that was actually 285 00:11:54,870 --> 00:11:56,890 very hard and tedious to get out of. 286 00:11:56,890 --> 00:11:59,570 So thus was buried ET. 287 00:11:59,570 --> 00:12:02,740 >> Now also in the desert of late was this here in Wyoming. 288 00:12:02,740 --> 00:12:08,010 A nuclear, not to be confused with [? nucular, ?] control center. 289 00:12:08,010 --> 00:12:10,920 And in fact, if you look down there underneath the concrete 290 00:12:10,920 --> 00:12:14,330 near this white pole, there's actually a Minuteman III missile, 291 00:12:14,330 --> 00:12:18,230 a nuclear missile, that's actually protected by some technology that's 292 00:12:18,230 --> 00:12:20,980 not nearly as modern as you might hope. 293 00:12:20,980 --> 00:12:24,344 An American TV show, 60 Minutes, recently revealed this. 294 00:12:24,344 --> 00:12:25,010 [VIDEO PLAYBACK] 295 00:12:25,010 --> 00:12:28,210 -But the equipment is ancient. 296 00:12:28,210 --> 00:12:30,480 This, for example, is one of the computers that 297 00:12:30,480 --> 00:12:33,380 would receive a launch order from the president. 298 00:12:33,380 --> 00:12:35,720 It uses floppy disks. 299 00:12:35,720 --> 00:12:38,000 The really old, big ones. 300 00:12:38,000 --> 00:12:41,920 Before you got down here, you probably had never seen one? 301 00:12:41,920 --> 00:12:44,170 >> -I'd never seen one until I got down in this hole. 302 00:12:44,170 --> 00:12:44,640 >> [END VIDEO PLAYBACK] 303 00:12:44,640 --> 00:12:46,730 >> Now if you're thinking you've seen these disks, 304 00:12:46,730 --> 00:12:49,680 those 5 and 1/4-inch disks from the 1980s, uh-uh. 305 00:12:49,680 --> 00:12:53,180 This is an 8-inch floppy disk from the 1970s. 306 00:12:53,180 --> 00:12:55,930 Now CS50's own Dan Coffey and I also had an opportunity 307 00:12:55,930 --> 00:12:58,117 to travel to Seattle, Washington recently where 308 00:12:58,117 --> 00:12:59,450 we visited our friends at Valve. 309 00:12:59,450 --> 00:13:03,870 In fact, you may recall 60 seconds of me wearing those virtual reality goggles. 310 00:13:03,870 --> 00:13:07,030 >> Now we also had an opportunity to chat with three of Valve's engineers 311 00:13:07,030 --> 00:13:09,620 who spoke to us about what it's like to work at Valve, 312 00:13:09,620 --> 00:13:13,290 but better yet, what it's like to develop video games. 313 00:13:13,290 --> 00:13:14,315 Let's take a look. 314 00:13:14,315 --> 00:13:14,600 >> [VIDEO PLAYBACK] 315 00:13:14,600 --> 00:13:15,433 >> [VIDEO GAME PLAYING] 316 00:13:15,433 --> 00:13:23,950 317 00:13:23,950 --> 00:13:26,420 -My name is Brian Jacobson. 318 00:13:26,420 --> 00:13:30,420 I made my way to Valve kind of in a slightly circuitous route. 319 00:13:30,420 --> 00:13:33,710 I was not actually a computer programmer in college. 320 00:13:33,710 --> 00:13:35,790 And I was used to back in high school being 321 00:13:35,790 --> 00:13:39,300 able to do programming and get stuff from idea to implementation 322 00:13:39,300 --> 00:13:41,320 in just a few minutes or hours. 323 00:13:41,320 --> 00:13:46,930 I enjoyed that rapid pace of development and seeing my ideas come to life. 324 00:13:46,930 --> 00:13:48,780 >> -My name is Yahn Bernier. 325 00:13:48,780 --> 00:13:50,740 I've been here at Valve for over 16 years. 326 00:13:50,740 --> 00:13:54,170 So I ended up writing just for fun a level editor for Quake 327 00:13:54,170 --> 00:13:57,564 called BSP, based on binary space partitioning trees. 328 00:13:57,564 --> 00:13:58,730 That was sort of the entree. 329 00:13:58,730 --> 00:14:02,780 And eventually Gabe Newell, who was the founder of Valve, and Mike Harrington 330 00:14:02,780 --> 00:14:06,254 sent me an email saying software development engineer opportunity. 331 00:14:06,254 --> 00:14:07,170 -My name is John Cook. 332 00:14:07,170 --> 00:14:09,380 I'm a software engineer working at Valve. 333 00:14:09,380 --> 00:14:14,240 I focus on our online systems, scaling, and architecture. 334 00:14:14,240 --> 00:14:16,060 >> A friend and I actually in university were 335 00:14:16,060 --> 00:14:18,660 working on a game called Team Fortress. 336 00:14:18,660 --> 00:14:22,810 And we just made the game, put it up on the internet. 337 00:14:22,810 --> 00:14:25,130 It was an addition to the game, Quake, at the time. 338 00:14:25,130 --> 00:14:27,620 So it was sort of a modern extension of that game. 339 00:14:27,620 --> 00:14:30,920 After that, we ended up getting in contact with Valve 340 00:14:30,920 --> 00:14:32,200 and coming over here. 341 00:14:32,200 --> 00:14:36,535 >> -Well, for me the graphics class was probably the most applicable course 342 00:14:36,535 --> 00:14:39,960 that I took in college for sure. 343 00:14:39,960 --> 00:14:42,940 Trigonometry, linear algebra. 344 00:14:42,940 --> 00:14:47,140 I took a robotics course that had a bunch of linear algebra kind of baked 345 00:14:47,140 --> 00:14:52,030 into it, and that is one of the keystone math concepts for any 3D graphics. 346 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, 347 00:14:57,680 --> 00:14:58,970 but I want to aim over there. 348 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. 349 00:15:04,600 --> 00:15:07,015 That is all linear algebra. 350 00:15:07,015 --> 00:15:11,380 >> -The essence of a first-person shooter is that I look through the gun sites 351 00:15:11,380 --> 00:15:13,630 with my eyes and aim at something and pull the trigger 352 00:15:13,630 --> 00:15:14,670 and I want to hit that. 353 00:15:14,670 --> 00:15:18,810 So you have to design your technology to deal with latency. 354 00:15:18,810 --> 00:15:22,020 And so John Carmack went back and said, oh, what I need to do 355 00:15:22,020 --> 00:15:28,440 is predict on the client the result my player's inputs, 356 00:15:28,440 --> 00:15:30,336 and just do that and render from where we 357 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. 358 00:15:33,460 --> 00:15:36,470 >> -So when you're thinking about using a game engine to make a game, 359 00:15:36,470 --> 00:15:38,510 there's a lot more options now. 360 00:15:38,510 --> 00:15:41,675 >> -A game engine is kind of the infrastructure 361 00:15:41,675 --> 00:15:42,800 in which you make the game. 362 00:15:42,800 --> 00:15:46,560 It's the thing responsible for drawing the world, for simulating the world, 363 00:15:46,560 --> 00:15:50,970 for playing all the sounds, for helping your game code 364 00:15:50,970 --> 00:15:53,650 figure out what the enemy AIs are going to go do. 365 00:15:53,650 --> 00:15:57,260 >> -Usually, the way people would start is they'd take some amount of that logic 366 00:15:57,260 --> 00:15:58,020 and change it. 367 00:15:58,020 --> 00:16:00,280 Like, OK, now let's just change the rocket launcher 368 00:16:00,280 --> 00:16:04,240 to do 200 damage instead of doing 100 damage. 369 00:16:04,240 --> 00:16:08,580 It's a very simple, like, just take some existing piece of gameplay logic 370 00:16:08,580 --> 00:16:10,360 and tweak it to how you like. 371 00:16:10,360 --> 00:16:13,830 >> -The other higher level layer is usually called game code. 372 00:16:13,830 --> 00:16:17,230 And the game code is usually the thing that's all about the game rules. 373 00:16:17,230 --> 00:16:21,156 Like the fact that I have this particular weapon 374 00:16:21,156 --> 00:16:22,530 and it works in a particular way. 375 00:16:22,530 --> 00:16:25,480 Or the fact that there's a headcrab monster that 376 00:16:25,480 --> 00:16:27,130 has these particular behaviors. 377 00:16:27,130 --> 00:16:30,800 Those kinds of things are typically to find as game code. 378 00:16:30,800 --> 00:16:34,790 >> -And from there, really, with those kind of pieces and process of iteration, 379 00:16:34,790 --> 00:16:37,600 you can go from something like Quake to something like Half-Life. 380 00:16:37,600 --> 00:16:41,810 >> -Half-Life is a sci-fi, first-person shooter game. 381 00:16:41,810 --> 00:16:45,340 It's set in a dystopian world. 382 00:16:45,340 --> 00:16:50,050 The first Half-Life was set in this underground research facility 383 00:16:50,050 --> 00:16:51,100 called Black Mesa. 384 00:16:51,100 --> 00:16:53,940 And you played a character named Gordon Freeman. 385 00:16:53,940 --> 00:16:56,690 And it was basically about an alien invasion 386 00:16:56,690 --> 00:17:00,000 that was provoked when an experiment went wrong. 387 00:17:00,000 --> 00:17:04,720 >> And the second game, Half-Life 2, was set about 10 years later, 388 00:17:04,720 --> 00:17:07,940 and basically, the aliens had taken over the planet. 389 00:17:07,940 --> 00:17:12,547 And now you as Gordon Freeman had to basically rescue 390 00:17:12,547 --> 00:17:13,880 your friend, Alex, who you meet. 391 00:17:13,880 --> 00:17:17,960 And try to beat back the aliens and reclaim the planet. 392 00:17:17,960 --> 00:17:20,660 >> -Certainly, projects like Portal 2, it was just 393 00:17:20,660 --> 00:17:24,742 a small team, five people working on a game idea. 394 00:17:24,742 --> 00:17:26,950 They found some things they thought were interesting, 395 00:17:26,950 --> 00:17:28,283 could be interesting for a game. 396 00:17:28,283 --> 00:17:29,490 They expanded to 20 people. 397 00:17:29,490 --> 00:17:31,355 They fleshed out those ideas. 398 00:17:31,355 --> 00:17:32,480 You added some more people. 399 00:17:32,480 --> 00:17:35,827 >> They're like, OK, and now we want to ship on three consoles. 400 00:17:35,827 --> 00:17:36,910 We need a lot more people. 401 00:17:36,910 --> 00:17:38,619 Like everyone, come look at this game. 402 00:17:38,619 --> 00:17:39,160 It's awesome. 403 00:17:39,160 --> 00:17:40,909 It just needs a bunch of work to get done. 404 00:17:40,909 --> 00:17:43,790 So suddenly you have half the company working, 405 00:17:43,790 --> 00:17:47,100 you have 120 people working on this game to get it done. 406 00:17:47,100 --> 00:17:51,190 Obviously, the number of projects elsewhere contracts, 407 00:17:51,190 --> 00:17:53,354 but everyone is super happy because they know 408 00:17:53,354 --> 00:17:55,520 they're working on this thing that's really awesome. 409 00:17:55,520 --> 00:17:58,644 >> -One of the really great things about this job and this industry in general 410 00:17:58,644 --> 00:18:00,684 is that things change all the time. 411 00:18:00,684 --> 00:18:02,600 The thing that you're doing this year is going 412 00:18:02,600 --> 00:18:04,980 to be very difficult from the thing you do the next year. 413 00:18:04,980 --> 00:18:08,520 And so it keeps everything really fresh, actually, and pretty exciting. 414 00:18:08,520 --> 00:18:11,757 You're continually learning new things and doing new kinds of stuff. 415 00:18:11,757 --> 00:18:12,590 [END VIDEO PLAYBACK] 416 00:18:12,590 --> 00:18:13,969 DAVID: That's it for CS50LIVE. 417 00:18:13,969 --> 00:18:15,760 Thanks so much to this week's contributors. 418 00:18:15,760 --> 00:18:19,710 Thanks so much to CS50's own Colton Ogden and the team behind the camera. 419 00:18:19,710 --> 00:18:21,456 This was CS50. 420 00:18:21,456 --> 00:18:23,198 >> [MUSIC - LOS DEL RIO, "MACARENA"] 421 00:18:23,198 --> 00:19:18,955