字幕列表 影片播放 列印英文字幕 And this will be a two part exercise as well. And the first goal 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? DAVID: OK. I'll go first. DAVID MALAN: You're going to go first. All right. So come on over here. And what I'm going to 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 confidently, clearly, to recite step by step instructions by which everyone with their pen or pencil can draw what you see on the screen here. Makes sense? DAVID: Yes. DAVID MALAN: You may use any verbal instructions you like. DAVID: OK. DAVID MALAN: All right. Just about ready to begin? The goal, precision correctness. Begin. DAVID: OK. Step 1. Draw a sideways square. [LAUGHTER] Sideways. 45 degrees rotated. Yeah. DAVID MALAN: OK. DAVID: From the bottom three corners, draw a straight line down that's approximately the length of each side of the square. DAVID MALAN: Unfortunately, programs cannot ask questions of programmer. So we continue on with the next step. DAVID: And finally, between the first and second line, draw a line connecting the two at the end. And between the second and third line, draw a line connecting the end. DAVID MALAN: All right. How do you feel about your instructions? Precise and correct? DAVID: Wishy-washy. DAVID MALAN: Wishy-washy. OK. All right. So let's go ahead. Hang on to the mic for just a moment. I'm going to hop down into the audience with our TFs just to grab a few representative solutions. If you wouldn't mind my grabbing a few sheets of paper from folks who have participated. Let me take a few over here, just a random sample. Welcome to volunteer proactively or keep it to yourself. Let me go in over here. OK. Thank you so much. Any takers over here? OK. All right. Good. Thank you. And all right. The TFs are grabbing a couple too. See some over here. All right. That should do. Let me grab these from Brian over here and Emma. Oh, those are blank. All right. So I think we have plenty over here. So let's take a look before we do part two of two, if I may, at how well David programmed the audience. I'm going to go ahead in just a moment and pull up a projection of some of these drawings here that are the results of these operations. So let me flip through. Get a sample here. And I see a lot of good options here. I see this picture here, which perhaps resembles what you drew. See this one here the top corner, very similar in spirit. This one left a lot of room for other things but-- [LAUGHTER] This one was a little more abstract, if I may. [LAUGHTER] And so, let me go over to a spoiler to show you what it is David was programming you to draw. And with some suspense, he was compelling you to draw we hope this here. All right. So close or not close perhaps. All right. Round of applause for David, if we could. [APPLAUSE] DAVID MALAN: Thank you. One moment. And so, you gave pretty-- you used, if you would, abstractions in discussing this. You said a sideways square, used 45 degree angles hoping that folks would presumably know what you mean by that. Why did you not just say draw a cube, for instance? DAVID: I thought that would be cheating. DAVID MALAN: OK. Well, it would not have been cheating, but it would have been a wonderful abstraction. If everyone in the room, assuming, knows what in a cube is, you might then be compelled to draw it quite quickly. But that, too, leaves ambiguity and lacks precision. Well, how is the cube oriented? Is it this way? Is it that way? Is a curved this way? So sometimes, these abstractions aren't sufficiently helpful. So I probably would have done what you did as well. Now let's do one other example here, if we could. I'm going to go ahead in just a moment and project an image onto the screen that everyone in the audience can see except you two. Let me go ahead and re angle this a little bit. And if father and son would like to get together or solo draw a picture that the audience is going to tell you how to draw. So we're going to flip the roles now. You all will see the drawing on the screen. We ask that you tell our volunteers what to draw. You can use any words that you want, but you cannot ask questions and no physical gestures to explain. All right. Unfortunately, it's a little hard technologically here in that the solution is going to be there. The solution is going to be there. So we're going to have to put some visors on you, if we could-- [LAUGHTER] --so that you can only see straight forward. And if you don't mind hugging the board as close as possible, but occasionally back up so that people can see what you're drawing, but resist the temptation to look up, over left or right. All right. So for our audience then, the images. And if you two could focus only on the board now. Only on the board and definitely not facing that screen. OK. [LAUGHTER] The audience is about to see the picture in question. And so, we need a volunteer first from the audience to call out an instruction. Any step ones? Over here. Make a circle. [LAUGHTER] I heard a small-- I heard draw a smaller circle. I didn't hear use the eraser, but OK. OK. No looking at me. All right. So I'll take a third step. So let's go to someone else. Yeah. AUDIENCE: Draw a vertical line. DAVID MALAN: Draw a vertical line. AUDIENCE: From the center of the circle. DAVID MALAN: From the center of the circle. AUDIENCE: From the bottom of the circle and down. DAVID MALAN: From the bottom of the circle and down. AUDIENCE: Large stick figure that appears to be walking. [LAUGHTER] DAVID MALAN: I hear an abstraction. So we were also given a fourth instruction. Draw a stick figure that appears to be walking, if that helps. But I think we're going to need to be more precise here because I can imagine a stick figure doing multiple things in multiple-- [LAUGHTER] With-- [LAUGHTER] OK. Maybe step five. Do we want to make any tweaks? AUDIENCE: It's an almost upside down triangle. DAVID MALAN: Draw an almost upside down triangle, I heard. AUDIENCE: For the legs. DAVID MALAN: Through the legs. AUDIENCE: For the legs. DAVID MALAN: For the legs. AUDIENCE: After the vertical line coming down. AUDIENCE: You need to erase the legs. DAVID MALAN: OK. I heard erase the legs. AUDIENCE: Get rid of the arms. DAVID MALAN: And get rid of the arms. [LAUGHTER] OK and step five was? AUDIENCE: From the bottom of the vertical line, the body, make the two legs are like a triangle without the bottom. DAVID MALAN: From the bottom of the body, draw like a triangle to represent the legs. AUDIENCE: But not-- [LAUGHTER] DAVID MALAN: But not that way. That's good. Let's move on to step six. Step six. Someone over here. AUDIENCE: So once they erase that triangle, from the bottom of the vertical line, draw an upside V, where the center of the V is touching the bottom of that bottom line. DAVID MALAN: From the bottom of the straight line, draw an upside down V. I think we did that. Can you step aside just so the audience can see? Now we have a tripod. OK. [LAUGHTER] OK. So I think we're there. I think we're there. One other instruction. Let's see if we can take this home. Yes, right here. AUDIENCE: Draw a less than symbol, starting from the base of the middle of the circle. DAVID MALAN: Draw a less than symbol from the base of the middle of the end of the circle on the left side. DAVID: Wait, a less than symbol. DAVID MALAN: Less than symbol. Yep. DAVID: Less than. DAVID MALAN: Yes. DAVID: Here? DAVID MALAN: So this is what we call a condition. So, yes. AUDIENCE: Correct. DAVID MALAN: Correct, I hear. OK. I think we're close. Two more steps, maybe. AUDIENCE: To the top of the circle, write the word Hi with a capital H and lowercase I. DAVID MALAN: OK. From the top left of the head, draw the word hi, capital H lowercase I with-- I think did you say a line to it? AUDIENCE: Yes, with a line. DAVID MALAN: With a line to it. Yeah. AUDIENCE: [INAUDIBLE] DAVID MALAN: OK. And can you step aside, just so the audience can see? I think we need just one more step. One more step. OK. Back here. AUDIENCE: From the bottom of the circle on the right hand side-- DAVID MALAN: From the bottom of the circle on the right hand side-- AUDIENCE: --touching the base of the circle and the vertical line going down-- DAVID MALAN: --touching the base of the circle and the vertical line going down-- AUDIENCE: --make the letter L-- DAVID MALAN: --make the letter L-- AUDIENCE: --at a 15 degree angle. DAVID MALAN: I heard at a 15 degree angle? Sure. [LAUGHTER] OK. I think-- I think could we have you take several steps back and look up? And round of applause for our volunteers. [APPLAUSE]
B1 中級 CS50 2019-閱讀8-精準 (CS50 2019 - Lecture 8 - Precision) 3 0 林宜悉 發佈於 2021 年 01 月 14 日 更多分享 分享 收藏 回報 影片單字