Lecture 1 | Programming Methodology (Stanford)

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments

This series taught me 90% of what I know about programming. Big time commitment, you absolutely must do all the assignments, but it really does pay off.

👍︎︎ 1 👤︎︎ u/Octember 📅︎︎ Dec 28 2010 🗫︎ replies

Excellent course. Excellent teacher, Excellent school.

👍︎︎ 1 👤︎︎ u/wsppan 📅︎︎ Dec 29 2010 🗫︎ replies
Captions
this presentation is delivered by the Stanford center for professional development so welcome to CS 106 a if you don't think you should be in CS 106 a you think you should be somewhere different now it's probably a good time to to go not that I would scourge anyone taking this class think we'll have a lovely time in here but this class is CS 1 or 6a so if you or 70 a so if you're like wait I thought it was an e 78 you're fine they're the same class it's the same thing no worries ok there's 4 handouts there in the back if you haven't already gotten the handouts because you came in you sat down don't worry you can pick them up on the way out they're the same handouts they'll still be there so just a quick introduction that's what the the first 4 handouts actually give you they give you a little bit of an introduction to the class what we're going to cover some of the logistics for the class and some other stuff we're going to go over all that today so if we try to get a good idea for where we're at okay so just a quick show of hands before we get into a bunch of things in the class this is kind of an intro programming course sematic well it is I shouldn't say it's kind of an intro program of course it is an intro programming course and it's always good to get an idea as to how much familiarity you may have beforehand ok so just quick show of hands how many people can recognize a computer that's on good good that's the prerequisite for this class so if you're worried about how much previous experience you've had or your friend who like work their way through high school by programming for google or whatever don't worry about it because all you need to know in here is basically either how to turn a computer on or to recognize a computer that's on if you were to walk up to it and it would already be on alright so but a little bit more seriously how many people have actually used the computer for anything all right I would expect most of you so now we begin to want bump it up a notch how many people have used it for word processing ok most folks how many people have done web browsing yeah I won't ask you what you look at in our heads is I don't want to know how many people have actually created a web page ok fair number how many people have done any kind of programming before fair number alright how about how many folks have done actually programmed in Java before all right a few fo how about another language C C++ basic anyone program in basic yeah I love I'm one of those the first language I've learned and it was kind of like the warm and fuzzy and I felt good there's actually people who argue that if you learn base because your first language your brain damaged then you're just beyond help but if that's the case well on the boat together because I'm probably brain damaged the truth is I probably am but that's a whole different story all right so one thing you should know kind of up front is actually this course is going to be provided eventually somewhere down the line as part of Stanford School of Engineering free course initiative which means not only are we recording this course to broadcast to a bunch of people out in companies and Industry are watching this course but we're events going to provide a free to the world so how does that impact your life and on the average day it doesn't at all the only way it does impact your life is just so you know the lawyer told me to tell you that your voice should you ask a question may actually be recorded as part of the video as a result your voice may end up going out the thousands of people are millions of people in the world if you have an issue with that come talk to me if you don't everything is just fine all right don't worry we're not going to put your picture up or anything like that you might want to be on the video like hey mom on TV we decided that we're just going to not show anyone actually on the video but your voice may actually get recorded okay now along those lines you may also notice there's some microphones in the room so when you want to ask a question please make sure to use the microphone because that's not only good for people in here to be able to hear your question it's also good for all the folks that this is getting broadcast to because not only we're going to broadcast to the world but there's actually some folks you're sort of watching this live now in various companies in Silicon Valley so it's real important that you actually use the microphone so just remember that every once in a while I might get on your case and be like please use the microphone I'm not trying to be you know argumentative or anything I just want to make sure we pick up all the audio all right so with that said a little bit of an introduction that's kind of a way of background I didn't give you any sort of introduction so just introduce myself my name is Maryland sahami I'm the professor for the class don't call me professor sahami way too formal don't call me mr. sahami that I think of my dad and don't call me mrs. sahami we're going to have issues all right so just call me Marin we'll get along it's just fine all right that's fit keeps things a little bit more informal but that way it's a little bit easier to discuss stuff as you go along there's also head TA for the class Ben Newman who's standing up there get to know Ben he has all the real power in this class I'm just kind of a monkey that gets up here and you know give the lectures but Ben really is the one who's got all the power along with the heads here for the class we have a large section leading staff so the section leaders here could you stand up if you're here they're kind of all over the place some over here some over there some over there as you can see there's a pretty large number of folks and this isn't even all of them we sort of have more we just can't stuff them all into the room who our section leaders for the class and these folks are all here to make sure that everyone in this class has good as an experience as possible when we're sort of going through the class and the best way to reach all this is email so on handout number one you get my email and Ben's email will tell you how to sign up for section that's how you'll meet your section leader and get your section leaders email that'll all be coming soon but email really is kind of a happy form of communication let's get ahold of us okay so with that said I want to tell you a little bit about this class and kind of what we're going to do in here and what you should expect and make sure that you know you don't feel scared off by this class okay because it really is meant to sort of be an interesting time but one question that comes up is why is this class called programming methodology right why don't we just call this program this class like programming with java and the real reason for that is the programming methodology is about good software engineering principles it's about something that's much larger than just programming so some people like they'll go and get a book somewhere and they'll think they you know learn how to program by just reading the book and they're like oh I know how to program isn't that great and it's like yeah you might know the mechanics of the language but the mechanics of the language are nothing compared to understanding the software engineering principles the Goines actually developing a software system and that's what you're going to learn about in this class you're going to learn a lot of those principles but in order to be able to use those principles and apply them you also need to have a language to program in and that language that we're going to use in this class is Java so the way I like to think about it and the way I tell a lot of people is writing a good program we're learning how to program is like writing to is like learning to be a good essay writer and you're like oh but part of the reason I'm taking this class Miran is that I don't like writing essays that's fine it's okay trust me I didn't like writing essays either but the whole point is that when you write an essay it's not a formulaic kind of thing you're like what what about five paragraph essays yeah I just blocked out from your mind I bad time right that was just like 70s education at work it's not a formulaic kind of thing there's an art to writing an essay right in order to write an essay you need to know a language you need to know English or German or Hindi or whatever language you want to use but then you use that language to write an essay that just knowing the language doesn't make you a good essay writer though being a good essay writer makes you a good essay writer so that's the same difference in programming and software engineering knowing a language in order to be a good programmer like a good essayist you need to know a language to write your programs in whether I be Java or C or C++ or whatever here we're going to use Java but just knowing the language doesn't make you a good software engineer and doesn't make you understand what the principles are of writing good software which is what you're also going to get in this class in addition to the language and that's kind of a key thing to stress so if you're sort of worried if you're kind of looking around you saw a bunch of people raising their hands when I asked do you have any previous programming experience and some folks raised their hands and you got a little worried you're like Oh am I going to be you know in some sense of the disadvantage because I haven't done any programming before the answer plain and simple is no okay you're going to learn everything you need to learn from the first principles in the matter of fact in some cases you might be in slightly better shape that's not necessarily to say that that's the way it will be but how many people are Star Wars fans just wondering anyone I'm talking about the old school original like three movies those we're so good we're not no Jar Jar Binks here alright so if you remember and sort of you know I'm a big star Wars fan that's just a whole separate point but in the second movie Yoda actually says something which I thought was quite profound which is he says you know sometimes you have to unlearn what you have learned and one of the things we actually find is that some people who are self-taught programmer some of them are just fine and some of them are very good but some of them have picked up some really bad habits along the way and it's like being a bad essay writer and to go from being a bad essay writer to a good essay writer in some cases can actually be harder than from not being an essay writer to being a good essay writer because you have to unlearn the bad habits so if you're worried about oh I've had no previous experience don't worry you're okay blank slate you're just fine and now if you're thinking oh I have some previous experience do I have bad habits don't worry you'll be fine too okay so it's all going to work out so the next question that kind of comes up hopefully that helps put some of your fears aside and another one of the things that we really strive to make everyone successful in this class okay at some other schools they you know we want people want to do computer science where they want to do an engineering major whatever and you come into the first day of class and they say Oh only 1/3 of you were actually going to make it through you know this program and you look to the person your left and look to the person to your right and only one of you will make it through and you're like oh that's that's real nice it's not like that here as a matter of fact we want all of you to be extremely successful in this class which is why we have a huge core staff which is why over years and years we've refined how we do a lot of the teaching in this class to make sure you have the best possible experience and to make sure that everyone gets through and the important thing about that is that you're not competing against anyone except yourself in this class it's not like we're going to have a curve and we're going to say oh we have a certain number of FS and a certain number of DS and a certain number of C's all we really have going into it is an expectation that when you get out of here there's a set of stuff we want you to know and if you know that stuff well you get an A and if everyone knows that stuff well everyone gets an A and I got no problems with that register I might have a problem with that but that's ok you don't need to worry about that so you don't need to think about always someone else doing better than you or whatever and we'll talk about issues of collaboration in just a little bit all you need to think about is learning the stuff yourself as well as you possibly can and you'll be just fine and you'll get a good grade ok so that's really all we ask which is not a trivial amount right is requires you to really understand the material so another question that comes up is are you in the right place right this isn't the only introductory program in class at Stanford so I want to spend a little bit of time making sure you actually are in the right place by going so over some of the different options so right now as you know you're in CS 106 a and CS 106 a we're sort of happy over here right as a matter of fact we're not only happy we're happy and we're also a little bit loop right there is no previous programming experience required as I mentioned right all you need to know is basically if you can get to a computer and know how to figure out that it's on and you're in good shape but what 106a does it's a real rigorous class you learn programming in here and you learn it in a way that makes you ready to be an engineer if you so choose to be an engineer that's not to say you're all going to be engineers I would love for all of you to be computer science majors but statistics in the past show only about 6 percent of you will be computer science that's not because we turn anyone off to computer signs it's because we make programming accessible to so many people that you don't have to be a computer science or EE or even an engineering major to do extremely well in the class and we actually have sort of a significant percentage of the entire campus undergraduate student body at Stanford actually goes through this class and does well okay so don't worry if you're like all but I'm not really a CS person hey hope will turn you into one by the end of the class now it's okay but you'll be prepared if that's what you want to do so this leads into a whole engineering sequence that can go on to you know other engineering majors or the computer science majors if you're like huh I'm not sure that's really what I want to do as a matter of fact I'm so sure that's not what I want to do I only want to get the general education requirement out of the way and I'm positive there's nothing else I want to do really no matter how much I like it like there's no way you're going to drag me into anything that would involve you know anything remotely techie there's a class CS 105 and this is kind this is happy yeah this is you know this is kind of all we're happy you know in our little happy world I don't want to say it's holding hands and singing Kumbaya because that's not what it is it's a real class but but it's meant to be a general education requirement right it's not meant it doesn't lead into the 106 is it's meant to be its own self-contained class you do some JavaScript in there you do a little bit of what computers are about computers in society it's a good time we all hold hands we're all happy I don't teach the class so I don't actually hold hands but it's a fun time okay it just doesn't lead to anything else so think of this as kind of a terminal class right so it's sort of like you I will hook you up to the IV drip you're like well one on six eight you told me I don't need any previous background well hey Marilyn I got lots of background I got so much background at Hertz I got AP background I got working through school doing software engineering background I'm not sure I should be here that could be the case we have another class called CS 106 X and as the X kind of implies it's sort of the extreme games version of the class now it stands for accelerated right because a was already taken so we have to come up with something else so the way CS 106 X works is it really is a very fast-paced class it's meant for people who've got previous AP exam credit like got a four or five on the AP or have had significant and prior programming experience before if you're not sure which one of these classes is for you you can come talk to me afterwards or I'd also encourage you you could go to pick up the syllabus for CS 106 X and compare it to CS 106 a this class is all in C++ and if you're thinking hey man I'm doing 106 a I want to learn Java and C++ don't worry you'll eventually if you so choose take a class called CS 106 B which is where this class sort of leads to which is C++ and all the other stuff you would have learned in this accelerated class okay so you still certainly have that course pass so don't let anyone make you think I know a lot of times especially for Stanford students you come in here and you're like well every class I took in high school was like an honours or an AP class or if it wasn't an honors an AP class like I have to tie half my brain behind my head because I'm just that hardcore and so everyone just wants to like do the most hardcore thing they can write and what I'm here to tell you is that you shouldn't necessarily think about it that way you should think about it is where you feel most comfortable some number of years ago let's just say greater than 10 maybe 15 I was sitting where you're sitting right now literally I was in CS 106a internment Auditorium as a freshman okay it was perfectly fine it worked out I went to grad school did the faculty thing it's just fun it will open your doors to see us you're not at any kind of disadvantage by starting here so I know where you've been literally like that seat right there is where I was most of the time so just something to keep in mind in terms of different options that are actually available to you now with that said let's just assume for the rest of this lecture that this is the right place for you and if it's not well afterwards we can kind of talk about it or if you really are convinced now that it's not the right place you can feel free and try to scramble over 20 of your classmates and actually leave the room which is probably impossible all right so a few other things you should know some mechanics so handout number one should you want to follow along at home is the class webpage and so all the stuff bit we think of as course materials including online copies of the handouts things that you'll need to do for the assignments announcements related to the class are all on the class web page which is www dot stanford.edu slash class /c s 106 a and because that's just kind of a whole bunch to remember we make your life easy and so there's an equivalent form of the URL which is just CS 106 a dot stanford.edu which is the easy thing to remember you put that in will take you to the class webpage okay and you should check that regularly because all the announcements and handouts will get out hard copies of all the handouts in class but it should you happen to miss class for whatever reason you want to go print whatever copies of the handouts were actually given out you can find them all on the web page okay now there's this funky thing about units so you may have noticed that this class is for three to five units and that kind of brings up the natural question should I take it for three or five units if you're an undergrad you take it for five units and a story that's life in the city congratulations five units if you're a graduate student you can have the option of taking it for three units if you want if you're going to run into some unit cap it doesn't change the amount of work you have to do welcome to graduate school same work fewer units so that's just the way life is if you have a unit cap and your grad student three units you can take it if you want you can take four five if you want as well if you're an undergrad you take it for five all right so why is it five units and you might think hey this class only meets three times a week how come it's five units well it actually has a fourth meeting every week which is your section and that's something you should sign up for so how you actually sign up for your section is sections are at a bunch of different times you don't sign up for them and access even though they're all kind of listed in the time schedule that's not where you sign up for an access you just sign up for the class how you sign up for a section is you go to a website see s 198 dot stands for dot edu slash section and this will give you give us a list of preferences for section x that you want to sign up for and there's some matching process that goes on that takes all your preferences into consideration with the whole system and eventually you get an email by sometime early next week that tells you what section you're in in sections fifty minutes once a week it's required to go to it's actually going to be part of your class participation grade which we'll talk about in just a bit okay when do these sign ups happen they happen between 5:00 p.m. this Thursday is when they go up so if you try to go there now you can't sign up I remember 5 p.m. Thursday so they're up and then they're down at 5 p.m. on Sunday ok so make sure you sign up probably this weekend if you're planning on being out of town this weekend you want to sign up before you go sign up early but don't sign up often because you only need one section ok if you're an SCPD student every once in a while you'll hear me refer to SCPD students that stands for Stanford center for professional development they are the folks in industry who actually take this class via broadcast if you're an SCPD student you're automatically enrolled for a section so you don't actually need to do this and your section will meet ads so for SCPD and if you're wondering when that CPD student is you're not one okay so se PD section meets Friday front 115 to 205 it meets live if you want to go there live in skilling auditorium but if you're watching it remotely it meets on channel e - I know it seems weird to say meets on channel what does that mean it meets on it meets on channel e - okay that is grammatically the correct way of saying it all right so there's a little bit of a more administrative kind of stuff now textbooks write textbooks there's nothing quite like the extortion that is textbooks so there's two textbooks that are required for this class well one's a course reader and one's a textbook the course reader is called Carol the robot learns Java you can pick it up at the bookstore it's relatively cheap it was actually written by Eric Roberts here and surprisingly enough the textbook for the class was also written by Eric Roberts the art and science of Java which is available now in your local bookstore including the bookstore on campus so you can go and pick up a copy of this so both these things you actually want to have because they're required for the class we'll go through all of them we'll go through basically everything except the last chapter of this book so you start to get your money's worth we're just going to do it a little bit out of order but we'll go through the whole thing okay so email how many of you have email accounts all right as we'll ask the reverse questions I think at this point some people just don't want to put up their hands how many people don't have email accounts odd how that is not the complement of the folks who have the hands up previously emails required for this class chances are by being at Stanford you've already gotten an email account through your Sun net ID but if you don't have an email get an email account that's how you'll stay in contact with us that's how we'll stay in contact with you except we'll also meet with you live in person but email is kind of the general method for munication as a matter of fact for your first assignment and part of your first assignment is to send us an email just because we love you and we don't get enough email as it is so you need to have an email account to be able to do that so if you have not already you can kind of get ahead of the game and go set up your email account now don't worry you'll get the first assignment next time so you still get like two days of breathing space before your assignment goes out okay there's also going to be lots of handouts on the class they'll be either given out in class and well they will be given out in class but we'll also post them online in case you missed them and how much real work do you do in this class this is always kind of an interesting question so let's talk a little bit about assignments and a little bit of other logistical things so assignments we'll just call them the dreaded assigns there are seven programming assignments and if you look at the syllabus handout number two it tells you when all of them are due all the way through by day so you can plan out your whole quarter it's just that much fun okay and these seven programming assignments are weighted slightly more toward the last assignments because the assignments will tend to get more complicated that doesn't necessarily mean there'll be more programming it just means conceptually they'll become more complicated so we tend to weigh them more toward the end of the class so the later assignments count more than the early assignments how you're going to be actually doing your programming is using a little tool called Eclipse and Eclipse thankfully is free so you don't have to pay for it as a matter of fact you can download it from the CS 106a website and if you're wondering how you do that don't worry we'll give you a handout next class that explains to you the whole ruling process of downloading and installing eclipse and you can use this either on the Mac or the PC so if you have your own computer you can certainly work on this yourself you just download it to your own machine we'll explain the whole process and a handout if you don't have your own computer the public computer clusters on campus will have Eclipse installed on them and so you can use Eclipse there so you're sort of happy to go either way okay now the important thing remember I mentioned that whole notion of software engineering in the class and that's something we take really seriously so seriously as a matter of fact that when you turn in your assignments one thing we could do is we take your assignments and we could just kind of you know look at it and go yeah interesting B here you go thanks for playing and you don't learn a whole lot from that so in order to actually learn a lot from your assignments we could take your assignment write a whole bunch of comments on and hand it back to you even that's kind of not enough what really is a little bit more that makes it more fun is every week after you turn in your assignments and your section leader looks it over and grades it you'll actually meet with your section leader for about 10 to 15 minutes every week or every time an assignment is due to actually go over and something referred to as interactive grading and it's a chance to sit there and talk with an actual human being about what's good in your assignment what are some of the things you need to work on what are some of the software engineering principles you need to develop and that way you can really sort of get more detailed information and be able to ask questions to develop yourself as a programmer as well as get help if you need help ok and that's in addition to going to section going to class and all that stuff so it's another 15 minutes a week you'll actually schedule that time with your section leader on a regular basis when you're going to have interactive grading or just a friction affectionately refer to as IGS because at Stanford you know everything is just short and we just can't say like you know psychology we actually psych so it's IG just remember them all right and then how are these things graded so the other thing we could do is I told you we could just write B and hand it back to you but we found that that's not really great because people get all wrapped around the axle about the grade and so for awhile we did numbers and we're like huh why don't we give a number between 1 and 20 and so what happens there people get all wrapped around the actual about numbers suddenly thought huh what was a happier time when we were in school I remember when we were in school and we used to get back assignments and they had like smiley faces on them well we can't do that because then you know it doesn't appear to be a rigorous Stanford class so instead of the smiley face we come up with something else which looks surprisingly like this it's that's kind of involved to actually draw so I need to erase a board to do it check that's kind of the beginning of our grading scale ok and the way our grading scale works is we start off with a check in the middle which is this is a pretty solid program you know it meets all the requirements for the program maybe it's got a little problem here or there but it's a check then we have sort of two grades on the two sides of it check plus and check - check plus is like solid you did a great job you got everything right things look good nice style in your program nice software engineering and the program works flawlessly good job this is like you know totally check is kind of like yeah you're sort of there it's kind of like a minus B plus maybe on some occasions B but it's kind of like you know it's pretty good work you're in pretty good shape here and so a lot of grades in this class ends up being check pluses and checks and if that's the case you're perfectly fine grade wise check minuses you can imagine this is kind of you know thinking about B be - it's yeah there's some slightly more you know significant problems with your program but that's not where it ends right because we want to be able to even shoot for you know in some sense bigger Augusto's there's a plus and a minus so plus is like oh nice job you know it's got a party pat on the back if you get Plus this all the way through on all your assignments you're in a pretty good candidate to get an A plus and minus like just take good over here and replace it with bad it's kind of like Oh bad times right it's you know or maybe but even there's like more significant Pro problems with this program or just the style on the program is just really bad but even there we don't stop like come on man like I thought the whole reason was to simplify this don't worry it gets even better because we have a plus plus and a minus minus and at this point we've run out of board space so we can't go any further but a plus plus is just outrageous right it's the kind of thing so this is the kind of thing your section leader can't actually give you without coming and talking to Ben and I first because they get a program that just goes it has to actually exceed the requirements for the assignments by a long shot like you'll get all your assignment requirements and what we encourage you to do is you can do a great assignment and get everything right and have good style and you'll be in this category for the later assignments you may be in this category if it's flawless but well actually if you want to go for the plus plus go beyond the assignment requirements and the way we think about the plus plus it's a program that makes you weep in a good way it's just like your section leader sees it and they're just like this is so good I've got to show someone else and they come and show Ben and I and we're like sitting there looking at this on a monitor and like tears are just welling in our there's like soft violin music playing in the background we get out the wine and cheese so this is just like no this is the kind of thing that gets you like remembered and the oh if you want a letter recommendation just ask because you got a plus plus like oh it's awesome right there are very few of these in a quarter so just by sort of way of comparison in the class this size probably throughout the span of the whole quarter I'd expect there to be a teeny ten plus pluses I mean ten assignment plus plus is not ten students who get plus plus across the board so it's really something to strive for but if you strive for it like we're giving you the credit for it and this gets remembered and you get like extra credit and everything so we're left with this right this assignment also makes you weep but not in the good way right it makes you kind of weep in the sense like I look at them and I'm like oh man like who what did I teach like where did I go wrong right I like blame myself I blame you a little bit but I blame myself and this is really just like you know the program is just like you know it's a shell like there really wasn't much effort that was put into it yeah you slap something to be able to go there it doesn't really work you know that whole deal and then if you don't turn anything in we do kind of reserve the zero to distinguish from the you know made really bad effort versus didn't make any effort at all so and we just won't talk about these right let's just hope we can avoid those if possible but that's kind of how the grading scale works again now at the same time you know I trust all of you to be responsible people and every once in awhile something bad happens to a good person and there's an assignment that you'd like to be able to turn in but for whatever reason you can't turn in on time and I just want to treat you like adults I don't want you to have to worry about coming in and asking for an extension or like oh I had this really hard thing another class and I couldn't do at the same time up front everyone gets two free extensions okay so in terms of late days we refer to these as late a strange land up you get two free ones what a late day is is a class day they're not 24 hour days but class day so if something is due on a wednesday you turned in on a Friday that's a late day that's one you turn it on the following Monday that's two late days you can split up your two late days among two different assignments you can use them both on one assignment but when you did not use them at all because if you use your lake days you fall behind in the class the way you should think about these things are these are pre-approved extensions they're not the kind of thing where you just think oh yeah I'm not going to do the assignment because I want to go and play frisbee golf right think of it you wouldn't come ask me for an extent you might but you probably wouldn't ask me for an extension if you're like hey came Erina can I turn in the assignment like on Wednesday because I'm playing frisbee golf this afternoon right if you would feel embarrassed asking that question you probably don't want to use one of your free late days but something happens like oh it's a tough week you got midterms in other class and you got the Simon do or whatever that's a good time to use it so we just trust you and most people we actually encourage you not to use them because it just makes you fall behind in the class because we trust you and we give you these two up front and getting extensions beyond your to free class days is virtually impossible because we sort of upfront said hey it's your responsibility we're giving it two freebies we're not going to give you a third extension imagine if you have to come ask us for three extensions by the third one we'd be like okay what's going on which is why we don't necessarily give extensions beyond these two the only time we might give an extension beyond the two free ones is for something major like death in the family or like serious medical problem that might require surgery or something like that every once in a while unfortunately that it happens I hope it doesn't happen in this class but those are the only kinds of things that we give extensions to beyond the two free late days importantly don't ask your section leader for extensions they cannot grant you extensions only Ben who has all the power in this class can give extensions which is why I should get to know Ben and then hopefully won't need to talk to him about extensions okay so other thing to keep in mind is that three days late is the max beyond three days late which is basically one class week if you think about late days being class days we will not accept an assignment and the reason for that is a certain point you're so late you're better off just doing the next assignment letting the old one go so to sort of enforce that policy after three days we don't accept any that assignment late anymore it's just going to be a zero if it's not turned in and that just kind of force you to keep up couple other minor things why I shouldn't say any minor things are actually kind of important exams there's two exams in this class there's a midterm and a final both of them are well I shouldn't say both the midterm is out of class it's from 7 to 8:30 p.m. on Tuesday October 30th and it's on the syllabus it's there it's on the syllabus dawn hand at number one we repeat at multiple times the date will eventually be announced when you get closer to the midterm but if you have a conflict with this time you need to send me email okay you can send me email a little closer to the midterm because I'll announce it again for people who have conflicts but since it's an out-of-class exam you need to send me email if you have a conflict I'll get all the constraints from people have conflicts and try to schedule an alternate time if there's enough people with conflicts but 7:00 to 8:30 is when you need to know about the midterm and to make up for the fact that we have an out-of-class midterm I actually give you sort of a belated free day which is the Friday of the week of the midterm we don't have class to make up for the fact that we made you come to the midterm outside of class but the midterm is an hour and a half and we can't compress time if we could we have different issues we can't compress time and fit it into a 50-minute class which is why it's out of class but you get a free day for it all right last but not least a few things about grading grading one of those things as you might be able to tell from this little board over here or something if I didn't have to do I wouldn't do it because honestly as corny as this sounds I just believe in the love of learning like I think if you're passionate about something just go do it and you learn it but I'm naive and so that's not the way learning always works so sometimes we actually need grading to make sure that learning takes place and so this is how your grade breaks down forty-five percent of your grade is on the programming assignments okay fifteen percent is the midterm which we'll just call the mid because we like to abbreviate everything thirty percent is the final it's a three hour final exam in the regular final timeslot for this class if you think right or under the delusion that you should take two classes at the same time that's a bad idea because their final exams are at the same time okay so you should not take to exact two classes at the same time and because our final exam is scheduled for I believe it's December 13th which is a Thursday 12:15 to 3:15 that's the regular final exam slot for this class and any other class at the same time will conflict with that slot 30% your grade is the final and that if you add it all up it's not just that I'm bad with math it's because 10% of your grade is actually participation and this is things like did you go to your interactive grading sessions did you regularly attend section did you participate in section did you participate in class right and so in order to help you participate in class there's a little incentive to participate in class which is sugar in the afternoon so someone raise their hand all right yeah I sometimes I'm not a good shot and this will tell you if you're sitting in the back of the room I can throw a kick cap back there because they're a little too light oh yeah sorry if you sit in the back of the room the roof prevents me from actually being able to hit you so if you want the food come up but if you ask questions in class hey that's a good time it's just a little way to be able to reward you for actually participating in class or to keep your blood sugar up if you need it all right so that's participation is 10% your grade as a matter of fact at the end of the quarter I ask everyone your section leaders to actually tell me how much you've participated in class and some of them you know just say all this person was wonderful they came every time they participated it's just a great thing and that helps your grade out a lot okay now the final thing and as you can kind of tell most of the time I'm not the most serious person in the world I just like to have fun with things and I think it's important for you to have fun with things there's just one place where I get real serious and it's one place where Stanford gets real serious anyone want to guess what that is uh-huh plagiarism and the honor code as a matter of fact that's what we call a social so we had someone down here who got it and then a whole bunch people who I don't know so we just spray all right so the honor code in terms of the honor code the question comes up is what is the honor code all about and how does that affect working in you know groups and computer science etc does that mean we shouldn't talk to each other no the answer to all those is no okay the if you look at handout number four which is all about the honor code we encourage you to talk to each other we encourage you to talk about concepts in the class talk about different strategies to problems to think about the ways that you could potentially approach some problem or the way different control constructs when we eventually get to them work in the class and discussion is perfectly fine especially among the course staff but also amongst yourself that's a great thing so where do we draw the line we try to make a bright line for where you've crossed the line for the honor code which is don't share code plain and simple in any respect okay don't give a file to someone else that's got your code in it don't get code from someone else don't look at someone else's printout don't give them a printout if you have two people who are sitting looking at the same screen together that code can't belong to both of you it belongs to one of you I don't know which one but it becomes an honor code violation so you shouldn't both you know two people shouldn't be staring at the monitor together if it ever gets to the point where you're looking at someone else's code that's where you're going to reach an issue okay discuss as much as you want that's great write your own code that's all we care about and you're like well what is code Marilyn what does that word mean code is geek speek for your program so when you program the program that you write is what we affectionately refer to as code and the idea of programming is what we refer to as coding strangely enough we just you know with computer scientists need to make everything more complicated than it really is so we can get people under the illusion that they should pay us lots of money to do what we do I mean you're like oh I just write programs they're like oh yeah I should pay you half and you're like no no I write code they're like oh yeah suddenly it's much more impressive sit on share code the other thing is if you talk to other people like if you have a study group to talk about solution approaches or you go let's say talk to the TA or section leader to how do you shoot approach a problem they give you a lot of hints as to how to do it site collaboration so citing collaboration gets you out of trouble any collaboration that you set you cannot be held responsible for under the honor code you can actually copy someone else's program and say I copied this program from Mary Smith I don't look at that and say they cited it and it will warm the cockles of my heart and Mary Smith will get full credit and you'll get a zero because you copied your program from Mary Smith but it's not an honor code violation because you cited the work so the bottom line is keep yourself safe and cite your collaborations and I guarantee you most of the time you'll be just fine now you might wonder why do I make such a big deal about this and the reason I make a big deal about this is for a while thankfully it's not sure anymore but for a while the computer science department actually had more honor code violations than the rest of the university combined take the ever everything else in the university put them all together they were like over here and we're like we're computer science which is not a fun distinction to have let me tell you and you might wonder why is that is it computer science people are just mischievous and dishonest no it's because it's easier to catch honor code violations in computer science we have a whole bunch of tools that allows that we take all your programs and we run them through this tool in a comparison not only to everyone else in here but like to everyone from the last like X years where X is a large number of people who've ever gone through the classes right and it's an extremely good tool from finding where honor code violations happen from where they don't and it doesn't find you know spurious violations to be you know be honest I've never lost an honor kid coast when I find an honor cake honor code case it is blatant and you take it to these judicial affairs and they look at it and they're like yeah this is blatant and I take it to the student and every student I've ever confronted them with never said oh no no I didn't cheat they said you caught okay so it's blatant it's not like oh there's some little line and Oh am I going to need to worry about an honor code violation remember those rules you have nothing to worry about in this class it's people going like fish out printouts from the recycle bins and copy other people's code that are the people we catch right it's blatant cheating that we catch but we catch it we catch it all the time so I just I hope I pray it doesn't happen in this class but the reason I make a big deal about it is historically if I look at the evidence it happens and we catch it and when we catch it we're required by the university to prosecute and I would feel bad you know because usually it's someone who just made a bad call like they were up way too late the night before working on something else and they're not thinking straight and rather than just taking a late day or turning in their assignment late and getting a slight penalty on it beyond their - free late days they decide to cheat and that's just always the wrong call ok so do you just don't want to put yourself in that situation which so I get real serious about it for a moment hopefully it won't be an issue and we can just kind of go on okay so with that said that's a whole bunch of logistical stuff any questions about the logistics of this class or anything I just talked about uh-huh oh the late penalty good point so remember our little bucket scale if you go beyond your to free late days every day you turn an assignment late beyond those it drops down one bucket so let's say you already used your two free late days on assignment number one and on salmon number two you turned in something one day late and you would have gotten a check normally it becomes a check - so that's how it is one bucket for late day beyond your two free ones uh-huh yeah the sign ups well they take into consideration your preference but part of your preference is to do the match is first-come first-serve so you want to sign up early oh thanks for your honesty as a matter of fact I dig honesty I'm any other questions it's just honesty's cool uh-huh a good question how much time should you plan and this is something that I say for classes in general at Stanford which is not always true which is take the number of units that are classes multiply it by three that's how many hours you'll spend per week in that class total on average so what that means is in 106 a five unit class you multiply by three you get 15 five of those hours are roughly spent between class section interactive grading other stuff that means on average about ten hours a week will be spent on your assignments in this class again that's an average I'm not going to go to computer science conferences I sit there and joke around with pallette and were like oh how long did your assignments take and I say Oh on average 10 hours and what I really mean when I say on average 10 hours is they take between 3 and 45 okay it's a large variance event right 10 is the average some people take a really long time some people get through really quickly but that's about the average you can plan for uh-huh another question yeah all late days are class days so the free ones the halfway mark SRIA Lee my reach that's about it all right so I do want to give you your very beginning of an introduction to programming before we sort of break for the day how are we doing on time and so in order to kind of see this there's a few things that we want to keep in mind actually let me show you a little picture okay sometimes when we talk about writing programs we talk about debugging programs right how many people ever heard the term debugging or bugs in programs a bug in a program is an error in a program so sometimes when you hear us say oh come see like your section leader to help debug or see the helpers in layer that's another thing on the Tresidder computer cluster is the layer it's a computer cluster that we have helpers there to help you get through this class through or what is it Sunday through Thursday every week from around 2:00 in the afternoon till midnight every day okay to help you get through the class so that's a good place if you know you can work in your dorm room gently but if you also want help go to the trusted or computer cluster and there will be helpers there there's a little queue you sign up for to get help and that's a great place and it's all explained in handout number one but that's just something to keep in mind where the term debugging comes from it turns out this an apocryphal story but I'll tell you anyway back in the days of yore in 1945 actually I was a computer called the mark 2 at Harvard and there was a woman named grace Murray hopper anyone ever heard of grace Murray hopper a few folks she was actually the first woman who was an admiral in the Navy and she was also one of the very early pioneers of computer programming she did a lot of computer programming when she was actually captain and she was stationed at Harvard as part of some sort of Navy thing I don't know why but that's what happens and they had this huge computer there and they were noticing the computer was on the fritz and they couldn't understand what was wrong and this is one of those big old machines in the days of yore that has vacuum tubes and stuff inside it so they walked inside the computer right because then you could actually open it up and walk inside your computer and they saw this and I don't know if you can see that but that's a moth it was a moth that it sort of given its life to be immortalize because it actually shorted out across two relays in the compute and was causing these sort of you know errors to happen on the fritz and so they took the bug out and once they actually you know plucked this little charred bug out of their computer started working fine again and she taped it in her log book and this log books actually preserved in the Smithsonian Institution now which is where all this comes from here's all the standard disclaimer information image used under fair use for educational purposes use this image because it exempt from Creative Commons and other licenses just so you know now the lawyers are happy but this is where we think of sort of the modern term debugging actually came from now it turns out the actual stories that the term debugging came from the 1800s in the late 1800s from mechanical devices people actually refer to debugging as fixing mechanical devices but then it's kind of the apocryphal story for how it comes up in computer science now with that said what is the platform in which you're going to sort of do your first debugging or your first work on we talked about Java but in fact in this class we're not going to start with Java we're going to start with something even sort of simpler than Java because as I mentioned sometimes what happens in computer science is people learn all the features of some language and they think just knowing the language makes them a good software engineer and they get so worried about all the features of the language but they don't kind of think about the big picture and so there was a guy named rich pattice you oddly enough was actually a grad student at the time at Stanford and he said you know what if we're going to teach computer science when we first start out why don't we have people not worry about all of the different commands of the language and all the different things they can do let's start with something really simple so you can learn all the commands real quick and then you've mastered everything there is to master about that language and you can focus on the software engineering concepts and it turns out to be a brilliant idea which has actually been adopted by a bunch of people and so rich who's a wonderfully friendly guy sometime if we get them to come to Stanford I'll introduce you is just very nice came up with this thing called Carol the robot and the term Carol actually comes from Karel Capek anyone know who he is Oh free candy uh-huh he coined the term robot he was a Czech playwright who actually wrote a play called ru R which was about robots and the word robot actually comes from a Czech word the Czech word for work and so the robot is named after Carol and some people say Carl which is kind of actually closer do I believe it I don't know if there's anyone who speaks Czech in the room but closer to the actual pronunciation but we say Carol these days because it's kind of like gender neutral okay and so Carol the robot is basically this robot that lives in a really simple world and so I'll show you all you can need Carol the robot he's friendly he's fun I'll show you Carol the robot duty to do so we got to get Carol running he's at the factories getting souped-up renner gisin Carol - do you got to add some color to it otherwise all right we're begging for him come on Carol there he is ah yeah as Carol the robot he looks like one of the old Macintosh's if you remember the original Macintosh would look like a lunch pail except he's got legs one sticks out his back that's just the way it is and the way Carol works is he lives in a grid - you may not be exciting with the Carol its way exciting so Carol lives in this little grid and the way the grid works is there streets and avenues in the grid streets run horizontally so this is 1st Street 2nd Street 3rd Street and then over here we have avenues first avenue 2nd Avenue 3rd Avenue 4th Avenue Fifth Avenue it's kind of like Carol lives in Manhattan if you want to think about it that way ok so Carol always is on one of these corners so right now he's at the corner of 1st Street and 1st Avenue or we just refer to as 1/1 if you want to think about sort of Cartesian coordinates right but just think of them as streets and avenues that's where Carol lives and Carol can move around in this world there's a bunch of things that Carol can do he can take steps forward he can turn around to face different directions and he can sense certain things about his world so there's some things that exist in Carol's world ok things like walls the Carol cannot move through right so his world has walls all around it that he can't go through so there you know he can't fall off the end of the world and there's other world walls like this one if Carroll were over here he can't step through that wall there's also something referred to as beepers in Carroll's world and what a beeper is is it's like a big diamond okay but what a beeper really is is basically just some marker that he puts in the world you could think of a beeper like a piece of candy and Carol just goes around like putting pieces of candy in the world as a matter of fact not only does he put piece of candy in the world he carries around a whole bag of candy so he has a beeper bag with him and sometimes that bag has a whole bunch of be presented sometimes it only has one beeper sometimes it's sad Carol and he has no beepers but he still got the bag there just don't happen to be any beepers in it so he can potentially if he comes across a beeper in his world he can pick it up and put it in his bag or you can take if he's got be presented back you can take him out of his bag and put them places in the world and corners in the world can have either zero if they have no beepers they just appear like a little dot or one or more beepers on them that Carol can potentially pick up okay so any questions about beepers or Carol having a little bag of beepers and that's it that's Carol that's his world his well we can make it larger if we want we can put in walls in different places we can pull beepers in different places we can have Carol be in a different place but starting next time what you're going to realize is with this extremely simple world there's actually some complicated things you can do and after about a week so this first week we're going to focus on Carol you'll notice that Carol is actually a very nice gentle introduction into Java and a lot of the concepts that we learn sort of software engineering concepts using Carol will translate over to the Java world okay so any questions about Carol or any of the other logistics that you've actually heard about in the class alrighty then welcome to 106 ale see you on Wednesday
Info
Channel: Stanford
Views: 2,291,907
Rating: 4.9200058 out of 5
Keywords: Computer, science, technology, programming, software, language, java, lecture, engineering
Id: KkMDCCdjyW8
Channel Id: undefined
Length: 49min 47sec (2987 seconds)
Published: Wed Jul 02 2008
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.