Placeholder Image

Subtitles section Play video

  • wait.

  • All right, This is CS 50.

  • And just eight weeks ago, 2/3 of you had never studied any computer science before.

  • And what we thought we'd begin with today is really a look back of truly how far you've come over just those several weeks.

  • In fact, it was just eight weeks ago when you first started tinkering with scratch this graphical programming language by which you could drag and drop puzzle pieces and making the computer do what you want.

  • And then a week later, you might have struggled with just getting Mario to ascend.

  • Appear mid by way of hash is that you were printing with at the time was perhaps quite non obvious.

  • But it's ever since has just been what a pair of nested four loops.

  • And then the week after that, you explored cryptography among other fields, and you learned how to encrypt.

  • And you've decrypted information like this snippet here.

  • After that, you explored some electoral processes and the implementation of algorithms that you might be familiar with from the real world, but perhaps didn't think about the trade offs and choosing one algorithm or another and then ultimately implementing it in code just a week later.

  • Did we transition to filters on instagram, implementing things like your own C P a filter so that moving forward, hopefully it won't take for granted.

  • When you click that button on the screen on your phone, you actually know where can presume we're in for what's going on underneath the hood as it changes from one setting to another.

  • And then, of course, big Board, where we handed you some 140,000 English words in a really large file.

  • And you had to implement your own spell checker a dictionary, so to speak with, using as few was using his little amount of time in his little space as you could, implementing ultimately your own hash table.

  • Thankfully, since then, we can all take for granted that those things exist.

  • But you indeed built that from scratch.

  • Just a week later, we started handing you large files like this, and of all things you were able to deduce by writing some python code that this is Lavenders Deanna, among others in the class of whose files we handed you and then most recently, or perhaps quite soon.

  • Well, you learn to apply another language in this case sequel to questions like Who has starred in films with Kevin Bacon?

  • And so a number of tools are now in your tool kit.

  • And again, I would just emphasize that eight weeks ago, 2/3 of you had never done any of that before.

  • So even if it's felt like it has never let up in each week feels all the more challenging than last.

  • Consider the Delta and consider what we promised in the first week of the class that would ultimately matters in this course is not so much where you up relative to your classmates but where you end up relative to yourself when you began.

  • And it is indeed those eight weeks ago that you began.

  • And it's today and in the course is final weeks that you will ultimately be able to compare yourself.

  • So in trying to think today about what we hope your own takeaways are from not only the course, but computer science More generally, I actually pulled up some of my own notes you might recall from Week Zero that I mentioned I took this course myself back in 1996 and what happened to be the one that turned me from a government major to a computer science major, and I didn't take many notes at first.

  • It seems, in that first class, there were a couple of other pages, and so I started flipping through these And in fact, this was my second page of notes.

  • And if you focus what's on what's up here at the top?

  • Apparently one of my first notes to myself at a function for those unfamiliar today our instructions that do the work on.

  • Indeed, if I looked down further on my notes arguments, we introduce that same first day.

  • It's info that's passed from one function to another toe.

  • Have something done by or performed on it.

  • All right, so that actually maps wonderfully cleanly to what it is.

  • We indeed started ourselves doing those eight weeks ago just talking about what CS is problem.

  • Solving a problem is just something that's got input.

  • And the goal, of course, is to produce something with output.

  • And we had to agree from that very first week how we're gonna represent these inputs and outputs, and so we might do it symbolically with letters of the alphabet we know since then, with that, we might new do it numerically, as with decimal digits or under below that we might just use binary, a different based system using only zeros and ones.

  • Or we could even represent that same capital A just using some pattern of light bulbs or switches that you turn on in some order.

  • In fact, if you think back then to these first principles that we introduce those weeks ago 20 of the students now in the audience what does this say?

  • Hi.

  • So what, indeed says hi.

  • Why is that what we just agree in weeks ago, On what numbers map to what letters?

  • And so long as all of the humans in the world agree on that, whether sending e mails or text messages or the like, our computer systems can all present information that we ultimately understand.

  • Another review question from Week zero.

  • What did this say way back when, If you need a hint, it was it was investing 128,514.

  • That way a little letter emoji.

  • This was the face with tears of joy, Right, taking all of the fun out of sending emojis Anytime you receive or send an emoji, really, all you're sending is a pattern of zeros and ones or worse the number 128,514.

  • But your computer or phone are presenting it to you in a certain way based on that context, all based on just how we humans are.

  • Those before us decided how to represent this information.

  • But of course, we don't have just those inputs and outputs.

  • There are another piece to the puzzle in, so I actually look back on my own third page of notes here and focused on my first line here back in 1996.

  • An algorithm is apparently a precise sequence of steps for getting something done, and programming more generally is, ah, process of taking an algorithm and putting it into a language a computer can process.

  • And indeed, that really was the additional puzzle piece we first focused on in Week zero.

  • It was what was inside the proverbial black box, the sort of secret sauce that you provide your input to.

  • You get your output from those air the algorithms that we've been talking about ever since now, not just in pseudo code or in English, but in CNN Python and now sequel in the coming weeks.

  • Ah, few other languages as well.

  • But of course we used algorithms to solve problems.

  • And one problem is, isn't was rather old school, and we thought we'd reflect just a bid and perhaps reinforced that same week, zero it by taking a couple of volunteers, perhaps a student and one of their family members, voluntarily or forcibly, with them.

  • You have to be comfortable, though appearing on stage and in turn, the Internet in perpetuity is the catch.

  • I see.

  • Okay, I see one volunteer and either mom or dad fighting out who's not going to go up.

  • Okay, Come on up.

  • A round of applause, if we could for our volunteers.

  • Come on over this way.

  • And what is your name?

  • Daniella.

  • Nice to meet you.

  • Come on over here.

  • And what is your name?

  • Mariano.

  • And your dad, I presume.

  • All rights.

  • Well, so nice to see you both.

  • You'll recall from week zero that one of the first problems we solved was looking up someone in a phone book.

  • Well, here I have a pretty thick yellow pages wherein there's a whole bunch of products and service is alphabetized from A to Z, and we can, of course, look up the number for someone in this book.

  • For instance, Supposed today we need Ah, plumber.

  • Could we ask Mariano to find us a plumber in this phone book?

  • Flipping through a few pages?

  • A lot of pages?

  • Yeah.

  • Okay.

  • All right.

  • And we have a page full of plumbers.

  • And now could your dad have done better?

  • Do you think?

  • I think so.

  • So would you like to show?

  • Ah, dad and other parents here what you might have done instead?

  • Oh, my goodness.

  • Okay.

  • Thank you.

  • And for those wondering, let's continue the algorithm, if you will.

  • What's your next step?

  • Nice.

  • And why are you doing this, though?

  • I opened halfway.

  • And then if it's not on the it's like we'll need to is a little strong, but you can get rid of Yes, indeed.

  • So if you keep this process going, having and having in having what should you be left with?

  • Ultimately, just the letter piece.

  • A round of applause, if we could for both of our volunteers here.

  • Thank you.

  • CS 50 stress ball for you both.

  • Thank you so much.

  • Oh, thank you.

  • Thanks.

  • So that was one of the first lessons with what you began focusing on algorithms.

  • And the point back then recall was to really emphasize the familiar right.

  • We might not use that particular technology all that much anymore, but it really is fundamentally the same thing that's now in our iPhones and Android devices and the life.

  • It just so happens that we search for things by strolling with our finger up and down.

  • But consider to even these days and 2019 when you type into the auto complete to search for someone by first name or last name.

  • How is your phone finding that information?

  • It's exactly like that not quite as physically as that, but most likely for efficiency.

  • Your phone is looking roughly in the middle of all of those names, then jumping up or down in the blink of an eye in order to find that person for you ever so quickly.

  • And so all of us might have an intuitive understanding It just like Mariano did for finding plumbers by jumping to the P section.

  • But then you came close to the p section but then started flipping.

  • And I dare say you you flip through far more pages than you ultimately needed to using arm or efficient, divide and conquer if one time only algorithm instead.

  • So beyond algorithms recall, um, I recall that I had just a few other notes.

  • My last page of notes.

  • I also had this year that what was apparently important then and no less so now is that in computer science and in turn, programming precision is important and correctness is important.

  • And indeed, one of the things you perhaps gleaned in programming, whether in scratch or see or python or sequel over the past few weeks is that the computers are really unforgiving, right?

  • They can't just in for like we humans do.

  • And frankly, I'm not sure we would want our computers to Justin.

  • For sometimes what we mean.

  • If the goal is precision and correctness, you need to be ever so precise.

  • So let's see, perhaps with one more demonstration, just how much this one has percent perhaps sunk in.

  • If we could get perhaps two more volunteers of students and family member as well student and family member here and I don't see a family member's hand up.

  • Can you convince one?

  • Okay, come on up.

  • Wonderful.

  • A round of applause for our other power volunteer, sir.

  • So now for this one, not everyone's off the hook.

  • If all of the students in the room, if they have a piece of paper and or pen or pencil could take that out and share with anyone next to you if you don't have Emma and Brian are also gonna pass out some paper and pens if you don't have a writing apparatus.

  • The goal at hand is actually for all of us to participate, thanks to our two volunteers.

  • And what's your name?

  • David.

  • Nice to see you.

  • Nice to see you as well.

  • Come on over in here.

  • And this will be a two part exercise as well.

  • And the first go at hand is for you to choose.

  • Do you want to go first or Dad?

  • Is it?

  • Would you like your dad to go first?

  • You're gonna go first.

  • All right.

  • So come on over here.

  • And what I'm gonna show David in just a moment is an image on the screen that I'm going to ask that he program you the audience to draw, giving verbal instructions only the goal of which is for him to be as precise as possible and as correct as possible to compel the audience much like a computer to follow his instructions and, in turn, implement your algorithm.

  • So in just a moment, David is going to rattle off step by step instructions for having everyone in the audience draw this.

  • You are the only one that can see what's on the screen.

  • Everyone in the audience just about has a piece of paper and a pen or pencil, and I just need you very confident Leah, clearly to recite step by step instructions by which everyone with their pen or pencil can draw what you see on the screen here make sense.

  • You may use any verbal instructions you like.

  • Okay, all right.

  • Just about ready to begin and the goal.

  • Precision correctness begin.

  • Okay, step one.

  • Draw sideway square sideways are 45 degrees rotated okay from each.