Placeholder Image

Subtitles section Play video

  • BENEDICT BROWN: This is CS50.

  • I'm David Malan.

  • And you can tell because I'm wearing all black.

  • [LAUGHTER]

  • So, when I'm not being David Malan, I'm Benedict Brown.

  • I'm a lecturer here in the computer science department.

  • And it's really my pleasure to welcome you all to CS50 at Yale.

  • [SCATTERED CHEERING]

  • [LAUGHTER]

  • And we've been doing this-- this is now our fourth year.

  • And it was great the first year.

  • And it's been getting better and better every year since.

  • So I'm really thrilled to be here.

  • This is my second year with it.

  • And we're looking forward to a fantastic year.

  • You will see me throughout the semester, sometimes in the lab for office hours,

  • sometimes when you come see me in my office for office hours,

  • which I encourage you all to do.

  • I also work a lot behind the scenes with the organization

  • of the class with the staff and supporting the staff,

  • making sure that they are in a position to help you and work with you

  • in sections and in office hours.

  • And the other person who is really working overtime

  • all semester long on the course here at Yale

  • is Natalie Melo, who I would like to bring up to introduce herself.

  • And then she'll also introduce you to many of our core staff that are here.

  • And Harvard's David Malan will also be making an appearance, I believe.

  • NATALIE MELO: [CHUCKLES]

  • Hi, everyone.

  • [APPLAUSE]

  • Oh!

  • [LAUGHS]

  • [APPLAUSE CONTINUES]

  • Hi, everyone!

  • Welcome!

  • Happy Thursday!

  • Woo-hoo1 [LAUGHS]

  • [SCATTERED CHEERING]

  • I'm Natalie Melo.

  • I'm the course manager for CS50 at Yale.

  • You'll see me a lot at office hours.

  • I might have my own office hours by appointment this semester.

  • But you'll see me around quite a bit.

  • So when you see me, I hope you smile.

  • [LAUGHS] But I'd like to introduce my amazing staff members.

  • So come on up.

  • [CHUCKLES] Woo-hoo!

  • [APPLAUSE]

  • So we have a full team out here ready to help you out,

  • help you learn computer science--

  • people from all different backgrounds, some not even

  • majoring in computer science.

  • They only took CS50, and they still wanted to help out.

  • So feel free if you see any of them around campus--

  • say hi.

  • Wave to them.

  • If they see you, and they remember your face,

  • they'll obviously wave to you, as well.

  • So, yeah-- let's give a round of applause to our staff.

  • [APPLAUSE AND CHEERING]

  • And now I'd like to hand it off to Professor Malan.

  • DAVID MALAN: [LAUGHS] OK.

  • NATALIE MELO: OK.

  • DAVID MALAN: [LAUGHING] OK.

  • [APPLAUSE]

  • (WHISPERING) OK.

  • [APPLAUSE CONTINUES]

  • Thanks, guys.

  • OK. (WHISPERING) We're good.

  • [LAUGHTER]

  • (LAUGHING) Thanks.

  • (WHISPERING) Thanks.

  • All right.

  • So this is, indeed, CS50--

  • An Introduction to the Intellectual Enterprises

  • of Computer Science and the Art of Programming.

  • And what's perhaps striking is that so many of the folks who just stepped up

  • here alongside Natalie and Benedict were exactly where you are seated here

  • just last year.

  • And so, let's get one detail out of the way.

  • 68% of you have never--

  • if last year is any indication-- studied computer science before.

  • So if you're in this classroom right now,

  • and you're feeling, [SUCKING IN AIR] I'm not so much a computer person,

  • or why am I shopping this class?

  • Odds are, the person to the left of you and maybe even to the right of you

  • is feeling that exact same thing.

  • And if I can say, back in my day, when I first got to college, even

  • I shied away from computer science, even though it's kind of in vogue

  • these days.

  • Certainly, I daresay, it's still a field to beware.

  • An courses like this and others are a bit daunting, I think,

  • if you don't think of yourself as a computer person.

  • And you certainly use computers and mobile phones and all that everyday,

  • but you don't really know what's going on.

  • And god forbid, something goes wrong, it's

  • not really in your wheelhouse to fix.

  • And so ultimately in this class, it's about building

  • comfort and confidence, skills, and a foundation in computer science.

  • And we'll see what that looks like today.

  • And let me start with this message that you'll see in the course's syllabus

  • as well, that what ultimately matters in this course truly is just this,

  • "is not so much where you end up relative to your classmates,

  • but where you, in week 11, and up relative to yourself in week 0."

  • As we'll soon see, computer scientists and programmers

  • tend to start counting from 0.

  • And it's about a 12-week semester.

  • And so by week 11--

  • the 12th-- will you hopefully feel quite the delta versus where you feel today.

  • So what is, then, computer science?

  • And what are we going to get out of this?

  • So I dare say, we could distill it-- maybe oversimplify it-- as just this--

  • inputs and outputs, right.

  • It is problem solving, but using computation, using computers,

  • using hardware, using thought to actually solve those problems.

  • And to solve problems, we take inputs.

  • Now what might the inputs to a problem be?

  • I might want to take attendance and start counting.

  • So the people in this room are the inputs.

  • And the output is the total number of people.

  • Or you have some ingredients in the kitchen.

  • And the goal is to produce dinner.

  • And so your inputs are those ingredients, and the output, of course,

  • is dinner.

  • So that's really what problem solving is.

  • And inside of this so-called black box is where computer science really fits.

  • And giving you the tools and the ideas with which you

  • can take inputs and produce outputs that are of interest to you.

  • But to do that, we have to represent inputs and outputs in some way.

  • Right, I'm using English words right now.

  • And if you're taking math classes, you're

  • probably using math symbols and numbers.

  • If you're taking chemistry classes, you might have yet other symbols

  • to play with, as well.

  • But so we have to represent inputs in this class

  • and in this world of computer science in some way.

  • So how might I represent information?

  • If I'm doing something like attendance--

  • 1, 2, 3.

  • It's not uncommon to do something old school, like, 1, 2, 3, 4.

  • And then we have little tricks just to make it a little more compact--

  • 5, 6, 7, 8, 9, 10.

  • So we can just use hash marks.

  • And I could do that on my hands, too-- not for the whole class.

  • But how high can I count with just one hand?

  • You say five, right?

  • 1, 2, 3, 4, 5.

  • Not really a trick question.

  • But I daresay, I can actually count higher than that on this hand, right.

  • I'm pretty naively just treating each of my fingers

  • at the moment like hash marks on the board.

  • They're just straight lines representing people in this room.

  • But I'm not really permuting them or combining my fingers

  • in any interesting ways.

  • They're just down or up, but from left to right, or from right to left,

  • in your case.

  • So how might I be more clever?

  • Well, what if this is just 0?

  • And what if this is 1?

  • And what if this is 2?

  • So just one finger up still-- so not one, but two.

  • What if this is 3?

  • What if this-- offensively-- is 4?

  • [LAUGHTER]

  • (CHUCKLING) What if this is 5?

  • 5, 5.

  • And 6, and 7.

  • In other words, if I actually take into account

  • the ordering in which I have my fingers up,

  • I can actually count up notably higher.

  • Off the top of one's head, anyone want to ballpark

  • how high I can count on one hand?

  • 30-- yeah, 31, actually.