WEBVTT 00:00:11.519 --> 00:00:14.778 This presentation is delivered by the Stanford Center for Professional 00:00:14.778 --> 00:00:21.778 Development. 00:00:22.609 --> 00:00:25.029 So welcome to CS106A. 00:00:25.028 --> 00:00:28.419 If you don't think you should be in CS106A, you think you should be somewhere 00:00:28.419 --> 00:00:30.679 different, now is probably a good time 00:00:30.678 --> 00:00:33.838 to go, not that I would discourage anyone from taking this class. I think we'll have a lovely 00:00:33.838 --> 00:00:34.988 time in here. 00:00:34.988 --> 00:00:39.759 But this class is CS106A or E70A, so if you're, 00:00:39.759 --> 00:00:43.058 like, "Wait. I thought I was in E70A," you're fine. They're the same class; it's the 00:00:43.058 --> 00:00:45.280 same thing. No worries, 00:00:45.280 --> 00:00:48.689 okay? There's four handouts. They're in the back. If you haven't already gotten the handouts because you came in and 00:00:48.689 --> 00:00:51.669 you sat down, don't worry. You can pick them up on the way out. They're 00:00:51.670 --> 00:00:54.300 the same handouts. They'll still be there. 00:00:54.299 --> 00:00:55.939 So 00:00:55.939 --> 00:00:59.519 just a quick introduction. That's what the first four handouts actually give you. 00:00:59.520 --> 00:01:02.680 They give you a little bit of an introduction to the class, what we're gonna cover, some 00:01:02.679 --> 00:01:05.629 logistics for the class and some other stuff. I'm gonna go over all 00:01:05.629 --> 00:01:10.379 that today so we can sort of get a good idea for where we're at, okay? So just a quick show 00:01:10.379 --> 00:01:13.920 of hands before we get into a bunch of things in the class. 00:01:13.920 --> 00:01:17.820 This is kind of an intro-programming course; well, it is. I shouldn't say it's kind of an 00:01:17.819 --> 00:01:19.978 intro-programming course. It is an intro-programming course. And 00:01:19.978 --> 00:01:23.739 it's always good to get an idea as to how much familiarity you may have 00:01:23.739 --> 00:01:25.058 beforehand, okay? 00:01:25.058 --> 00:01:27.239 So just quick show of hands. 00:01:27.239 --> 00:01:31.329 How many people can recognize a computer that's on? 00:01:31.329 --> 00:01:35.829 Good, good. That's the prerequisite for this class. So if you're worried about 00:01:35.829 --> 00:01:38.450 how much previous experience you've had 00:01:38.450 --> 00:01:42.420 or your friend who, like, worked their way through high school by programming for Google or 00:01:42.420 --> 00:01:43.159 whatever, 00:01:43.159 --> 00:01:46.460 don't worry about it because all you need to know in here is basically 00:01:46.459 --> 00:01:50.048 either how to turn a computer on or to recognize a computer that's on if you 00:01:50.049 --> 00:01:53.090 were to walk up to it and it were already to be on, all right? 00:01:53.090 --> 00:01:56.728 So but a little bit more seriously, how many people have actually used a computer 00:01:56.728 --> 00:01:59.049 for anything? 00:01:59.049 --> 00:02:02.420 All right. I would expect most of you. So now, we begin to bump it up 00:02:02.420 --> 00:02:05.409 a notch. How many people have used it for word processing? 00:02:05.409 --> 00:02:09.568 Okay. Most folks. How many people have done web browsing? 00:02:09.568 --> 00:02:13.318 Yeah, I won't ask you what you look at, all right? It's just I don't wanna know. 00:02:13.318 --> 00:02:17.198 How many people have actually created a web page? Okay. 00:02:17.199 --> 00:02:22.629 Fair number. How many people have done any kind of programming before? 00:02:22.628 --> 00:02:23.709 Fair number. 00:02:23.709 --> 00:02:28.618 All right. How about how many folks have done actually programmed in Java before? 00:02:28.618 --> 00:02:34.188 All right. A few folks. How about another language, C, C++, 00:02:34.188 --> 00:02:35.049 BASIC, 00:02:35.049 --> 00:02:37.680 anyone program in BASIC? Yeah, 00:02:37.680 --> 00:02:41.159 oh, I love - that was the first language I learned, and it was kind of 00:02:41.158 --> 00:02:44.900 like the warm and fuzzy, and I felt good. There was actually people who argued that if you learn 00:02:44.900 --> 00:02:48.489 BASIC as your first language, you're brain damaged, then you're just beyond help. But if 00:02:48.489 --> 00:02:49.150 that's the case, we're all 00:02:49.150 --> 00:02:52.120 in the boat together because I'm probably brain damaged as well. The truth is I 00:02:52.120 --> 00:02:54.618 probably am, but that's a whole different story. 00:02:54.618 --> 00:02:57.929 All right. So one thing you should know kind of up front is actually this course 00:02:57.929 --> 00:03:01.489 is gonna be provided eventually somewhere down the line as part of 00:03:01.489 --> 00:03:03.789 Stanford School of Engineering Free Course Initiative, 00:03:03.789 --> 00:03:07.120 which means not only are we recording this course to broadcast to a bunch 00:03:07.120 --> 00:03:09.990 of companies and industry who are watching this course, but we're eventually 00:03:09.990 --> 00:03:12.099 gonna provide it free to the world. 00:03:12.098 --> 00:03:13.979 So how does that impact your life? 00:03:13.979 --> 00:03:16.888 And on the average day, it doesn't at all. 00:03:16.889 --> 00:03:19.749 The only way it does impact your life is just so you should know, the lawyers told me to 00:03:19.748 --> 00:03:20.840 tell you that your 00:03:20.840 --> 00:03:24.250 voice, should you ask a question, may actually be recorded as part of the 00:03:24.250 --> 00:03:25.308 video. 00:03:25.308 --> 00:03:29.079 As a result, your voice may end up going out to thousands of people or millions 00:03:29.079 --> 00:03:30.550 of people in the world. 00:03:30.550 --> 00:03:33.020 If you have an issue with that, come talk to me. 00:03:33.020 --> 00:03:37.000 If you don't, everything is just fine, all right? Don't worry. We're not gonna put your picture up 00:03:37.000 --> 00:03:39.748 or anything like that. You might wanna be on the video, like, "Hey, 00:03:39.748 --> 00:03:40.609 ma, I'm on 00:03:40.609 --> 00:03:43.889 TV." We decided that we're just gonna not show anyone actually on the video, 00:03:43.889 --> 00:03:46.129 but your voice may actually get recorded, okay? 00:03:46.128 --> 00:03:49.828 Now, along those lines, you may also notice there are some microphones in the room. 00:03:49.829 --> 00:03:52.709 So when you wanna ask a question, please make sure to use the microphone 00:03:52.709 --> 00:03:56.209 because that's not only good for people in here to be able to hear your question, 00:03:56.209 --> 00:03:59.579 it's also good for all the folks that this is getting broadcast to because not 00:03:59.579 --> 00:04:02.289 only are we gonna broadcast to the world, but there's actually some folks who are sort 00:04:02.288 --> 00:04:05.578 of watching this live now in various companies in Silicon Valley. 00:04:05.579 --> 00:04:08.389 So it's real important that you actually use the microphone, so just remember that. And 00:04:08.389 --> 00:04:11.130 every once in a while, I might get on your case and be, like, "Please use the microphone." 00:04:11.129 --> 00:04:14.599 I'm not trying to be argumentative or anything. I just wanna make sure we 00:04:14.599 --> 00:04:16.488 pick up all the audio, all 00:04:16.488 --> 00:04:19.560 right? So with that said, a little bit of an introduction. That's kind of a way of background. 00:04:19.560 --> 00:04:22.550 I didn't give you any sort of introduction. So just to introduce myself, my name's 00:04:22.550 --> 00:04:25.379 Mehran Sahami. I'm the professor for the class. 00:04:25.379 --> 00:04:28.228 Don't call my Professor Sahami, way too formal. 00:04:28.228 --> 00:04:31.899 Don't call me Mr. Sahami. That, I think of my dad. 00:04:31.899 --> 00:04:35.098 And don't call me Mrs. Sahami, or we're gonna have issues, all right? 00:04:35.098 --> 00:04:36.219 So just call me 00:04:36.220 --> 00:04:40.520 Mehran. We'll get along. It's just fine, all right? It's to keep things a little bit more 00:04:40.519 --> 00:04:43.490 informal, but that way it's a little bit easier to discuss stuff as you go along. 00:04:43.490 --> 00:04:46.949 There is also a head TA for the class, Ben Newman, who's standing up there. Get to know 00:04:46.949 --> 00:04:47.980 Ben. 00:04:47.980 --> 00:04:51.700 He has all the real power in this class. I'm just kind of the monkey that gets up here and 00:04:51.699 --> 00:04:54.159 gives the lectures. But Ben really is the one who's got all the 00:04:54.160 --> 00:04:55.189 power. 00:04:55.189 --> 00:04:57.829 Along with the head TA for the class, we have a large section leading staff. So 00:04:57.829 --> 00:05:03.519 the section leaders here, could you stand up if you're here? They're kind 00:05:03.519 --> 00:05:06.408 of all over the place, some over here, some over there, and some over there. As 00:05:06.408 --> 00:05:09.889 you can see, there's a pretty large number of folks. And this isn't even all of them. 00:05:09.889 --> 00:05:12.759 We sort of have more - we just can't stuff them all into the room - 00:05:12.759 --> 00:05:16.800 who are section leaders for the class, and these folks are all here to make sure 00:05:16.800 --> 00:05:20.189 that everyone in this class has as good an experience as possible when 00:05:20.189 --> 00:05:22.889 we're sort of going through the class. And the best way to reach all of us is 00:05:22.889 --> 00:05:26.300 email. So on Handout No. 1, you get my email and Ben's email. 00:05:26.300 --> 00:05:30.090 We'll tell you how to sign up for section. That's how you'll meet your section leader and get your section 00:05:30.089 --> 00:05:33.810 leader's email. That will all be coming soon. But email really is kind of a happy form of 00:05:33.810 --> 00:05:35.250 communication to 00:05:35.250 --> 00:05:37.059 get a hold of us, okay? 00:05:37.059 --> 00:05:40.460 So with that said, I wanna tell you a little bit about this class and kind of 00:05:40.459 --> 00:05:43.478 what we're gonna do in here and what you should expect and make sure that 00:05:43.478 --> 00:05:43.930 00:05:43.930 --> 00:05:47.519 you don't feel scared off by this class, okay? Because it really is meant to sort of be an 00:05:47.519 --> 00:05:48.750 interesting time. 00:05:48.750 --> 00:05:52.579 But one question that comes up is why is this class called Programming 00:05:52.579 --> 00:05:53.219 Methodology, 00:05:53.220 --> 00:05:56.259 right? Why don't we just call this class, like, 00:05:56.259 --> 00:05:57.679 Programming with Java? 00:05:57.678 --> 00:06:00.768 And the real reason for that is that programming methodology is about good 00:06:00.769 --> 00:06:03.759 software engineering principles. It's about something that's much larger than 00:06:03.759 --> 00:06:07.139 just programming. So some people, like, they'll go and get a book somewhere and they'll 00:06:07.139 --> 00:06:09.859 think they learned how to program by just reading the book. And they're, 00:06:09.858 --> 00:06:12.688 like, "Oh, I know how to program. Isn't that great?" And it's, like, 00:06:12.689 --> 00:06:15.729 yeah, you might know the mechanics of the language, but the mechanics of the 00:06:15.728 --> 00:06:18.829 language are nothing compared to understanding the software engineering 00:06:18.829 --> 00:06:19.658 principles 00:06:19.658 --> 00:06:23.060 that go into actually developing a software system. And that's what you're gonna 00:06:23.060 --> 00:06:26.189 learn about in this class. You're gonna learn a lot of those principles. But in order 00:06:26.189 --> 00:06:27.010 to be able to use 00:06:27.009 --> 00:06:30.620 those principles and apply them, you also need to have the language to program in, 00:06:30.620 --> 00:06:33.850 and that language that we're gonna use in this class is Java. So the way I like to 00:06:33.850 --> 00:06:36.930 think about it and the way I tell a lot of people is writing a good program or 00:06:36.930 --> 00:06:40.310 learning how to program is like learning to be a good 00:06:40.310 --> 00:06:41.649 essay writer. And you're, like, "Oh, but part 00:06:41.649 --> 00:06:45.519 of the reason I'm taking this class, Mehran, is that I don't like writing essays." That's fine. 00:06:45.519 --> 00:06:49.028 It's okay. Trust me. I didn't like writing essays either. But 00:06:49.028 --> 00:06:52.389 the whole point is that when you write an essay, it's not a formulated kind of 00:06:52.389 --> 00:06:55.538 thing. You're, like, "Well, what about five-paragraph essays?" Yeah, just block that from 00:06:55.538 --> 00:06:59.818 your mind. That was a bad time, right? That was just, like, '70s education at work. 00:06:59.819 --> 00:07:02.968 It's not a formulated kind of thing. There's an art to writing an essay, 00:07:02.968 --> 00:07:05.959 right? In order to write an essay, you need to know a language. You need to know English or German or 00:07:05.959 --> 00:07:08.079 Hindi or whatever language you wanna use, 00:07:08.079 --> 00:07:10.659 but then you use that language to write an essay. 00:07:10.660 --> 00:07:13.710 Just knowing the language doesn't make you a good essay writer though. Being 00:07:13.709 --> 00:07:16.498 a good essay writer makes you a good essay writer. 00:07:16.499 --> 00:07:19.709 So that's the same difference in programming and software engineering. Knowing the 00:07:19.709 --> 00:07:23.228 language, in order to be a good programmer, like a good essayist, 00:07:23.228 --> 00:07:26.829 you need to know a language to write your programs in, whether that be Java or C or 00:07:26.829 --> 00:07:29.609 C++ or whatever. Here we're gonna use Java. 00:07:29.610 --> 00:07:33.229 But just knowing the language doesn't make you a good software engineer and 00:07:33.228 --> 00:07:36.478 doesn't make you understand what the principles are of writing good software, 00:07:36.478 --> 00:07:39.558 which is what you're also gonna get in this class in addition to the language, and that's kind of 00:07:39.559 --> 00:07:41.719 a key thing to stress. 00:07:41.718 --> 00:07:44.759 So if you're sort of worried, if you were kind of looking around and you saw a bunch of people raising 00:07:44.759 --> 00:07:46.160 their hands when I asked, "Do 00:07:46.160 --> 00:07:49.080 you have any previous programming experience?" and some folks raised their 00:07:49.079 --> 00:07:53.079 hands, and you got a little worried and you're like, "Oh, am I gonna be in some sense at 00:07:53.079 --> 00:07:56.659 a disadvantage because I haven't done any programming before?" The answer, plain and 00:07:56.660 --> 00:07:58.409 simple, is no, okay? You're 00:07:58.408 --> 00:08:00.819 gonna learn everything you need to learn from the first principle because as a 00:08:00.819 --> 00:08:01.900 matter of fact, 00:08:01.899 --> 00:08:05.579 in some cases you might be in slightly better shape. That's not necessarily to say 00:08:05.579 --> 00:08:07.680 that that's the way it will be. But 00:08:07.680 --> 00:08:11.228 how many people are Star Wars fans? Just wondering. Anyone? I'm 00:08:11.228 --> 00:08:14.308 talking about the old-school, original, like, three movies. Those were so good, and 00:08:14.309 --> 00:08:17.949 we're not - no George R. Binks here, all right? 00:08:17.949 --> 00:08:22.090 So if you remember - and sort of I'm a big Star Wars fan, and that's just a whole 00:08:22.089 --> 00:08:22.919 separate point. 00:08:22.920 --> 00:08:26.460 But in the second movie, Yoda actually said something which I thought was quite 00:08:26.459 --> 00:08:27.979 profound, which is he says 00:08:27.980 --> 00:08:31.030 sometimes you have to unlearn what you have learned. 00:08:31.029 --> 00:08:34.448 And one of the things we actually find is that some people who are self-taught programmers, 00:08:34.450 --> 00:08:36.909 some of them are just fine, and some of them are very good. 00:08:36.909 --> 00:08:39.828 But some of them have picked up some really bad habits along the way, and it's 00:08:39.830 --> 00:08:41.460 like being a bad essay writer. 00:08:41.460 --> 00:08:45.070 And to go from being a bad essay writer to a good essay writer, in some cases, can 00:08:45.070 --> 00:08:46.280 actually be harder 00:08:46.279 --> 00:08:49.350 than from not being an essay writer to being a good essay writer because you 00:08:49.350 --> 00:08:51.339 have to unlearn the bad habits. 00:08:51.339 --> 00:08:54.450 So if you're worried about, "Oh, I've had no previous experience," 00:08:54.450 --> 00:08:57.460 don't worry. You're okay, blank slate, you're just fine. And now if you're thinking, 00:08:57.460 --> 00:09:00.940 "Oh, I have some previous experience. Do I have bad habits?" Don't worry. You'll be 00:09:00.940 --> 00:09:04.880 fine, too, okay? So it's all gonna work out. 00:09:04.879 --> 00:09:07.720 So the next question that kind of comes up - hopefully that helps put some of your fears 00:09:07.720 --> 00:09:08.300 aside. 00:09:08.299 --> 00:09:12.120 Another one of the things is that we really strive to make everyone successful in this 00:09:12.120 --> 00:09:13.669 class, okay? At some other schools, 00:09:13.669 --> 00:09:16.698 people wanna do computer science or they wanna do an 00:09:16.698 --> 00:09:19.438 engineering major or whatever. And you come into the first day of class, and they say, 00:09:19.438 --> 00:09:23.088 "Oh, only one third of you are actually gonna make it through this program. And 00:09:23.089 --> 00:09:25.800 look to the person to your left and look to the person to your right, and only one 00:09:25.799 --> 00:09:28.370 of you will make it through." And you're, like, "Oh, 00:09:28.370 --> 00:09:29.948 man, that's real nice." 00:09:29.948 --> 00:09:33.438 It's not like that here. As a matter of fact, we want all of you to be extremely 00:09:33.438 --> 00:09:37.248 successful in this class, which is why we have a huge course staff, which is why over years 00:09:37.249 --> 00:09:40.379 and years we've refined how we do a lot of the teaching in this class 00:09:40.379 --> 00:09:43.730 to make sure you have the best possible experience and to make sure that everyone 00:09:43.730 --> 00:09:44.990 gets through. 00:09:44.990 --> 00:09:48.779 And the important thing about that is that you're not competing against anyone 00:09:48.779 --> 00:09:51.339 except yourself in this class. It's not like we're gonna have a curve and 00:09:51.340 --> 00:09:54.350 we're gonna say, "Oh, we have a certain number of "F"s and a certain number of 00:09:54.350 --> 00:09:56.129 "D"s and a certain number of "C"s." 00:09:56.129 --> 00:09:59.120 All we really have going into it is an expectation that when you get out of 00:09:59.120 --> 00:10:01.500 here, there's a set of stuff we want you to know. 00:10:01.500 --> 00:10:03.220 And if you know that stuff well, 00:10:03.220 --> 00:10:04.170 you get an "A." 00:10:04.169 --> 00:10:06.679 And if everyone knows that stuff well, 00:10:06.679 --> 00:10:07.799 everyone gets an "A." 00:10:07.799 --> 00:10:11.019 And I got no problems with that. Registrar might have a problem with that, but that's okay. 00:10:11.019 --> 00:10:12.720 You don't need to worry about that. 00:10:12.720 --> 00:10:14.990 So you don't need to think about, oh, 00:10:14.990 --> 00:10:18.379 is someone else doing better than you or whatever. And we'll talk about 00:10:18.379 --> 00:10:21.340 issues of collaboration in just a little bit. All you need to think about is 00:10:21.340 --> 00:10:24.670 learning the stuff yourself as well as you possibly can, and you'll be just fine 00:10:24.669 --> 00:10:26.729 and you'll get a good grade, okay? 00:10:26.730 --> 00:10:28.909 So that's really all we ask, 00:10:28.909 --> 00:10:29.909 which is not 00:10:29.909 --> 00:10:33.379 a trivial amount, right? It requires you to really understand the material. 00:10:33.379 --> 00:10:36.340 So another question that comes up is are you in the right place, right? This 00:10:36.340 --> 00:10:39.070 isn't the only introductory programming class at Stanford. And so I wanna spend a 00:10:39.070 --> 00:10:41.890 little bit of time making sure you actually are in the right place 00:10:41.889 --> 00:10:44.519 by going over some of the different options. So right 00:10:44.519 --> 00:10:47.399 now, as you know, you're in CS106A. 00:10:47.399 --> 00:10:50.480 And CS106A, we're sort of happy over here, 00:10:50.480 --> 00:10:51.050 right? As 00:10:51.049 --> 00:10:54.870 a matter of fact, we're not only happy, we're happy and we're also a little bit loopy, 00:10:54.870 --> 00:10:56.919 right? 00:10:56.919 --> 00:11:00.039 There is no previous programming experience required, as I mentioned, right? All you 00:11:00.039 --> 00:11:04.230 need to know is basically if you can get to a computer and know how to 00:11:04.230 --> 00:11:06.710 figure out that it's on, you're in good shape. 00:11:06.710 --> 00:11:10.850 But what 106A does is it's a real rigorous class. You learn programming in 00:11:10.850 --> 00:11:14.330 here, and you learn it in a way that makes you ready to be an engineer if you so 00:11:14.330 --> 00:11:15.829 choose to be an engineer. 00:11:15.828 --> 00:11:18.218 That's not to say you're all gonna be engineers. I would love for all of you to 00:11:18.219 --> 00:11:21.309 be computer science majors, but statistics in the past show only about 00:11:21.308 --> 00:11:24.278 6 percent of you will be computer science majors. That's not because we 00:11:24.278 --> 00:11:25.958 turn anyone off to computer science; 00:11:25.958 --> 00:11:29.169 it's because we make programming accessible to so many people 00:11:29.169 --> 00:11:32.099 that you don't have to be a computer science or a Double E or even an 00:11:32.100 --> 00:11:34.960 engineering major to do extremely well in the class. And we actually have sort 00:11:34.960 --> 00:11:38.730 of a significant percentage of the entire campus undergraduate student body 00:11:38.730 --> 00:11:42.360 at Stanford actually goes through this class and does well, okay? 00:11:42.360 --> 00:11:45.778 So don't worry if you're, like, "Oh, but I'm not really a CS person." I hope 00:11:45.778 --> 00:11:49.409 we'll turn you into one by the end of the class. No, it's okay. But 00:11:49.409 --> 00:11:53.360 you'll be prepared if that's what you wanna do. So this leads into a whole 00:11:53.360 --> 00:11:54.449 engineering sequence 00:11:54.448 --> 00:11:58.799 that can go on to other engineering majors or the computer science majors. 00:11:58.799 --> 00:12:02.019 If you're, like, "Huh, I'm not sure if that's really what I wanna do. As a matter of fact, 00:12:02.019 --> 00:12:04.600 I'm so sure that's not what I wanna do, 00:12:04.600 --> 00:12:07.300 I only wanna get the general educational requirement out of the way, and 00:12:07.299 --> 00:12:11.049 I'm positive there is nothing else I wanna do. Really, no matter how much I like 00:12:11.049 --> 00:12:15.089 it, like, there is no way you're gonna drag me into anything that would involve 00:12:15.090 --> 00:12:17.040 anything remotely techie." 00:12:17.039 --> 00:12:21.879 They're the class CS105. And this is happy, 00:12:21.879 --> 00:12:22.489 yeah, 00:12:22.489 --> 00:12:25.990 this is kind of, oh, we're happy in our little happy world. 00:12:25.990 --> 00:12:30.500 And I don't wanna say it's holding hands and singing, "Kumbaya," because that's not what it is. It's a real 00:12:30.500 --> 00:12:34.120 class. 00:12:34.120 --> 00:12:38.060 But it's meant to be a general educational requirement, right? It 00:12:38.059 --> 00:12:41.989 doesn't lead into the 106s. It's meant to be its own self-contained class. 00:12:41.990 --> 00:12:45.459 You do some Java script in there. You do a little bit of what computers are about. 00:12:45.458 --> 00:12:48.539 Computers in society is a good time. We all hold hands. We're all happy. I don't 00:12:48.539 --> 00:12:50.839 teach the class, so I don't actually hold hands. 00:12:50.840 --> 00:12:54.430 But it's a fun time, okay? It just doesn't lead to anything else. So think of this as 00:12:54.429 --> 00:12:57.959 kind of a terminal class, right? So it's sort of like, well, we'll hook you up to the 00:12:57.960 --> 00:12:59.570 IV drip. And 00:12:59.570 --> 00:13:02.390 you're, like, "Well, 106A, you told me I don't need any previous background. 00:13:02.389 --> 00:13:03.100 Well, 00:13:03.100 --> 00:13:07.589 hey, Mehran, I got lots of background. I got so much background, it hurts. I got AP 00:13:07.589 --> 00:13:09.749 background, I got working through school doing software engineering 00:13:09.749 --> 00:13:10.680 background. 00:13:10.679 --> 00:13:12.759 I'm not sure I should be here." 00:13:12.759 --> 00:13:16.710 That could be the case. We have another class called CS106X, and as 00:13:16.710 --> 00:13:21.560 the "X" kind of implies, it's sort of the extreme games version of the class. No, it 00:13:21.559 --> 00:13:23.888 stands for accelerated, right, because 00:13:23.889 --> 00:13:28.580 "A" was already taken, so we had to come up with something else. 00:13:28.580 --> 00:13:33.250 So the way CS106X works is it really is a very fast-paced class. It's 00:13:33.250 --> 00:13:35.649 meant for people who've got previous AP exam 00:13:35.649 --> 00:13:37.659 credit, like, got a 4 or 5 on the AP, 00:13:37.659 --> 00:13:41.110 or have had significant and prior programming experience before. 00:13:41.110 --> 00:13:44.460 If you're not sure which one of these classes is for you, you can come talk to me 00:13:44.460 --> 00:13:47.530 afterwards, or I'd also encourage you, you could go to pick up the syllabus for 00:13:47.529 --> 00:13:50.399 CS106X and compare it to CS106A. 00:13:50.399 --> 00:13:55.458 This class is all in C++. And if you're thinking, "Hey, Mehran, I'm doing 106A. I wanna learn 00:13:55.458 --> 00:13:59.278 Java and C++," don't worry. You'll eventually, if you so choose, take a 00:13:59.278 --> 00:14:03.048 class called CS106B, which is where this class sort of leads to, which 00:14:03.048 --> 00:14:03.909 is 00:14:03.909 --> 00:14:07.199 C++ and all of the other stuff you would have learned in this accelerated 00:14:07.200 --> 00:14:08.060 class, 00:14:08.059 --> 00:14:11.459 okay? So you still certainly have that course path. So don't let anyone make you think - 00:14:11.460 --> 00:14:14.850 I know a lot of times, and especially for Stanford students, you come in here and you're, like, "Well, 00:14:14.850 --> 00:14:17.800 every class I took in high school was like an honors or an AP class, 00:14:17.799 --> 00:14:20.969 or if it wasn't an honors or an AP class, like, I had to tie half my brain 00:14:20.970 --> 00:14:23.460 before my head because I'm just that hardcore." 00:14:23.460 --> 00:14:25.560 And so everyone just wants to, like, do 00:14:25.559 --> 00:14:29.659 the most hardcore thing they can, right? And what I'm here to tell you is that 00:14:29.659 --> 00:14:32.350 you shouldn't necessarily think about it that way. You should think about it as where 00:14:32.350 --> 00:14:34.649 you feel most comfortable. 00:14:34.649 --> 00:14:38.459 Some number of years ago, let's just say greater than 10, maybe 15, I was 00:14:38.460 --> 00:14:40.530 sitting where you're sitting right now, 00:14:40.529 --> 00:14:40.809 literally. 00:14:40.809 --> 00:14:44.859 I was in CS106A in Terman Auditorium as a freshman, 00:14:44.860 --> 00:14:49.279 okay? It was perfectly fine. It worked out. I went to grad school, did the faculty 00:14:49.279 --> 00:14:53.549 thing. It's just fine. It will open your doors to CS. You're not at any kind of 00:14:53.549 --> 00:14:56.539 disadvantage by starting here. So know where you've been, literally. Like, that seat 00:14:56.539 --> 00:14:58.439 right there was where I was 00:14:58.440 --> 00:15:00.280 most of the time. 00:15:00.279 --> 00:15:03.259 So just something to keep in mind in terms of the different options that are actually 00:15:03.259 --> 00:15:04.319 available to you. 00:15:04.320 --> 00:15:07.670 Now, with that said, let's just assume for the rest of this lecture that this is the 00:15:07.669 --> 00:15:11.029 right place for you. And if it's not, well, afterwards we can kind of talk about it, 00:15:11.029 --> 00:15:13.970 or if you really are convinced now that it's not the right place, you can feel free and try 00:15:13.970 --> 00:15:14.980 to 00:15:14.980 --> 00:15:17.649 scramble over 20 of your classmates and actually leave the room, which is 00:15:17.649 --> 00:15:20.069 probably impossible. All right. 00:15:20.070 --> 00:15:23.150 So a few other things you should know, some mechanics. So Handout No. 1, should 00:15:23.149 --> 00:15:25.269 you wanna follow along at home, 00:15:25.269 --> 00:15:27.429 is the class web page. 00:15:27.429 --> 00:15:32.039 And so all the stuff that we think of as course materials, including online 00:15:32.039 --> 00:15:34.990 copies of the handouts, things that you'll need to do for the assignments, announcements 00:15:34.990 --> 00:15:36.220 related to the class 00:15:36.220 --> 00:15:37.990 are all on the class web page, 00:15:37.990 --> 00:15:44.990 which is 00:15:46.750 --> 00:15:48.840 www.stanford.edu/class/cs106a. 00:15:48.840 --> 00:15:52.230 And because that's just kind of a whole bunch to remember, we make your life easy 00:15:52.230 --> 00:15:56.950 and so there is an equivalent form of the URL, which is just 00:15:56.950 --> 00:16:00.860 cs106a.stanford.edu, which is the easy thing to remember. You put that in, it'll take 00:16:00.860 --> 00:16:03.039 you to the class web page, okay? 00:16:03.039 --> 00:16:05.730 And you should check that regularly because all the 00:16:05.730 --> 00:16:09.058 announcements and handouts - we'll give out hard copies of all the handouts in class, but 00:16:09.058 --> 00:16:11.688 should you happen to miss class for whatever reason, you wanna go print 00:16:11.688 --> 00:16:14.808 whatever copies of the handouts we're actually giving out, you can find them all on 00:16:14.808 --> 00:16:16.439 the web page, okay? 00:16:16.440 --> 00:16:20.440 Now, there's this funky thing about units. So you may have noticed that this class is for three 00:16:20.440 --> 00:16:23.800 to five units, and that kind of brings up the natural question, "Should I take it for three 00:16:23.799 --> 00:16:25.329 or five units?" 00:16:25.330 --> 00:16:29.300 If you're an undergrad, you take it for five units, end of story. That's life in the city. 00:16:29.299 --> 00:16:30.609 Congratulations. Five units. 00:16:30.610 --> 00:16:34.279 If you're a graduate student, you can have the option of taking it for three 00:16:34.279 --> 00:16:38.129 units if you want, if you're gonna run into some unit cap. 00:16:38.129 --> 00:16:41.360 It doesn't change the amount of work you have to do. 00:16:41.360 --> 00:16:42.818 Welcome to graduate school. 00:16:42.818 --> 00:16:44.509 Same work, fewer units. 00:16:44.509 --> 00:16:47.639 So that's just the way life is. If you have a unit cap and you're a grad student, in 00:16:47.639 --> 00:16:50.919 three units you can take it if you want. You can take it for five if you want as well. If you're an 00:16:50.919 --> 00:16:53.240 undergrad, you take it for five, all right? 00:16:53.240 --> 00:16:55.938 So why is it five units? And you might think, "Hey, 00:16:55.938 --> 00:16:59.428 this class only meets three times a week. How come it's five units?" Well, it actually 00:16:59.428 --> 00:17:02.578 has a fourth meeting every week, which is your section, and that's something you 00:17:02.578 --> 00:17:04.279 should sign up for. 00:17:04.279 --> 00:17:06.509 So how you actually sign up for your section 00:17:06.509 --> 00:17:10.618 is sections are at a bunch of different times. You don't sign up for them in 00:17:10.618 --> 00:17:13.118 Axess, even though they're all kind of listed in the time schedule. That's not where 00:17:13.118 --> 00:17:16.068 you sign up for them. In Axess, you just sign up for the class. 00:17:16.068 --> 00:17:20.898 How you sign up for a section is you go to a website, cs198.stanford.edu/section 00:17:20.900 --> 00:17:22.000 00:17:22.000 --> 00:17:24.920 00:17:24.920 --> 00:17:30.519 and this will give us a list of preferences for 00:17:30.519 --> 00:17:33.730 section times that you wanna sign up for, and there's some matching process that goes on. 00:17:33.730 --> 00:17:37.450 It takes all your preferences into consideration with the whole system, and 00:17:37.450 --> 00:17:39.190 eventually you get an email 00:17:39.190 --> 00:17:42.460 by sometime early next week that tells you what section you're in. And section's 50 00:17:42.460 --> 00:17:45.659 minutes, once a week. It's required to go to. It's actually gonna be part of your class 00:17:45.659 --> 00:17:48.640 participation grade, which we'll talk about in just a bit, okay? 00:17:48.640 --> 00:17:52.920 When do these sign-ups happen? They happen between 5:00 p.m. this Thursday 00:17:52.920 --> 00:17:56.130 is when they go up. So if you try to go there now, you can't sign up. Remember 5:00 00:17:56.130 --> 00:17:59.150 p.m. Thursday. So they're up, and then they're down 00:17:59.150 --> 00:18:03.980 at 5:00 p.m. on Sunday, okay? So 00:18:03.980 --> 00:18:06.769 make sure you sign up probably this weekend. If you're planning on being out of 00:18:06.769 --> 00:18:09.990 town this weekend, you wanna sign up before you go. Sign up early, but don't 00:18:09.990 --> 00:18:13.529 sign up often because you only need one section, okay? 00:18:13.529 --> 00:18:17.119 If you're an SCPD student - every once in a while you'll hear me refer to SCPD 00:18:17.119 --> 00:18:20.119 students. That stands for Stanford Center for Professional Development. 00:18:20.119 --> 00:18:23.109 They are the folks in industry who actually take this class 00:18:23.109 --> 00:18:26.389 via broadcast. If you're an SCPD student, you're automatically enrolled for a section, 00:18:26.390 --> 00:18:30.259 so you don't actually need to do this, and your section will meet at - so for SCPD 00:18:30.259 --> 00:18:33.929 - and if you're wondering what an SCPD student is, you're not one, okay? 00:18:33.929 --> 00:18:40.259 So SCPD section meets Friday from 1:15 to 2:05. It meets 00:18:40.259 --> 00:18:44.089 live, if you wanna go there live, in Skilling Auditorium. But if you're 00:18:44.089 --> 00:18:48.269 watching it remotely, it meets on Channel E2. I 00:18:48.269 --> 00:18:52.609 know it seems weird to say it meets on channel - what does that mean? It meets on 00:18:52.609 --> 00:18:56.869 Channel E2, okay? That is grammatically the correct way of saying it. 00:18:56.869 --> 00:18:57.619 All right. 00:18:57.619 --> 00:19:01.529 So there's a little bit more administrative stuff. Now, 00:19:01.529 --> 00:19:05.049 textbooks, right? Textbooks, there's nothing quite like the extortion that is 00:19:05.049 --> 00:19:07.039 textbooks. So there are 00:19:07.039 --> 00:19:09.539 two textbooks that are required for this class. Well, one's a course reader and 00:19:09.539 --> 00:19:12.789 one's a textbook. The course reader is called, Karel the Robot Learns Java. You 00:19:12.789 --> 00:19:16.079 can pick it up at the bookstore. It's relatively cheap. It was actually written by Eric 00:19:16.079 --> 00:19:19.799 Roberts here. And surprisingly enough, the textbook for the class was also written by 00:19:19.799 --> 00:19:23.180 Eric Roberts, The Art and Science of Java, which is available now in your local 00:19:23.180 --> 00:19:24.630 bookstore, 00:19:24.630 --> 00:19:27.710 including the bookstore on campus, so you can go and pick up a copy of this. 00:19:27.710 --> 00:19:30.690 So both these things you actually wanna have because they're required for the 00:19:30.690 --> 00:19:33.759 class. We'll go through all of them. We'll go through basically everything except 00:19:33.759 --> 00:19:35.729 the last chapter of this book. So you 00:19:35.729 --> 00:19:38.359 sort of get your money's worth. We're just gonna do it a little bit out of 00:19:38.358 --> 00:19:40.689 order, but we'll go through the whole thing, 00:19:40.690 --> 00:19:42.809 okay? So email, 00:19:42.809 --> 00:19:45.869 how many of you have email accounts? All 00:19:45.869 --> 00:19:48.689 right. I will ask the reverse question because I think at this point, some people just don't 00:19:48.690 --> 00:19:49.799 wanna put up their hands. 00:19:49.799 --> 00:19:53.230 How many people don't have email accounts? 00:19:53.230 --> 00:19:56.240 Odd how that is not the complement of the folks who had their hands up 00:19:56.240 --> 00:19:57.220 previously. 00:19:57.220 --> 00:20:00.910 Email's required for this class. Chances are, by being at Stanford, you've already gotten an 00:20:00.910 --> 00:20:03.769 email account through your SUNet ID, but if you don't have an email account, get 00:20:03.769 --> 00:20:06.210 an email account and that's how you'll stay in contact with us. That's how we'll stay in 00:20:06.210 --> 00:20:09.059 contact with you, except we'll also meet with you live in person, 00:20:09.059 --> 00:20:12.109 but email is kind of the general method for communication. As a matter of fact, for your 00:20:12.109 --> 00:20:15.178 first assignment, and part of your first assignment is to send us an email, 00:20:15.179 --> 00:20:16.900 just because we love you 00:20:16.900 --> 00:20:18.740 and we don't get enough email as it is. 00:20:18.740 --> 00:20:21.470 So you need to have an email account to be able to do that. So if you have not 00:20:21.470 --> 00:20:24.250 already, you can kind of get ahead of the game and go set up your email 00:20:24.250 --> 00:20:26.720 account. Now, don't worry. You'll get the first assignment next time. So you still get, like, 00:20:26.720 --> 00:20:30.350 two days of breathing space before your assignment goes out, okay? 00:20:30.349 --> 00:20:33.149 There is also gonna be lots of handouts in the class. They'll be either given out in class, 00:20:33.150 --> 00:20:36.970 well, they will be given out in class, but we'll also post them online in case you miss them. 00:20:36.970 --> 00:20:40.558 And how much real work do you do in this class? That's always kind of an interesting 00:20:40.558 --> 00:20:40.898 question. 00:20:40.898 --> 00:20:43.379 So let's talk a little bit about assignments 00:20:43.380 --> 00:20:46.620 and a little bit of other logistical things. 00:20:46.619 --> 00:20:49.679 So assignments, 00:20:49.680 --> 00:20:54.430 we'll just call them the dreaded assigns. There are seven programming assignments. 00:20:54.430 --> 00:20:57.120 And if you look at the syllabus Handout No. 2, it tells you when all of them 00:20:57.119 --> 00:21:01.149 are due all the way through by day, so you can plan out your whole quarter. It's 00:21:01.150 --> 00:21:03.670 just that much fun, okay? 00:21:03.670 --> 00:21:07.269 And these seven programming assignments are weighted slightly more toward the 00:21:07.269 --> 00:21:09.930 last assignments because the assignments will tend to get more complicated. That doesn't 00:21:09.930 --> 00:21:11.990 necessarily mean there'll be more programming; 00:21:11.990 --> 00:21:14.589 it just means conceptually, they'll become more complicated, 00:21:14.589 --> 00:21:17.789 so we tend to weigh them more toward the end of the class. So the later assignments count 00:21:17.789 --> 00:21:19.879 more than the early assignments. 00:21:19.880 --> 00:21:25.150 How you're gonna be actually doing your programming is using a little tool called Eclipse. 00:21:25.150 --> 00:21:28.480 And Eclipse thankfully is free, so you don't have to pay for it. As a matter of 00:21:28.480 --> 00:21:31.450 fact, you can download it from the CS106A website. And if you're wondering 00:21:31.450 --> 00:21:34.600 how you do that, don't worry. We'll give you a handout next class that explains 00:21:34.599 --> 00:21:36.699 to you the whole grueling process 00:21:36.700 --> 00:21:38.509 of downloading and installing Eclipse. 00:21:38.509 --> 00:21:43.230 And you can use this either on the Mac or the PC. So if you have your own 00:21:43.230 --> 00:21:46.480 computer, you can certainly work on this yourself. You just download it to your 00:21:46.480 --> 00:21:49.110 own machine. We'll explain the whole process in a handout. 00:21:49.109 --> 00:21:52.649 If you don't have your own computer, the public computer clusters on campus 00:21:52.650 --> 00:21:55.710 will have Eclipse installed on them, and so you can use Eclipse there. So you're 00:21:55.710 --> 00:21:58.730 sort of happy to go either way, okay? Now, 00:21:58.730 --> 00:22:01.429 the important thing, remember I mentioned that whole notion of software 00:22:01.429 --> 00:22:03.780 engineering in the class, and that's something we take really seriously, so 00:22:03.779 --> 00:22:06.349 seriously as a matter of fact that when you turn in your assignments, one thing we could do is we could take 00:22:06.349 --> 00:22:07.269 your assignments 00:22:07.269 --> 00:22:11.348 and we could just kind of look at it and go, "Yeah, interesting, 'B.' Here you go. 00:22:11.348 --> 00:22:12.589 Thanks for playing." 00:22:12.589 --> 00:22:16.649 And you don't learn a whole lot from them. So in order to actually learn a lot from 00:22:16.650 --> 00:22:19.280 your assignments, we could take your assignment and write a whole bunch of 00:22:19.279 --> 00:22:22.678 comments on it and hand it back to you. Even that's kind of not enough. 00:22:22.679 --> 00:22:26.528 What really is a little bit more that makes it more fun is every week after 00:22:26.528 --> 00:22:29.769 you turn in your assignment and your section leader looks it over and grades it, 00:22:29.769 --> 00:22:32.940 you'll actually meet with your section leader for about 10 to 15 minutes 00:22:32.940 --> 00:22:35.278 every week or every time an assignment is due 00:22:35.278 --> 00:22:38.038 to actually go over in something referred to as interactive grading. And it's 00:22:38.038 --> 00:22:41.450 a chance to sit there and talk with an actual human being about what's good in 00:22:41.450 --> 00:22:44.739 your assignment, what are some of the things you need to work on, what are some of the 00:22:44.739 --> 00:22:47.940 software engineering principles you need to develop. And that way, you can really 00:22:47.940 --> 00:22:52.499 sort of get more detailed information and be able to ask questions to develop 00:22:52.499 --> 00:22:55.730 yourself as a programmer as well as get help if you need help, 00:22:55.730 --> 00:22:59.759 okay? And that's in addition to going to section, going to class and all that stuff. So 00:22:59.759 --> 00:23:02.869 it's another 15 minutes a week. You'll actually schedule that time with your 00:23:02.869 --> 00:23:04.519 section leader on a regular basis 00:23:04.519 --> 00:23:07.670 when you're gonna have interactive grading or just affectionately 00:23:07.670 --> 00:23:11.560 referred to as IGs because at Stanford, everything's just short and we just can't 00:23:11.559 --> 00:23:13.809 say, like, psychology; we have to say psyche. 00:23:13.809 --> 00:23:17.470 So it's IG. Just remember that, all right? 00:23:17.470 --> 00:23:20.450 And then how are these things graded? So the other thing we could do is I told you 00:23:20.450 --> 00:23:22.600 we could just write "B" and hand it back to you. 00:23:22.599 --> 00:23:25.309 But we found that that's not really great because people get all wrapped 00:23:25.309 --> 00:23:27.339 around the axle about the grade. 00:23:27.339 --> 00:23:30.988 And so for a while, we did numbers and we're, like, huh, why don't we give a number between 1 and 00:23:30.989 --> 00:23:33.079 20? And so what happens there? 00:23:33.079 --> 00:23:35.798 People get all wrapped around the axle about numbers. 00:23:35.798 --> 00:23:39.099 So then we thought, huh, what was a happier time when we were in school? 00:23:39.099 --> 00:23:42.730 I remember when we were in school, and we used to get back assignments and they 00:23:42.730 --> 00:23:45.289 had, like, smiley faces on them. 00:23:45.289 --> 00:23:48.659 Well, we can't do that because then it doesn't appear to be a rigorous Stanford 00:23:48.660 --> 00:23:49.410 class. 00:23:49.410 --> 00:23:52.440 So instead of the smiley face, 00:23:52.440 --> 00:23:54.330 we come up with something else, 00:23:54.329 --> 00:23:59.009 which looks surprisingly like this. It's kind of involved to actually draw, so I need to 00:23:59.009 --> 00:24:04.980 erase the board to do it. Check. 00:24:04.980 --> 00:24:07.490 That's kind of the beginning of our grading scale, okay? 00:24:07.490 --> 00:24:11.529 And the way our grading scale works is we start off with a check in the middle, 00:24:11.529 --> 00:24:14.899 which says this is a pretty solid program. It meets all the requirements 00:24:14.900 --> 00:24:19.169 for the program. Maybe it's got a little problem here or there, but it's a check. 00:24:19.169 --> 00:24:22.950 Then we have sort of two grades on the two sides of it: check plus and check 00:24:22.950 --> 00:24:23.980 minus. 00:24:23.980 --> 00:24:26.048 Check plus is, like, 00:24:26.048 --> 00:24:27.168 solid. 00:24:27.169 --> 00:24:31.520 You did a great job; you got everything right; things look good, a nice style in 00:24:31.519 --> 00:24:35.619 your program, nice software engineering, and the program works flawlessly. 00:24:35.619 --> 00:24:39.308 Good job. This is like total "A." 00:24:39.308 --> 00:24:42.920 Check is kind of like, yeah, you're sort of there. It's kind of like "A" minus, "B" plus, 00:24:42.920 --> 00:24:45.110 maybe on some occasions "B." 00:24:45.109 --> 00:24:47.399 But it's kind of like it's pretty good work; you're in pretty good 00:24:47.400 --> 00:24:48.710 shape here. 00:24:48.710 --> 00:24:52.440 And so a lot of grades in this class ends up being check pluses and checks, and if that's 00:24:52.440 --> 00:24:55.070 the case, you're perfectly fine grade-wise. 00:24:55.069 --> 00:24:59.009 Check minus, as you can imagine, this is kind of thinking about "B," "B" minus. It's, 00:24:59.009 --> 00:25:02.730 yeah, there are some slightly more significant problems with your program. 00:25:02.730 --> 00:25:05.130 But that's not where it ends, right, because we wanna 00:25:05.130 --> 00:25:09.090 be able to even shoot for in some sense bigger gustoes. There was a plus 00:25:09.089 --> 00:25:10.480 and a minus. 00:25:10.480 --> 00:25:12.450 So plus is like, 00:25:12.450 --> 00:25:15.660 oh, nice job, kind of a hearty 00:25:15.660 --> 00:25:18.150 pat on the back. If you get 00:25:18.150 --> 00:25:20.940 pluses all the way through on all your assignments, you're in a pretty good 00:25:20.940 --> 00:25:22.539 candidate to get an "A" plus. 00:25:22.539 --> 00:25:26.569 And minus, like, just take good over here and replace it with bad, it's kind of like, 00:25:26.569 --> 00:25:28.250 oh, 00:25:28.250 --> 00:25:31.730 bad times, right, 00:25:31.730 --> 00:25:36.669 or maybe, you know - but 00:25:36.669 --> 00:25:40.028 even there was, like, more significant problems with this program or just the 00:25:40.028 --> 00:25:42.759 style on the program is just really bad. 00:25:42.759 --> 00:25:46.879 But even there, we don't stop. And you're, like, "Come on, man. Like, I thought the whole reason 00:25:46.880 --> 00:25:51.490 was to simplify this." Don't worry. And it gets even better because we have a plus-plus 00:25:51.490 --> 00:25:55.599 and a minus-minus. And at this point, we've run out of board space, so we can't go any further. 00:25:55.599 --> 00:25:57.009 But a plus-plus 00:25:57.009 --> 00:25:59.249 is just outrageous, 00:25:59.249 --> 00:26:02.409 right? It's the kind of thing - so this is the kind of thing your section leader can't 00:26:02.409 --> 00:26:03.399 actually give you 00:26:03.398 --> 00:26:05.679 without coming and talking to Ben and I first 00:26:05.680 --> 00:26:09.480 because they get a program that just goes - it has to actually exceed the 00:26:09.480 --> 00:26:11.860 requirements for the assignment. It's by a long shot. 00:26:11.859 --> 00:26:14.758 Like, you'll get all your assignment requirements, and what we encourage you 00:26:14.759 --> 00:26:18.429 to do is you can do a grade assignment and get everything right and have good style, 00:26:18.429 --> 00:26:21.710 and you'll be in this category. And for the later assignments, you may be in this category if it's 00:26:21.710 --> 00:26:22.390 flawless. 00:26:22.390 --> 00:26:25.659 But we'll actually - if you want to go for the plus-plus, 00:26:25.659 --> 00:26:28.740 go beyond the assignment requirements. And the way we think about the plus-plus, it's a 00:26:28.740 --> 00:26:30.659 program that makes you weep 00:26:30.659 --> 00:26:32.040 in a good way. 00:26:32.039 --> 00:26:35.000 It's just like your section leader sees it, and they're just, like, 00:26:35.000 --> 00:26:38.558 this is so good, I've gotta show someone else. And they come and show Ben and 00:26:38.558 --> 00:26:42.470 I, and we're, like, sitting there looking at this on a monitor, and, like, tears are just welling in our eyes, and there was, 00:26:42.470 --> 00:26:43.380 like, 00:26:43.380 --> 00:26:46.810 soft violin music playing in the background and we get out the wine and 00:26:46.809 --> 00:26:47.720 cheese. 00:26:47.720 --> 00:26:52.880 So this is just, like, this is the kind of thing that gets you, like, 00:26:52.880 --> 00:26:56.350 remembered and the, oh, if you want a letter of recommendation, just ask because you got 00:26:56.349 --> 00:26:59.349 a plus-plus. Like, oh, 00:26:59.349 --> 00:27:03.168 it's awesome, right? There are very few of these in a quarter. So just by sort of 00:27:03.169 --> 00:27:06.460 way of comparison, in a class this size, probably throughout the span of the 00:27:06.460 --> 00:27:09.950 whole quarter, I'd expect there to be maybe ten plus-pluses, 00:27:09.950 --> 00:27:13.610 I mean, ten assignment plus-pluses, not ten students who get plus-pluses across the 00:27:13.609 --> 00:27:13.959 board. 00:27:13.960 --> 00:27:16.808 So it's really something to strive for, but if you strive for it, 00:27:16.808 --> 00:27:20.599 like, we're giving you the credit for it. And this gets remembered and you get, like, 00:27:20.599 --> 00:27:22.699 extra credit and everything. 00:27:22.700 --> 00:27:25.019 So we're left with this, 00:27:25.019 --> 00:27:29.849 right? This assignment also makes you weep, 00:27:29.849 --> 00:27:33.309 but not in the good way, right? It makes you kind of weep in the sense, like, I look at 00:27:33.309 --> 00:27:34.769 them and I'm, like, 00:27:34.769 --> 00:27:39.319 oh, man, like, what did I teach? Like, where did I go wrong, right? I, like, 00:27:39.319 --> 00:27:40.619 blame myself. 00:27:40.619 --> 00:27:44.629 I blame you a little bit, but I blame myself. 00:27:44.630 --> 00:27:47.450 And this is really just, like, the program is just, like, it's a 00:27:47.450 --> 00:27:50.830 shell. Like, there really wasn't much effort that was put into it. Yeah, you slapped something together 00:27:50.829 --> 00:27:53.139 or it doesn't really work, 00:27:53.140 --> 00:27:56.030 that whole deal. And then if you don't turn anything in, we do kind of reserve the 00:27:56.029 --> 00:27:58.579 zero to distinguish from the 00:27:58.579 --> 00:28:02.720 "made really bad effort" versus "didn't make any effort at all." 00:28:02.720 --> 00:28:06.410 And we just won't talk about these, right? Let's just hope we can avoid those 00:28:06.410 --> 00:28:10.100 if possible. But that's kind of how the grading scale works now. Now, 00:28:10.099 --> 00:28:13.859 at the same time, I trust all of you to be responsible people. 00:28:13.859 --> 00:28:17.329 And every once in a while, something bad happens to a good person, and 00:28:17.329 --> 00:28:20.558 there's an assignment that you'd like to be able to turn in, but for whatever reason, you 00:28:20.558 --> 00:28:23.710 can't turn in on time. And I just wanna treat you like adults. 00:28:23.710 --> 00:28:27.700 I don't want you to have to worry about coming in and asking for an extension 00:28:27.700 --> 00:28:31.298 or, like, "Oh, I had this really hard thing in another class, and I couldn't do it at the same time." Up 00:28:31.298 --> 00:28:32.109 front, 00:28:32.109 --> 00:28:34.229 everyone gets two free extensions, okay? So 00:28:34.230 --> 00:28:38.930 in terms of late days - we refer to these as late days, strangely enough - you 00:28:38.930 --> 00:28:40.509 get two free ones. 00:28:40.509 --> 00:28:44.440 What a late day is, is a class day. They're not 24-hour days, but class days. 00:28:44.440 --> 00:28:48.059 So if something is due on a Wednesday, you turned in on a Friday, that's a late 00:28:48.059 --> 00:28:49.059 day. That's one. 00:28:49.059 --> 00:28:51.888 You turn it in on the following Monday, that's two late days. 00:28:51.888 --> 00:28:54.599 You can split up your two late days among two different assignments. You can use 00:28:54.599 --> 00:28:56.148 them both on one assignment. 00:28:56.148 --> 00:28:59.819 But we encourage you to not use them at all because if you use your late days, you fall behind 00:28:59.819 --> 00:29:00.868 in the class. 00:29:00.868 --> 00:29:05.038 The way you should think about these things are these are pre-approved extensions. 00:29:05.038 --> 00:29:08.190 They're not the kind of thing where you just think, "Oh, yeah, I'm not gonna do the 00:29:08.190 --> 00:29:11.190 assignment because I wanna go and play Frisbee golf," right? 00:29:11.190 --> 00:29:14.330 Think of it, well, you wouldn't come ask me for an extension - you might, but you probably wouldn't 00:29:14.329 --> 00:29:17.619 ask me for an extension if you're, like, "Hey, hey, Mehran, can I turn in the 00:29:17.619 --> 00:29:19.599 assignment, like, on Wednesday because 00:29:19.599 --> 00:29:22.719 I'm playing Frisbee golf this afternoon," right? If you would feel embarrassed 00:29:22.720 --> 00:29:25.798 asking that question, you probably don't wanna use one of your free late days. 00:29:25.798 --> 00:29:27.460 But something happens like, 00:29:27.460 --> 00:29:30.809 oh, it's a tough week, you've got midterms in other classes and you got this assignment 00:29:30.809 --> 00:29:32.879 due or whatever, that's a good time to use it. 00:29:32.880 --> 00:29:36.280 So we just trust you. And most people, we actually encourage you not to use them 00:29:36.279 --> 00:29:39.170 because it just makes you fall behind in the class. 00:29:39.170 --> 00:29:42.200 Because we trust you and we give you these two up front, getting extensions 00:29:42.200 --> 00:29:45.809 beyond your two free class days is virtually impossible because we sort of 00:29:45.809 --> 00:29:46.539 up front said, 00:29:46.539 --> 00:29:49.210 hey, it's your responsibility. We're giving you two freebies. 00:29:49.210 --> 00:29:52.470 We're not gonna give you a third extension. Imagine if you had to come ask us for three 00:29:52.470 --> 00:29:55.539 extensions. By the third one, we'd be, like, okay, what's going on, which is why 00:29:55.539 --> 00:29:57.710 we don't necessarily give extensions beyond these two. 00:29:57.710 --> 00:30:00.858 The only time we might give an extension beyond the two free ones is for 00:30:00.858 --> 00:30:02.149 something major, like 00:30:02.150 --> 00:30:06.300 death in the family or, like, serious medical problems that might require surgery or 00:30:06.299 --> 00:30:07.250 something like that. 00:30:07.250 --> 00:30:10.349 Every once in a while, unfortunately, that happens. I hope it doesn't happen in this 00:30:10.349 --> 00:30:10.738 class. 00:30:10.739 --> 00:30:13.869 But those are the only kinds of things that we give extensions to beyond the two 00:30:13.868 --> 00:30:15.058 free late days. 00:30:15.058 --> 00:30:18.739 Importantly, don't ask your section leader for extensions. They cannot grant you 00:30:18.739 --> 00:30:22.249 extensions. Only Ben, who has all the power in this class, can give extensions, which 00:30:22.249 --> 00:30:25.308 is why you should get to know Ben and then hopefully you won't need to talk to him about 00:30:25.308 --> 00:30:27.629 extensions, okay? So 00:30:27.630 --> 00:30:31.610 other thing to keep in mind is that three days late is the max. 00:30:31.609 --> 00:30:36.129 Beyond three days late, which is basically one class week, if you think 00:30:36.130 --> 00:30:39.390 about late days being class days, we will not accept an assignment. And the reason 00:30:39.390 --> 00:30:42.130 for that is at a certain point, you're so late, you're better off just doing the 00:30:42.130 --> 00:30:44.120 next assignment, letting the old one go. 00:30:44.119 --> 00:30:48.409 So to sort of enforce that policy, after three days, we don't accept that 00:30:48.410 --> 00:30:51.259 assignment late anymore. It's just gonna be a zero if it's not turned in, okay? 00:30:51.259 --> 00:30:53.200 And that just kind of forces you to keep up. 00:30:53.200 --> 00:30:56.870 Couple other minor things, well, I shouldn't say they're minor things. They're actually kind of important. Exams: There's 00:30:56.869 --> 00:30:59.539 two exams in this class. There's a midterm and a final. 00:30:59.539 --> 00:31:04.259 Both of them are, well, I shouldn't say both. The midterm is out of class. It's 00:31:04.259 --> 00:31:07.730 from 7:00 to 8:30 p.m. 00:31:07.730 --> 00:31:13.250 on Tuesday, October 30. And it's on the syllabus. It's there. It's on the syllabus; it's 00:31:13.250 --> 00:31:16.630 on Handout No. 1. We repeat it multiple times. The date will eventually be announced 00:31:16.630 --> 00:31:18.019 when we get close to the midterm. 00:31:18.019 --> 00:31:22.460 But if you have a conflict with this time, you need to send me email, okay? 00:31:22.460 --> 00:31:26.670 You can send me email a little closer to the midterm because I'll announce it again for people who have 00:31:26.670 --> 00:31:27.179 conflicts. 00:31:27.179 --> 00:31:31.759 But since it's an out-of-class exam, you need to send me email if you have a conflict. 00:31:31.759 --> 00:31:34.868 I'll get all the constraints from people who have conflicts and try to schedule an 00:31:34.868 --> 00:31:36.808 alternate time if there's enough people with conflicts. 00:31:36.808 --> 00:31:40.879 But 7:00 to 8:30 is when you need to know about the midterm. And to make up for 00:31:40.880 --> 00:31:43.420 the fact that we have an out-of-class midterm, I actually give you sort of 00:31:43.420 --> 00:31:46.769 a belated free day, which is the Friday of the week of the midterm, we don't have 00:31:46.769 --> 00:31:50.109 class to make up for the fact that we made you come to the midterm outside of class. 00:31:50.109 --> 00:31:53.308 But the midterm's an hour and a half, and we can't compress time. If we could, we'd 00:31:53.308 --> 00:31:54.480 have different issues. 00:31:54.480 --> 00:31:57.308 We can't compress time and fit it into a 50 minute class, which is why it's 00:31:57.308 --> 00:31:59.399 out of class, but you get a free day for it, 00:31:59.400 --> 00:32:01.750 all right? Last but not least, 00:32:01.750 --> 00:32:03.970 few things about grading. 00:32:03.970 --> 00:32:06.490 Grading, one of those things as you might be able to tell from this little board 00:32:06.490 --> 00:32:09.620 over here or something, if I didn't have to do it, I wouldn't do it 00:32:09.619 --> 00:32:13.779 because honestly, as corny as this sounds, I just believe in the love of learning. 00:32:13.779 --> 00:32:16.549 Like, I think if you're passionate about something, you just go do it and you 00:32:16.549 --> 00:32:17.629 learn it. 00:32:17.630 --> 00:32:21.550 But I'm na?ve, and so that's not the way learning always works. So sometimes we 00:32:21.549 --> 00:32:24.859 actually need grading to make sure that learning takes place. And so this is how your 00:32:24.859 --> 00:32:26.378 grade breaks down: 00:32:26.378 --> 00:32:30.759 Forty-five percent of your grade is on the programming assignments, okay? 00:32:30.759 --> 00:32:34.740 Fifteen percent is the midterm, which we'll just call the mid because we like to 00:32:34.740 --> 00:32:36.380 abbreviate everything. 00:32:36.380 --> 00:32:41.019 Thirty percent is the final. It's a three-hour final exam in the regular final 00:32:41.019 --> 00:32:42.528 time slot for this class. 00:32:42.528 --> 00:32:45.619 If you think or are under the delusion that you should take two 00:32:45.619 --> 00:32:47.269 classes at the same time, 00:32:47.269 --> 00:32:50.269 that's a bad idea because their final exams are at the same time, 00:32:50.269 --> 00:32:54.349 okay? So you should not take two classes as the same time 00:32:54.349 --> 00:32:57.649 because our final exam is scheduled for - I believe it's December 13, which 00:32:57.650 --> 00:32:58.080 is a 00:32:58.079 --> 00:33:01.730 Thursday, 12:15 to 3:15. That's the regular final exam slot for 00:33:01.730 --> 00:33:05.210 this class. And any other class at the same time will conflict with that slot. Thirty 00:33:05.210 --> 00:33:08.559 percent of your grade is the final. And that, if you add it all up, 00:33:08.559 --> 00:33:12.589 it's not just that I'm bad with math. It's because 10 percent of your grade is actually 00:33:12.589 --> 00:33:16.129 participation. And this is things like 00:33:16.130 --> 00:33:19.240 did you go to your interactive grading sessions? Did you regularly attend 00:33:19.240 --> 00:33:22.740 section? Did you participate in section? Did you participate in class, right? 00:33:22.740 --> 00:33:26.259 And so, in order to help you participate in class, 00:33:26.259 --> 00:33:29.890 there's a little incentive to participate in class, which is sugar in the afternoon. 00:33:29.890 --> 00:33:32.980 So someone raise their hand. All 00:33:32.980 --> 00:33:35.769 right. 00:33:35.769 --> 00:33:38.220 Yeah, sometimes I'm not a good shot. And this will tell you, if you're sitting in 00:33:38.220 --> 00:33:43.309 the back of the room, I can't throw a Kit Kat back there because they're a little 00:33:43.309 --> 00:33:44.599 00:33:44.599 --> 00:33:45.278 too light. Oh, yeah, sorry. 00:33:45.278 --> 00:33:49.278 If you sit in the back of the room, the roof prevents me from actually being able to hit 00:33:49.278 --> 00:33:53.359 you. So if you want the food, come up. But if you ask questions in class, 00:33:53.359 --> 00:33:56.769 hey, that's a good time. It's just a little way to be able to reward you for 00:33:56.769 --> 00:33:58.440 actually participating in class 00:33:58.440 --> 00:34:01.139 or to keep your blood sugar up if you need it, all right? 00:34:01.138 --> 00:34:05.008 So that's participation. It's 10 percent of your grade, and as a matter of fact, at the end of the quarter, I ask 00:34:05.009 --> 00:34:08.599 every one of your section leaders to actually tell me how much you participated in class, and 00:34:08.599 --> 00:34:11.918 some of them just say, "Oh, this person was wonderful. They came every time. They participated. 00:34:11.918 --> 00:34:13.128 It's just a great thing." 00:34:13.128 --> 00:34:15.858 And that helps your grade out a lot, okay? 00:34:15.858 --> 00:34:17.469 Now, the final thing, 00:34:17.469 --> 00:34:18.969 and as you can kind of tell, 00:34:18.969 --> 00:34:21.399 most of the time, I'm not the most serious person in the world. I just like 00:34:21.400 --> 00:34:24.059 to have fun with things, and I think it's important for you to have fun with 00:34:24.059 --> 00:34:24.958 things. 00:34:24.958 --> 00:34:28.277 There is just one place where I get real serious, and it's one place where Stanford 00:34:28.277 --> 00:34:29.728 gets real serious. 00:34:29.728 --> 00:34:32.848 Anyone wanna guess what that is? 00:34:32.849 --> 00:34:35.899 Plagiarism and the honor code. As a matter of fact, that's what we call a social. So we 00:34:35.898 --> 00:34:38.989 had someone down here who got it and then a whole bunch of people who I don't 00:34:38.989 --> 00:34:44.967 know, so we just spray. All right. 00:34:44.969 --> 00:34:47.969 So the honor code, 00:34:47.969 --> 00:34:50.369 in terms of the honor code, the 00:34:50.369 --> 00:34:54.559 question comes up is what is the honor code all about, and how does that affect working 00:34:54.559 --> 00:34:57.609 in groups and computer science, etc.? 00:34:57.608 --> 00:35:00.058 Does that mean we shouldn't talk to each other? 00:35:00.059 --> 00:35:03.989 No. The answer to all those is no, okay? If you look at Handout No. 4, 00:35:03.989 --> 00:35:05.809 which is all about the honor code, 00:35:05.809 --> 00:35:08.849 we encourage you to talk to each other. We encourage you to talk about concepts 00:35:08.849 --> 00:35:12.110 in the class, talk about different strategies to problems, to think about 00:35:12.110 --> 00:35:14.659 the ways that you could potentially approach some problem or 00:35:14.659 --> 00:35:17.739 the way different control constructs when we eventually get to them work in the 00:35:17.739 --> 00:35:20.659 class. And discussion is perfectly fine, 00:35:20.659 --> 00:35:23.729 especially among the course staff, but also amongst yourselves. That's a great 00:35:23.728 --> 00:35:24.578 thing. 00:35:24.579 --> 00:35:28.359 So where do we draw the line? And we try to make a bright line for where you've 00:35:28.358 --> 00:35:31.929 crossed the line for the honor code, which is 00:35:31.929 --> 00:35:35.318 don't share code, 00:35:35.318 --> 00:35:36.429 plain and simple, 00:35:36.429 --> 00:35:38.450 in any respect, okay? 00:35:38.449 --> 00:35:41.848 Don't give a file to someone else that's got your code in it. Don't get code 00:35:41.849 --> 00:35:45.229 from someone else. Don't look at someone else's printout. Don't give them a 00:35:45.228 --> 00:35:45.659 printout. 00:35:45.659 --> 00:35:49.190 If you have two people who are sitting looking at the same screen together, 00:35:49.190 --> 00:35:51.159 that code can't belong to both of you. 00:35:51.159 --> 00:35:52.358 It belongs to one of you. 00:35:52.358 --> 00:35:56.028 I don't know which one, but it becomes an honor code violation. So you shouldn't 00:35:56.028 --> 00:35:59.059 both - two people shouldn't be staring at the monitor together. 00:35:59.059 --> 00:36:02.829 If it ever gets to the point where you're looking at someone else's code, that's 00:36:02.829 --> 00:36:05.228 where you're gonna reach an issue, okay? 00:36:05.228 --> 00:36:07.408 Discuss as much as you want. That's great. 00:36:07.409 --> 00:36:10.429 Write your own code. That's all we care about. And you're, like, "Well, what is 00:36:10.429 --> 00:36:14.880 code, Mehran? What does that word mean?" Code is geek speak for your program, 00:36:14.880 --> 00:36:18.079 so when you program, the program that you write is what we affectionately refer to 00:36:18.079 --> 00:36:19.329 as code. 00:36:19.329 --> 00:36:23.028 And the idea of programming is what we refer to as coding, 00:36:23.028 --> 00:36:25.639 strangely enough. Computer scientists need to make everything 00:36:25.639 --> 00:36:28.160 more complicated than it really is so we can 00:36:28.159 --> 00:36:31.449 get people under the illusion that they should pay us lots of money to do what we do. 00:36:31.449 --> 00:36:35.409 I mean, you're, like, "Oh, I just write programs." And they're, like, "Oh, yeah, I should pay you 00:36:35.409 --> 00:36:38.348 half." And you're, like, "No, no, no. I write code." And they're, like, "Oh, yeah." Suddenly, it's much more 00:36:38.349 --> 00:36:40.009 impressive. So 00:36:40.009 --> 00:36:40.920 don't share code. 00:36:40.920 --> 00:36:44.780 The other thing is if you talk to other people, like if you have a study group to 00:36:44.780 --> 00:36:48.220 talk about solution approaches or you go, let's say, talk to the TA or your section 00:36:48.219 --> 00:36:48.648 leader 00:36:48.648 --> 00:36:51.318 to how you should approach a problem, and they give you a lot of hints as to how 00:36:51.318 --> 00:36:52.739 to do it, 00:36:52.739 --> 00:36:55.528 cite collaboration. 00:36:55.528 --> 00:37:00.119 So cite and collaboration gets you out of trouble. Any collaboration that you cite 00:37:00.119 --> 00:37:03.250 you cannot be held responsible for under the honor code. 00:37:03.250 --> 00:37:06.949 You can actually copy someone else's program and say, "I copied this program 00:37:06.949 --> 00:37:08.228 from Mary Smith." 00:37:08.228 --> 00:37:09.748 And I'll look at that and say, 00:37:09.748 --> 00:37:12.598 "They cited it," and it will warm the cockles of my heart. 00:37:12.599 --> 00:37:15.769 And Mary Smith will get full credit, and you'll get a zero because you copied your 00:37:15.768 --> 00:37:17.218 program from Mary Smith, 00:37:17.219 --> 00:37:22.289 but it's not an honor code violation because you cited the work, okay? So 00:37:22.289 --> 00:37:26.929 the bottom line is keep yourself safe and cite your collaborations. And I 00:37:26.929 --> 00:37:29.450 guarantee you most of the time, you'll be just fine. 00:37:29.449 --> 00:37:32.439 Now, you might wonder why do I make such a big deal about this. And the reason I 00:37:32.440 --> 00:37:35.470 make a big deal about this is for a while, thankfully it's not true anymore, but 00:37:35.469 --> 00:37:36.359 for a while, 00:37:36.360 --> 00:37:39.890 the computer science department actually had more honor code violations than the 00:37:39.889 --> 00:37:43.118 rest of the university combined. 00:37:43.119 --> 00:37:45.519 Take everything else in the university, put them all together, they were like over 00:37:45.518 --> 00:37:48.808 here. And we're, like, we're computer science, 00:37:48.809 --> 00:37:52.450 which is not a fun distinction to have, let me tell you. 00:37:52.449 --> 00:37:55.368 And you might wonder why is that? Is that because computer science people are just 00:37:55.369 --> 00:37:58.028 mischievous and dishonest? No. 00:37:58.028 --> 00:38:01.898 It's because it's easier to catch honor code violations in computer science. We have a 00:38:01.898 --> 00:38:05.118 whole bunch of tools that allow us - then we take all your programs and we run them through 00:38:05.119 --> 00:38:07.809 this tool, and it compares them not only to everyone else in here, but, like, 00:38:07.809 --> 00:38:11.119 to everyone from the last, like, X years where X is the large number of people who've 00:38:11.119 --> 00:38:13.209 ever gone through the classes, right? 00:38:13.208 --> 00:38:16.588 And it's an extremely good tool from finding where honor code violations 00:38:16.588 --> 00:38:17.029 happen, 00:38:17.030 --> 00:38:18.909 from where they don't. And it 00:38:18.909 --> 00:38:23.139 doesn't find spurious violations. To be honest, I've never lost an honor code 00:38:23.139 --> 00:38:24.349 case. When I 00:38:24.349 --> 00:38:26.480 find an honor code case, 00:38:26.480 --> 00:38:27.630 it is blatant. 00:38:27.630 --> 00:38:30.110 And you take it to judicial affairs, and they look at it, and they're, like, 00:38:30.110 --> 00:38:31.269 yeah, this is blatant. 00:38:31.268 --> 00:38:34.318 And I take it to the student, and every student I've ever confronted them 00:38:34.318 --> 00:38:38.139 with never said, "No, no, no. I didn't cheat." They said, "You caught me," okay? 00:38:38.139 --> 00:38:41.639 So it's blatant. It's not like, oh, there's some little line in it, "Oh, am I gonna need to 00:38:41.639 --> 00:38:43.638 worry about an honor code violation?" 00:38:43.639 --> 00:38:47.249 Remember those rules, you have nothing to worry about in this class. It's people who go and, 00:38:47.248 --> 00:38:50.748 like, fish out printouts from the recycle bins and copy other people's 00:38:50.748 --> 00:38:53.329 code that are the people we catch, right? It's blatant cheating 00:38:53.329 --> 00:38:54.179 that we catch. 00:38:54.179 --> 00:38:55.090 But we catch it. 00:38:55.090 --> 00:38:59.298 We catch it all the time. So I hope, I pray it doesn't happen in this class. 00:38:59.298 --> 00:39:02.038 But the reason I make a big deal about it is historically if I look at the 00:39:02.039 --> 00:39:05.630 evidence, it happens and we catch it. And when we catch it, we're required by the 00:39:05.630 --> 00:39:09.088 university to prosecute. And I feel bad because usually it's someone who just made a 00:39:09.088 --> 00:39:10.179 bad call, like, 00:39:10.179 --> 00:39:13.289 they were up way too late the night before working on something else, and 00:39:13.289 --> 00:39:16.909 they're not thinking straight. And rather than just taking a late day or turning in their 00:39:16.909 --> 00:39:19.608 assignment late and getting a slight penalty on it beyond their two free late 00:39:19.608 --> 00:39:20.369 days, 00:39:20.369 --> 00:39:23.470 they decide to cheat. And that's just always the wrong call, okay? 00:39:23.469 --> 00:39:26.879 So you just don't wanna put yourself in that situation. So I get real serious 00:39:26.880 --> 00:39:31.778 about it for a moment, and hopefully it won't be an issue and we can just kind of go on, okay? 00:39:31.778 --> 00:39:35.088 So with that said, that's a whole bunch of logistical stuff. 00:39:35.088 --> 00:39:38.108 Any questions about the logistics of this class or anything I just talked 00:39:38.108 --> 00:39:42.929 about? Uh huh? You had briefly mentioned the late penalty. 00:39:42.929 --> 00:39:44.410 Oh, the late penalty, good point. 00:39:44.409 --> 00:39:46.399 So remember our little bucket scale. 00:39:46.400 --> 00:39:50.349 If you go beyond your two free late days, every day you turn in an assignment late beyond 00:39:50.349 --> 00:39:52.319 those, it drops down one bucket. 00:39:52.320 --> 00:39:55.550 So let's say you already used your two free late days on Assignment No. 1. And on 00:39:55.550 --> 00:39:58.310 Assignment No. 2, you turned in something one day late and you would have gotten a 00:39:58.309 --> 00:40:00.179 check normally, it becomes a check minus. 00:40:00.179 --> 00:40:06.108 So that's how it is. It's one bucket per late day beyond your two free ones. Uh huh? Are the sections first come, first served? 00:40:06.108 --> 00:40:09.308 Yeah, the sign-ups, well, they take into consideration your preference, but 00:40:09.309 --> 00:40:12.369 part of your preference is to do the match is first come, first served. 00:40:12.369 --> 00:40:14.899 So you wanna sign up early. 00:40:14.898 --> 00:40:15.778 Oh, 00:40:15.778 --> 00:40:17.518 thanks for your honesty. As a matter of fact, 00:40:17.518 --> 00:40:20.699 I dig honesty, all right? 00:40:20.699 --> 00:40:23.679 Any other questions? 00:40:23.679 --> 00:40:29.058 It's just honesty's cool. Uh huh? How much time should we plan on studying [inaudible]? 00:40:29.059 --> 00:40:32.039 Oh, good question. How much time should you plan? And this is something that I say for 00:40:32.039 --> 00:40:34.470 classes in general at Stanford, which is not always true, 00:40:34.469 --> 00:40:37.559 which is take the number of units that a class is, 00:40:37.559 --> 00:40:43.128 multiply it by three. That's how many hours you'll spend per week in that class, total, 00:40:43.128 --> 00:40:44.230 on average. 00:40:44.230 --> 00:40:47.719 So what that means is in 106A, a 5 unit class, you multiply by 3, you 00:40:47.719 --> 00:40:49.029 get 15. 00:40:49.030 --> 00:40:52.390 Five of those hours are roughly spent between class, section, interactive grading, 00:40:52.389 --> 00:40:53.289 other stuff. 00:40:53.289 --> 00:40:57.050 That means on average about ten hours a week will be spent on your assignments 00:40:57.050 --> 00:40:58.310 in this class. 00:40:58.309 --> 00:41:01.690 Again, that's an average. Sometimes when I go to computer science conferences, I sit there and joke 00:41:01.690 --> 00:41:04.380 around with plans. And we're, like, "Oh, how long did your assignments take?" 00:41:04.380 --> 00:41:07.619 And I say, "Oh, on average, ten hours." And what I really mean when I say on average 10 00:41:07.619 --> 00:41:07.999 hours 00:41:07.998 --> 00:41:10.858 is they take between 3 and 45, 00:41:10.858 --> 00:41:14.058 okay? It's a large variance event, right? 00:41:14.059 --> 00:41:17.439 Ten is the average. Some people take a really long time. Some people get through it 00:41:17.438 --> 00:41:21.358 really quickly, but that's about the average you can plan for. Uh huh? 00:41:21.358 --> 00:41:27.598 Another question? [Inaudible] late days [inaudible] class days? 00:41:27.599 --> 00:41:32.009 Yeah, all late days are class days, so the free ones - 00:41:32.009 --> 00:41:35.579 the halfway mark's really my reach. That's about it. 00:41:35.579 --> 00:41:39.900 All right. So I do wanna give you your very beginning of an introduction to 00:41:39.900 --> 00:41:42.778 programming before we sort of break for the day. How 00:41:42.778 --> 00:41:45.880 are we doing on time? 00:41:45.880 --> 00:41:49.108 And so in order to kind of see this, 00:41:49.108 --> 00:41:51.739 there's a few things that we wanna keep in mind. Actually, let me show you a 00:41:51.739 --> 00:41:54.989 little picture, okay? 00:41:54.989 --> 00:41:56.829 Sometimes 00:41:56.829 --> 00:41:59.239 when we talk about writing programs, 00:41:59.239 --> 00:42:01.539 we talk about debugging programs, 00:42:01.539 --> 00:42:04.728 right? How many people ever heard the term debugging or bugs in programs? 00:42:04.728 --> 00:42:08.208 A bug in a program is an error in a program, so sometimes when you hear us 00:42:08.208 --> 00:42:12.678 say, "Oh, come see," like, your section leader to help debug or see the helpers in LaIR. 00:42:12.679 --> 00:42:16.039 That's another thing. In the Tresidder computer cluster is the LaIR. 00:42:16.039 --> 00:42:18.579 It's a computer cluster that we have helpers there to help you get through 00:42:18.579 --> 00:42:21.189 this class. What is it? 00:42:21.188 --> 00:42:21.978 Sunday through 00:42:21.978 --> 00:42:26.668 Thursday, every week, from around 2:00 in the afternoon 'til midnight every day, okay, 00:42:26.668 --> 00:42:29.668 to help you get through the class. So that's a good place if, you know, you can 00:42:29.668 --> 00:42:32.558 work in your dorm room certainly, but if you also want help, go to the Tresidder 00:42:32.559 --> 00:42:36.149 computer cluster, and there will be helpers there. There's a little queue you sign up for 00:42:36.148 --> 00:42:38.588 to get help, and that's a great place, and it's all explained in Handout 00:42:38.588 --> 00:42:39.349 No. 1, 00:42:39.349 --> 00:42:41.199 but that's just something to keep in mind. 00:42:41.199 --> 00:42:44.509 Where the term debugging comes from, it turns out this is an apocryphal story, but I'll tell 00:42:44.509 --> 00:42:45.429 you anyway. 00:42:45.429 --> 00:42:48.679 Back in the days of yore, in 1945 actually, there was a computer called the 00:42:48.679 --> 00:42:52.079 Mark II at Harvard. And there was a woman named Grace Murray Hopper. Anyone ever 00:42:52.079 --> 00:42:54.168 heard of Grace Murray Hopper? 00:42:54.168 --> 00:42:58.328 A few folks. She was actually the first woman who was an admiral in the navy. 00:42:58.329 --> 00:43:01.859 And she was also one of the very early pioneers of computer programming. She did 00:43:01.858 --> 00:43:05.068 a lot of computer programming when she was actually a captain, and she was stationed 00:43:05.068 --> 00:43:08.829 at Harvard as part of some sort of navy thing. I don't know why, but that's what 00:43:08.829 --> 00:43:09.440 happened. 00:43:09.440 --> 00:43:12.039 And they had this huge computer there, and they were noticing the computer was 00:43:12.039 --> 00:43:14.900 on the fritz, and they couldn't understand what was wrong. And this is one of these 00:43:14.900 --> 00:43:17.970 big old machines in the days of yore that has vacuum tubes and stuff inside it. 00:43:17.969 --> 00:43:21.079 So they walked inside the computer, right, because then you could actually open it up 00:43:21.079 --> 00:43:23.009 and walk inside your computer. 00:43:23.009 --> 00:43:25.248 And they saw this, 00:43:25.248 --> 00:43:27.889 and I don't know if you can see that, but that's a moth. 00:43:27.889 --> 00:43:31.858 It was a moth that had sort of given its life to be immortalized because it had actually 00:43:31.858 --> 00:43:35.028 shorted out across two relays in the computer 00:43:35.028 --> 00:43:36.579 and was causing these sort of 00:43:36.579 --> 00:43:39.829 errors to happen on the fritz. And so they took the bug out, and once 00:43:39.829 --> 00:43:43.380 they actually plucked this little charred bug out of there, the computer started 00:43:43.380 --> 00:43:47.910 working fine again, and she taped it in her log book. And this log book's actually 00:43:47.909 --> 00:43:51.588 preserved in the Smithsonian Institution now, which is where all this comes 00:43:51.588 --> 00:43:54.529 from. Here's all the standard disclaimer information: "Image used under fair use for 00:43:54.530 --> 00:43:58.079 education purposes. Use of this image is exempt from Creative Commons 00:43:58.079 --> 00:43:59.880 and other licenses," just so you know. 00:43:59.880 --> 00:44:02.039 Now the lawyers are happy. 00:44:02.039 --> 00:44:06.119 But this is where we think of sort of the modern term debugging actually came from. 00:44:06.119 --> 00:44:09.439 Now, it turns out the actual story is that the term debugging came from the 00:44:09.438 --> 00:44:11.178 1800s, in the late 1800s 00:44:11.179 --> 00:44:15.088 from mechanical devices. People actually referred to debugging as fixing mechanical 00:44:15.088 --> 00:44:15.739 devices. 00:44:15.739 --> 00:44:20.038 But this is kind of the apocryphal story for how it comes up in computer science. Now, 00:44:20.039 --> 00:44:21.849 with that said, 00:44:21.849 --> 00:44:25.109 what is the platform in which you're gonna sort of do your first debugging or 00:44:25.108 --> 00:44:28.058 your first work on? We talked about Java, but in fact in this class, we're not 00:44:28.059 --> 00:44:29.369 gonna start with Java. 00:44:29.369 --> 00:44:32.778 We're gonna start with something even sort of simpler than Java because as I 00:44:32.778 --> 00:44:36.259 mentioned, sometimes what happens in computer science is people learn all the features 00:44:36.259 --> 00:44:39.748 of some language. And they think just knowing the language makes them a good 00:44:39.748 --> 00:44:40.679 software engineer. 00:44:40.679 --> 00:44:43.659 And they get so worried about all the features of the language 00:44:43.659 --> 00:44:46.068 that they don't kind of think about the big picture. 00:44:46.068 --> 00:44:49.259 And so there was a guy named Rich Pattis, who oddly enough was actually a grad 00:44:49.259 --> 00:44:51.250 student at the time at 00:44:51.250 --> 00:44:51.858 Stanford, 00:44:51.858 --> 00:44:55.208 and he said, "You know what? If we're gonna teach computer science, when we first start out, why don't 00:44:55.208 --> 00:44:58.599 we have people not worry about all of the different 00:44:58.599 --> 00:45:00.779 commands of the language and all the different things they can do? 00:45:00.780 --> 00:45:04.389 Let's start with something really simple so you can learn all the commands 00:45:04.389 --> 00:45:08.169 real quick. And then you've mastered everything there is to master about that 00:45:08.168 --> 00:45:11.708 language, and you can focus on the software engineering concepts." And it turns out to 00:45:11.708 --> 00:45:15.048 be a brilliant idea, which has actually been adopted by a bunch of people. 00:45:15.048 --> 00:45:19.409 And so Rich, who's a wonderfully friendly guy - sometime if we get him to 00:45:19.409 --> 00:45:22.818 come to Stanford, I'll introduce you; he's just very nice - 00:45:22.818 --> 00:45:27.318 came up with this thing called Karel the Robot. And 00:45:27.318 --> 00:45:29.259 the term, "Karel" 00:45:29.259 --> 00:45:31.748 actually comes from 00:45:31.748 --> 00:45:36.308 Karel Capek. 00:45:36.309 --> 00:45:40.039 Anyone know who he is? Oh, free candy. Uh huh? He coined the term, 00:45:40.039 --> 00:45:42.949 "robot." 00:45:42.949 --> 00:45:45.959 He coined the term, "robot." He was a Czech playwright who actually wrote a play 00:45:45.958 --> 00:45:48.199 called, "RUR," 00:45:48.199 --> 00:45:52.409 which was about robots. And the word robot actually comes from a Czech word, the 00:45:52.409 --> 00:45:53.969 Czech word for work. 00:45:53.969 --> 00:45:57.940 And so the robot is named after 00:45:57.940 --> 00:46:01.338 Karel. And some people say Karl, which is kind of actually closer to I believe if - I 00:46:01.338 --> 00:46:03.969 don't know if there's anyone who speaks Czech in the room - but closer to the 00:46:03.969 --> 00:46:06.439 actual pronunciation. But we say Karel these days because it's kind of like 00:46:06.440 --> 00:46:07.909 gender neutral, okay? 00:46:07.909 --> 00:46:09.869 And so Karel the Robot 00:46:09.869 --> 00:46:13.318 is basically this robot that lives in a really simple world. And so I'll show you 00:46:13.318 --> 00:46:16.289 all that you can meet Karel the Robot. He's friendly; he's fun. 00:46:16.289 --> 00:46:18.588 I'll show you Karel the Robot. 00:46:18.588 --> 00:46:21.239 00:46:21.239 --> 00:46:25.969 So we gotta get Karel running. He's at the factory. He's getting souped up. We're energizing Karel. 00:46:25.969 --> 00:46:29.418 You gotta add some color to it. Otherwise - 00:46:29.418 --> 00:46:31.248 all right. 00:46:31.248 --> 00:46:34.558 We're begging for him. Come on, Karel. 00:46:34.559 --> 00:46:37.459 There he is. Oh, 00:46:37.458 --> 00:46:41.538 yeah. 00:46:41.539 --> 00:46:45.259 That's Karel the Robot. He looks like one of the old Macintoshes if you remember the original 00:46:45.259 --> 00:46:48.289 Macintoshes that look like a lunch pail, except he's got legs. 00:46:48.289 --> 00:46:51.788 One sticks out his back. That's just the way it is. 00:46:51.789 --> 00:46:56.819 And the way Karel works is he lives in a grid. To you, it may not be exciting, but to 00:46:56.818 --> 00:46:58.630 Karel, it's way exciting. 00:46:58.630 --> 00:47:03.179 So Karel lives in this little grid, and the way the grid works is there are streets and 00:47:03.179 --> 00:47:06.789 avenues in the grid. Streets run horizontally, so this is First Street, 00:47:06.789 --> 00:47:08.430 Second Street, Third Street. 00:47:08.429 --> 00:47:11.559 And then over here, we have avenues, First Avenue, Second Avenue, Third 00:47:11.559 --> 00:47:14.750 Avenue, Fourth Avenue, Fifth Avenue. It's kind of like Karel lives in Manhattan if you wanna 00:47:14.750 --> 00:47:16.338 think about it that way, okay? 00:47:16.338 --> 00:47:19.748 So Karel always is on one of these corners. So right now, he's at the corner of 00:47:19.748 --> 00:47:22.788 First Street and First Avenue, or we just refer to it as 1 1 if you wanna 00:47:22.789 --> 00:47:25.130 think about sort of Cartesian coordinates, right? But 00:47:25.130 --> 00:47:26.780 just think of them as streets and avenues. 00:47:26.780 --> 00:47:28.609 That's where Karel lives. 00:47:28.608 --> 00:47:32.278 And Karel can move around in this world. There's a bunch of things that Karel can do. 00:47:32.278 --> 00:47:33.889 He can take steps forward. 00:47:33.889 --> 00:47:36.939 He can turn around to face different directions, and he can sense certain 00:47:36.938 --> 00:47:38.288 things about his world. 00:47:38.289 --> 00:47:41.400 So there's some things that exist in Karel's world, okay? 00:47:41.400 --> 00:47:45.340 Things like walls that Karel cannot move through, right, so his world has 00:47:45.340 --> 00:47:48.740 walls all around it that he can't go through, so he can't fall off the end of the 00:47:48.739 --> 00:47:49.139 world. 00:47:49.139 --> 00:47:52.629 And there's other walls like this one if Karel were over here, he can't step through 00:47:52.630 --> 00:47:54.169 that wall. 00:47:54.168 --> 00:47:57.768 There's also something referred to as beepers in Karel's world. And what a 00:47:57.768 --> 00:48:00.488 beeper is, is it's like a big diamond, 00:48:00.489 --> 00:48:03.909 okay? But what a beeper really is, is basically just some marker that he puts in 00:48:03.909 --> 00:48:06.510 the world. You can think of a beeper like a piece of candy. 00:48:06.510 --> 00:48:10.530 And Karel just goes around, like, putting pieces of candy in the world. As a matter of fact, not 00:48:10.530 --> 00:48:12.999 only does he put pieces of candy in the world, 00:48:12.998 --> 00:48:17.948 he carries around a whole bag of candy. So he has a beeper bag with him, and 00:48:17.949 --> 00:48:21.099 sometimes that bag has a whole bunch of beepers in it; sometimes it only has one 00:48:21.099 --> 00:48:22.318 beeper; sometimes, 00:48:22.318 --> 00:48:25.998 it's sad Karel, and he has no beepers. But he's still got the bag. 00:48:25.998 --> 00:48:28.798 There just don't happen to be any beepers in it. So he can potentially, if he 00:48:28.798 --> 00:48:32.628 come across a beeper in his world, he can pick it up and put it in his bag, 00:48:32.628 --> 00:48:35.509 or he can take, if he's got beepers in his bag, he can take them out of his bag 00:48:35.509 --> 00:48:37.340 and put them places in the world. 00:48:37.340 --> 00:48:40.860 And corners in the world can have either zero - if they have no beepers, they just appear 00:48:40.860 --> 00:48:41.920 like a little dot - 00:48:41.920 --> 00:48:44.059 or one or more beepers 00:48:44.059 --> 00:48:47.199 on them that Karel can potentially pick up, okay? 00:48:47.199 --> 00:48:51.229 So any questions about beepers or Karel having a little bag of beepers? 00:48:51.228 --> 00:48:52.338 And that's it. 00:48:52.338 --> 00:48:53.929 That's Karel. 00:48:53.929 --> 00:48:57.298 That's his world. His world, we can make it larger if we want. We can put in walls in 00:48:57.298 --> 00:49:00.219 different places. We can put beepers in different places. We can have Karel be in a 00:49:00.219 --> 00:49:01.278 different place. 00:49:01.278 --> 00:49:04.938 But starting next time, what you're gonna realize is with this extremely simple world, 00:49:04.938 --> 00:49:08.558 there's actually some complicated things you can do. And after about a week - so 00:49:08.559 --> 00:49:11.939 this first week, we're gonna focus on Karel - you'll notice that Karel is 00:49:11.938 --> 00:49:15.658 actually a very nice, gentle introduction into Java. And a lot of the concepts that 00:49:15.659 --> 00:49:20.148 we learn, sort of software engineering concepts using Karel, will translate over to the 00:49:20.148 --> 00:49:21.969 Java world, okay? 00:49:21.969 --> 00:49:25.338 So any questions about Karel or any of the other logistics that you've actually 00:49:25.338 --> 00:49:28.599 heard about in the class? 00:49:28.599 --> 00:49:33.619 Alrighty then. Welcome to 106A. I'll see you on Wednesday.