>> [MUSIC PLAYING]
NOW: Hello, world.
This is CS50LIVE.
We have such a good episode for you.
The CEO of YouTube, a bug in Internet Explorer,
the worst video game ever, and a field trip to Valve Software.
But first, a trip to Tokyo, Japan where President Obama recently played
soccer with a good friend of mine.
>> [VIDEO PLAYBACK]
-Wow.
He's moving.
>> -I can kick a soccer ball too.
Here I go.
>> -Hey, good job.
>> [END VIDEO PLAYBACK]
DAVID: Hello, world.
I'm here with CS50's own Colton Ogden.
>> COLTON OGDEN: Hello, everybody.
>> DAVID: And who else do we have with us here today?
>> COLTON OGDEN: This is Now, our little robotic buddy from France.
DAVID: So I actually met NO alongside [? Rob Boden ?]
when he and I were in Atlanta, Georgia a few weeks back
as you may recall at SIGCSE, the Special Interest
Group for Computer Science Education, where literally walking around
the conference room floor was this guy.
Well as it turns out, when we came back to campus
we discovered that Professor [INAUDIBLE] of Harvard's robotics lab
actually had a Now here on campus.
And she's kindly allowed us to program him for you today.
COLTON OGDEN: Yes, and actually, David, I think Now wants to say hello to you
if you want to walk around the table here.
>> DAVID: Right here?
All right.
>> NOW: Hello, David.
Nice to meet you.
>> DAVID: Hello, Now.
Shake his hand?
>> COLTON OGDEN: Shake his hand up and down.
>> DAVID: OK.
>> COLTON OGDEN: And then he'll go ahead and sit down.
And if you're interested, I can actually show you
how I was able to get him to do all these things too.
>> DAVID: Yeah, absolutely.
>> COLTON OGDEN: He's a little off balance this morning.
He hasn't had his coffee yet.
DAVID: So what is this we're looking at?
COLTON OGDEN: So we're looking at here is a core graph, which is now
a graphical programming environment, which is very similar to Scratch
that CS50 uses.
Here we see it's set up like a flow diagram.
And we have a bunch of these little building blocks here.
Now if we take a look at this one for example, it's called stand up.
And this block says stand up for the Now, whether he's sitting down
or whatever.
>> Then we see it goes into tactile head, which basically
waits for a tap on top of his head as you saw earlier.
Move to means move in an x, y, and z direction to a specific destination.
Handshake is a module I wrote, which basically says, hello, David.
Nice to meet you.
Waits for a handshake.
Sit down is the opposite of stand up.
He'll go ahead and sit down.
And then head movement is a loop whereby he
will move his head in random directions.
>> DAVID: Interesting.
So even though these don't look like the puzzle pieces from Scratch,
it's really the same idea.
And you're wiring a program using these building blocks.
>> COLTON OGDEN: Yes, exactly.
>> DAVID: So you said you made one of them, handshake.
Can we zoom in on that one?
>> COLTON OGDEN: Sure.
We'll take a look here at handshake.
And we'll see it's set up very similar to the other flow diagram.
We start off with the hello block, which [INAUDIBLE] says, hello, David.
Nice to meet you.
This right here is a loop.
It says, detect arm movement.
So it will in an infinite loop wait until its arm
has been raised up and down.
And then once that's happened, it'll go ahead and do these things.
Set stiffness OK and go to end, which basically means send him back
to his default position.
DAVID: Interesting.
Are you restricted to only using this graphical environment
to program him in this way?
>> COLTON OGDEN: Actually, no.
If we go ahead and double click any of these building blocks,
we can see that there's actually python code underneath the hood,
powering each of these building blocks.
>> DAVID: Ah, indeed.
So for those unfamiliar, python is an interpreted language,
very similar in spirit to PHP, which we use in CS50.
And much like you can use PHP for web programming,
you can also use it at the command line.
And as Colton is doing here in this graphical environment,
writing programs and then transmitting it via Wi-Fi--
COLTON OGDEN: Correct.
DAVID: --to now.
Would you have some time to stick around?
>> COLTON OGDEN: Absolutely.
>> DAVID: All right.
Well, before Colton comes back with us for a little bit of a surprise,
we now-- get it?-- have 60 seconds of former CS50 students auditioning
to become teaching fellows.
[VIDEO PLAYBACK]
-Thank you.
Thank you, everyone, for being here.
>> -Hey, Mr. Bunny.
>> -Welcome to this brief tutorial on--
>> [INAUDIBLE] fun with Twinkies.
-Wait.
Stop.
>> -So now we have a problem.
-It's not.
And I'm going to tell you why.
-A loop is repetition, like--
>> -Sort of a black box.
>> -OK.
I think I get it.
-All right.
So now I'm in a slightly hard part.
>> -That's right.
8 bits make a byte.
>> -You take a byte and you separate it into chunks of four.
>> -Beep, beep, beep, beep, beep.
Beep, beep, beep, beep, beep.
>> -It seems overly complicated.
>> -So let's do this again.
>> -If I confuse you, please feel free to stop me.
>> -But wait a second.
>> -Well, let's look back at the slide and break things down step by step.
>> -If you remember, memory is broken up into byte-size pieces.
>> -So here we have the best case scenario.
>> -This is a considerable improvement over--
>> -A web browser, like Chrome.
>> -It's always necessary to free any--
-People--
-You may run across.
And the code can get somewhat cumbersome.
>> -And that is all you need.
>> -Boom!
>> DAVID: Now CS50's own Dan Coffey and I recently
had an opportunity to travel out to Mountain View, California,
which is where the headquarters of Google is.
And we had a chance to chat with Susan Wojcicki, the CEO of YouTube.
It was actually in Susan's garage years ago in the '90s
that Google itself was started by Larry and Sergey.
>> Well, it turns out that Susan herself actually took CS50
just a few years before I did.
And I think it's striking as you'll soon hear just how
much an introduction to computer science so influenced her life.
She'd like to say hello.
SUSAN WOJCICKI: Hello, world.
I'm Susan Wojcicki.
I'm the CEO of YouTube.
And I took CS50 when I was a senior at Harvard in 1990.
>> I was actually a history and literature major.
And my junior summer I realized that maybe I
wanted to learn something about computers.
And so I came back.
I took CS50.
It was hard, but it was the most amazing class I took.
It changed how I think about everything.
>> And when I graduated from Harvard in 1990, I went to Silicon Valley
and I got a job.
And I've been working in tech ever since.
So CS50 changed my life.
I continue to learn and build.
It gave me a great foundation.
And I'm continuing to learn every day as the technology changes.
>> And I think it's wonderful that you're all taking it
because that's how the world is going to change going forward.
There's just going to be more and more opportunity and innovation.
Digital is going to affect our lives even more than it already has.
And it's wonderful that you're all taking CS50.
So this is CS50.
>> DAVID: So if you've been looking for a new reason
not to use a certain browser, here's a good one for you.
I recently received-- along with everyone
at Harvard University-- this email here.
>> "Dear Members of the Harvard Community.
The US Department of Homeland Security recommends that all users temporarily
discontinue the use of Microsoft Internet Explorer, IE,
due to a critical security flaw."
>> This is documented actually in Microsoft Security Advisory 2963983.
Vulnerability in Internet Explorer could allow remote code execution.
Now what does this mean and what is the threat?
Well, consider this diagram here, which we
use in CS50 to talk about HTTP or web traffic.
If we have here a web server and on the other side
a browser-- Internet Explorer in this case-- of course,
a browser when it first requests a web page
might send an HDP message like this.
GET index.HTML using version 1.1 of the protocol known as HTTP.
>> Now in this case, if a bad guy has somehow had access to this web server
and installed on it an exploit so to speak,
he or she might be able to convince the web server to return this.
Not only index.HTML itself as requested, but embedded inside
of that index.HTML file could, of course, be other assets.
In particular, something like exploit.SWF,
a flash file that ultimately takes advantage of this security
technique, heap feng shui, which is a fancy way of saying that the code
inside of that flash file sprays the so-called heap inside of the computer's
browser with all different chunks of memory that are designed ultimately
to overwrite big chunks of memory here.
>> If you recall this from our discussion in CS50 of the heap and the stack
and memory management more generally.
Now the memory that's actually thrown on the heap
are really called flash vector objects.
And this is something with which you might be familiar
if you yourself had programmed Flash before.
But one of those objects in particular is known as a flash media sound object.
>> And herein lies an opportunity because what this exploit then proceeds to do
is corrupt this chunk of memory, this object in memory,
such that it tries to make this hexadecimal address executable, thereby
trying to trick the program ultimately to executing some shell code so
to speak, or bad guy's code, that's ultimately stored at this address here,
which was injected by way of downloading unknowingly that particular flash file.
>> Now the end result could be whatever the adversary wants to do to your computer.
He or she could delete your files, move your files, email your files,
or really do anything that you yourself could do as the owner of that computer.
And that's why the threat is so scary.
It allows truly anyone on the internet whose website you
might visit to execute arbitrary programs on your computer.
>> Now thankfully, Microsoft very recently released a fix for this
because the problem actually afflicted Internet Explorer 6
all the way up through 11.
So it's been with us for quite some time and was only recently discovered.
So if you have automatic updates turned on, you should be OK soon.
But just to be safe, you could surely switch to some other browser at least
in the meantime.
>> Now it turns out too that Microsoft very generously
also released a fix for Windows XP, an older version of Windows for which
support was actually officially discontinued just a few weeks ago,
but this threat was so bad that they also rolled out a fix for that OS
as well.
>> Now in other news this week was this.
The Atari 2600, an older game console that a cousin of mine
actually had growing up on which we used to play video games when
we would visit their house.
Now in any case, why this was in the news was for the following reason.
Back in the '80s, the company behind this device, Atari,
decided to bury in a landfill in New Mexico
a whole bunch of old games and instruction manuals
and the like that would otherwise have gone unsold.
>> Now over time, the burial of these games become a bit of an urban myth.
People didn't really know for sure whether this had actually happened even
though, as myth went, the company had even poured a layer of concrete
on top of everything in the landfill to prevent kids
from actually rustling through it, trying to find free video games.
Well, it turns out that a documentary is now in progress now in 2014.
And a team of excavators has been trying to dig up the truth behind this story
if it's indeed there.
>> And guess what they found?
Well, not exactly this guy, but thousands
of copies of his game, which was released
coincident with the release of the movie, E.T. The Extraterrestrial.
So indeed, just in the past few days dozens and hundreds if not thousands
ultimately of these cartridges are starting to be unearthed.
>> Now why did they bury such a clearly compelling game?
Well, it turns out that E.T. is actually reputed
by many to be the worst video game ever.
In part, because they had so little time to develop
the game before that particular Christmas season,
but also because it was particularly hard to play.
This, of course, begs the question, can we see it?
Yes, we can.
Let's take a look.
[VIDEO GAME PLAYING]
Now it wasn't actually the graphics that people took objection
to because, indeed, this was the '80s and this was the state of the art.
Indeed, this was my childhood here.
But what was difficult about this game was, one,
you had a movie ET around the screen, looking
for those little pixels, which represented Reese's Pieces.
But the catch too is that if you fell into those darker diamond shapes,
you would fall into a pit that was actually
very hard and tedious to get out of.
So thus was buried ET.
>> Now also in the desert of late was this here in Wyoming.
A nuclear, not to be confused with [? nucular, ?] control center.
And in fact, if you look down there underneath the concrete
near this white pole, there's actually a Minuteman III missile,
a nuclear missile, that's actually protected by some technology that's
not nearly as modern as you might hope.
An American TV show, 60 Minutes, recently revealed this.
[VIDEO PLAYBACK]
-But the equipment is ancient.
This, for example, is one of the computers that
would receive a launch order from the president.
It uses floppy disks.
The really old, big ones.
Before you got down here, you probably had never seen one?
>> -I'd never seen one until I got down in this hole.
>> [END VIDEO PLAYBACK]
>> Now if you're thinking you've seen these disks,
those 5 and 1/4-inch disks from the 1980s, uh-uh.
This is an 8-inch floppy disk from the 1970s.
Now CS50's own Dan Coffey and I also had an opportunity
to travel to Seattle, Washington recently where
we visited our friends at Valve.
In fact, you may recall 60 seconds of me wearing those virtual reality goggles.
>> Now we also had an opportunity to chat with three of Valve's engineers
who spoke to us about what it's like to work at Valve,
but better yet, what it's like to develop video games.
Let's take a look.
>> [VIDEO PLAYBACK]
>> [VIDEO GAME PLAYING]
-My name is Brian Jacobson.
I made my way to Valve kind of in a slightly circuitous route.
I was not actually a computer programmer in college.
And I was used to back in high school being
able to do programming and get stuff from idea to implementation
in just a few minutes or hours.
I enjoyed that rapid pace of development and seeing my ideas come to life.
>> -My name is Yahn Bernier.
I've been here at Valve for over 16 years.
So I ended up writing just for fun a level editor for Quake
called BSP, based on binary space partitioning trees.
That was sort of the entree.
And eventually Gabe Newell, who was the founder of Valve, and Mike Harrington
sent me an email saying software development engineer opportunity.
-My name is John Cook.
I'm a software engineer working at Valve.
I focus on our online systems, scaling, and architecture.
>> A friend and I actually in university were
working on a game called Team Fortress.
And we just made the game, put it up on the internet.
It was an addition to the game, Quake, at the time.
So it was sort of a modern extension of that game.
After that, we ended up getting in contact with Valve
and coming over here.
>> -Well, for me the graphics class was probably the most applicable course
that I took in college for sure.
Trigonometry, linear algebra.
I took a robotics course that had a bunch of linear algebra kind of baked
into it, and that is one of the keystone math concepts for any 3D graphics.
It's all about orientation and doing the math of like, I'm looking over at you,
but I want to aim over there.
And how do I rotate and how do I figure out where I'm moving or looking.
That is all linear algebra.
>> -The essence of a first-person shooter is that I look through the gun sites
with my eyes and aim at something and pull the trigger
and I want to hit that.
So you have to design your technology to deal with latency.
And so John Carmack went back and said, oh, what I need to do
is predict on the client the result my player's inputs,
and just do that and render from where we
think he's going to be and then let the server come back and fix it for me.
>> -So when you're thinking about using a game engine to make a game,
there's a lot more options now.
>> -A game engine is kind of the infrastructure
in which you make the game.
It's the thing responsible for drawing the world, for simulating the world,
for playing all the sounds, for helping your game code
figure out what the enemy AIs are going to go do.
>> -Usually, the way people would start is they'd take some amount of that logic
and change it.
Like, OK, now let's just change the rocket launcher
to do 200 damage instead of doing 100 damage.
It's a very simple, like, just take some existing piece of gameplay logic
and tweak it to how you like.
>> -The other higher level layer is usually called game code.
And the game code is usually the thing that's all about the game rules.
Like the fact that I have this particular weapon
and it works in a particular way.
Or the fact that there's a headcrab monster that
has these particular behaviors.
Those kinds of things are typically to find as game code.
>> -And from there, really, with those kind of pieces and process of iteration,
you can go from something like Quake to something like Half-Life.
>> -Half-Life is a sci-fi, first-person shooter game.
It's set in a dystopian world.
The first Half-Life was set in this underground research facility
called Black Mesa.
And you played a character named Gordon Freeman.
And it was basically about an alien invasion
that was provoked when an experiment went wrong.
>> And the second game, Half-Life 2, was set about 10 years later,
and basically, the aliens had taken over the planet.
And now you as Gordon Freeman had to basically rescue
your friend, Alex, who you meet.
And try to beat back the aliens and reclaim the planet.
>> -Certainly, projects like Portal 2, it was just
a small team, five people working on a game idea.
They found some things they thought were interesting,
could be interesting for a game.
They expanded to 20 people.
They fleshed out those ideas.
You added some more people.
>> They're like, OK, and now we want to ship on three consoles.
We need a lot more people.
Like everyone, come look at this game.
It's awesome.
It just needs a bunch of work to get done.
So suddenly you have half the company working,
you have 120 people working on this game to get it done.
Obviously, the number of projects elsewhere contracts,
but everyone is super happy because they know
they're working on this thing that's really awesome.
>> -One of the really great things about this job and this industry in general
is that things change all the time.
The thing that you're doing this year is going
to be very difficult from the thing you do the next year.
And so it keeps everything really fresh, actually, and pretty exciting.
You're continually learning new things and doing new kinds of stuff.
[END VIDEO PLAYBACK]
DAVID: That's it for CS50LIVE.
Thanks so much to this week's contributors.
Thanks so much to CS50's own Colton Ogden and the team behind the camera.
This was CS50.
>> [MUSIC - LOS DEL RIO, "MACARENA"]