1 00:00:01,940 --> 00:00:04,370 The following content is provided under a Creative 2 00:00:04,370 --> 00:00:05,780 Commons license. 3 00:00:05,780 --> 00:00:08,820 Your support will help MIT OpenCourseWare continue to 4 00:00:08,820 --> 00:00:12,470 offer high quality educational resources for free. 5 00:00:12,470 --> 00:00:15,370 To make a donation or view additional materials from 6 00:00:15,370 --> 00:00:19,300 hundreds of MIT courses, visit MIT OpenCourseWare at 7 00:00:19,300 --> 00:00:20,550 ocw.mit.edu. 8 00:00:25,898 --> 00:00:27,148 PROFESSOR: Welcome, everybody. 9 00:00:30,870 --> 00:00:36,095 So this is the one group meeting that we'll have with 10 00:00:36,095 --> 00:00:36,860 all you folks. 11 00:00:36,860 --> 00:00:41,020 We really appreciate your willingness to come and help 12 00:00:41,020 --> 00:00:45,460 us teach 6-172. 13 00:00:45,460 --> 00:00:50,950 Saman will explain what the course is all about, and then 14 00:00:50,950 --> 00:00:55,110 I will give a presentation, a little bit, of what your 15 00:00:55,110 --> 00:01:00,160 expected responsibilities are, and then Eric, who is one of 16 00:01:00,160 --> 00:01:06,960 our TAs, will present what the first project that they've 17 00:01:06,960 --> 00:01:08,430 been working on is all about. 18 00:01:13,630 --> 00:01:19,930 We think we have a pretty good acronym, OK, MIT POSSE. 19 00:01:19,930 --> 00:01:25,050 Masters in the Practice of Software Systems Engineering, 20 00:01:25,050 --> 00:01:28,540 OK, and it is very much like a posse, in that we're trying to 21 00:01:28,540 --> 00:01:33,160 sort of deputizing you folks to help us deal with this mass 22 00:01:33,160 --> 00:01:34,550 of students that we deal with. 23 00:01:34,550 --> 00:01:37,130 There's no way, given the resources that we have 24 00:01:37,130 --> 00:01:41,270 available at MIT, that we could possibly give the 25 00:01:41,270 --> 00:01:45,800 attention to each of the students examples of code, and 26 00:01:45,800 --> 00:01:49,790 so our strategy is to go out and deputize some people to 27 00:01:49,790 --> 00:01:51,500 help us teach. 28 00:01:51,500 --> 00:01:55,410 As we'll discuss your responsibility is not to do 29 00:01:55,410 --> 00:01:59,780 any grading, OK, or even any understanding of the course 30 00:01:59,780 --> 00:02:01,560 content, OK? 31 00:02:01,560 --> 00:02:08,460 But rather to ask good questions of the students so 32 00:02:08,460 --> 00:02:13,330 that they understand what it's like to do software 33 00:02:13,330 --> 00:02:16,400 development, and you'll see that most of the students are 34 00:02:16,400 --> 00:02:20,930 very immature when it comes to coding practices. 35 00:02:20,930 --> 00:02:25,980 They have taken a minimum of one systems course before 36 00:02:25,980 --> 00:02:26,830 this, basically. 37 00:02:26,830 --> 00:02:29,250 SAMAN AMARASINGHE: Probably two classes where they write 38 00:02:29,250 --> 00:02:29,970 very small programs-- 39 00:02:29,970 --> 00:02:31,660 PROFESSOR: Where they write a very small programs, so they 40 00:02:31,660 --> 00:02:34,560 have no sort of sense of writing scale. 41 00:02:34,560 --> 00:02:37,680 Moreover the class that we're teaching because it's on the 42 00:02:37,680 --> 00:02:42,920 topic of performance engineering, they are inclined 43 00:02:42,920 --> 00:02:45,540 to break all the rules in order to get the best 44 00:02:45,540 --> 00:02:47,570 performance. 45 00:02:47,570 --> 00:02:50,680 And that's part of our game but of course what we want is, 46 00:02:50,680 --> 00:02:53,653 we want the countervailing-- 47 00:02:56,300 --> 00:02:59,080 you still have to make things maintainable, you really 48 00:02:59,080 --> 00:03:02,990 should do it this way, yeah it's fine to violate some 49 00:03:02,990 --> 00:03:05,470 abstractions here and there, but then you should document 50 00:03:05,470 --> 00:03:07,970 that you're violating those abstractions and so forth. 51 00:03:07,970 --> 00:03:12,120 And that's what we're counting on you for, is to insert some 52 00:03:12,120 --> 00:03:14,350 experience and common sense. 53 00:03:14,350 --> 00:03:15,950 So, Saman, take it away. 54 00:03:15,950 --> 00:03:18,760 SAMAN AMARASINGHE: OK, good, so to add to what Charles 55 00:03:18,760 --> 00:03:23,160 said, when I was an undergrad, when I took something like a 56 00:03:23,160 --> 00:03:28,150 science class, or a physics class, or engineering class, 57 00:03:28,150 --> 00:03:30,540 most of the problems had kind of right answer and a wrong 58 00:03:30,540 --> 00:03:33,400 answer and then it's very easy to grade those things. 59 00:03:33,400 --> 00:03:38,350 But when I took something like an English class, all the 60 00:03:38,350 --> 00:03:41,530 papers I wrote, somebody really went through carefully 61 00:03:41,530 --> 00:03:45,250 and graded it and gave me lot of insightful comments so I 62 00:03:45,250 --> 00:03:49,590 can kind of develop my own style of writing. 63 00:03:49,590 --> 00:03:54,330 And what happens in software is the programming there's a 64 00:03:54,330 --> 00:03:58,030 style that each individual has to develop their style, but 65 00:03:58,030 --> 00:04:01,250 they can't develop a very haphazard style so there's a 66 00:04:01,250 --> 00:04:04,600 certain set of good styles, certain bad styles. 67 00:04:04,600 --> 00:04:09,020 And the problem that is in a large class we can grade for 68 00:04:09,020 --> 00:04:13,040 correctness very easily, we can also look at the programs 69 00:04:13,040 --> 00:04:15,130 and have a very fast thing, okay, saying, here are no 70 00:04:15,130 --> 00:04:18,480 comments, or your comment doesn't seem to be, it's too 71 00:04:18,480 --> 00:04:22,500 verbose, or some very high level feedback, but it's very 72 00:04:22,500 --> 00:04:26,060 hard to help somebody build their style. 73 00:04:26,060 --> 00:04:30,240 And so what you guys are coming into is to help us get 74 00:04:30,240 --> 00:04:33,540 these young students create their own style of 75 00:04:33,540 --> 00:04:34,420 programming. 76 00:04:34,420 --> 00:04:37,150 The nice thing about this class-- 77 00:04:37,150 --> 00:04:42,380 and also sometimes last year the masters found it a little 78 00:04:42,380 --> 00:04:45,930 bit hard was, we are giving them small amount of code. 79 00:04:45,930 --> 00:04:49,770 They are doing performance engineering on a maximum 80 00:04:49,770 --> 00:04:51,590 couple of hundred lines of code. 81 00:04:51,590 --> 00:04:53,780 There's no very complicated class structures or 82 00:04:53,780 --> 00:04:54,660 something like that. 83 00:04:54,660 --> 00:04:57,920 So we are not looking at the style and software engineering 84 00:04:57,920 --> 00:05:03,290 in the macro level, how to structure large classes but 85 00:05:03,290 --> 00:05:05,090 more at the micro level. 86 00:05:05,090 --> 00:05:08,070 In each method do they have right style? 87 00:05:08,070 --> 00:05:09,870 Are they is it clean? 88 00:05:09,870 --> 00:05:13,130 Are they commenting them properly, or 89 00:05:13,130 --> 00:05:14,000 can they do it better? 90 00:05:14,000 --> 00:05:16,590 So at that level at least the building blocks that they're-- 91 00:05:16,590 --> 00:05:20,020 as they go build a larger and larger program they can 92 00:05:20,020 --> 00:05:20,970 hopefully use. 93 00:05:20,970 --> 00:05:24,040 So that's what we're looking at, and it helps to instead of 94 00:05:24,040 --> 00:05:26,540 dumping you ten thousand lines of code, you only get a couple 95 00:05:26,540 --> 00:05:29,610 of hundred lines of code, so you can actually go through it 96 00:05:29,610 --> 00:05:32,120 a lot more carefully, and help them out. 97 00:05:32,120 --> 00:05:38,940 So this is starting with a crazy eye chart that is our 98 00:05:38,940 --> 00:05:42,210 new curriculum that we introduced in the department. 99 00:05:42,210 --> 00:05:46,670 So what you have is some early courses in here, these are 100 00:05:46,670 --> 00:05:48,590 basically very general math courses, early 101 00:05:48,590 --> 00:05:50,930 courses that do-- 102 00:05:50,930 --> 00:05:53,380 they probably write about ten lines of code type thing in 103 00:05:53,380 --> 00:05:56,570 these courses, and then we feed into these foundation 104 00:05:56,570 --> 00:06:04,463 courses and then after that we sit at, this says 197, 105 00:06:04,463 --> 00:06:06,650 actually what should be 172. 106 00:06:06,650 --> 00:06:14,340 We sit at that level, so we are sitting at that level, and 107 00:06:14,340 --> 00:06:17,340 then the prerequisite for people who are coming is that 108 00:06:17,340 --> 00:06:18,920 they're taking a computer architecture course so they 109 00:06:18,920 --> 00:06:20,620 know a little bit about architecture. 110 00:06:20,620 --> 00:06:23,620 They have taken this introductory software course, 111 00:06:23,620 --> 00:06:26,850 so they have written some Java programs, and so they know a 112 00:06:26,850 --> 00:06:28,930 little bit about software engineering from that course, 113 00:06:28,930 --> 00:06:30,970 and they have taken algorithms course, so they understand 114 00:06:30,970 --> 00:06:32,800 algorithms somewhat, so this is the background of the 115 00:06:32,800 --> 00:06:34,890 people are coming in. 116 00:06:34,890 --> 00:06:37,260 At the low end there might be some people who have only 117 00:06:37,260 --> 00:06:40,370 written couple of thousand lines of code in their lives, 118 00:06:40,370 --> 00:06:44,350 and there are other people who are, written half probably-- 119 00:06:44,350 --> 00:06:45,180 the Linux kernel. 120 00:06:45,180 --> 00:06:50,920 So there are kind of very diversified group of people. 121 00:06:50,920 --> 00:06:54,420 But there's some people who it's really new to them, and 122 00:06:54,420 --> 00:06:59,280 they don't even understand why you had to do good nice 123 00:06:59,280 --> 00:07:01,020 programming, why do you have to document these things. 124 00:07:01,020 --> 00:07:03,950 I mean, for them it's a very new concept, because they 125 00:07:03,950 --> 00:07:04,790 haven't seen that. 126 00:07:04,790 --> 00:07:07,050 So OK, if you're writing ten lines, OK, why do you need 127 00:07:07,050 --> 00:07:09,240 document that, I know how to do this. 128 00:07:09,240 --> 00:07:11,870 So part of that is this is, for a lot of them it's eye 129 00:07:11,870 --> 00:07:14,850 opening, and in last year also we talked to students, they 130 00:07:14,850 --> 00:07:18,075 actually gained a lot from talking to you guys. 131 00:07:18,075 --> 00:07:20,910 It's easy for us to tell them do it, a lot of them say OK, 132 00:07:20,910 --> 00:07:23,150 just to get the grade, I will do it, but after that I'm 133 00:07:23,150 --> 00:07:25,980 never going to do these things, and they just go off 134 00:07:25,980 --> 00:07:28,940 in very like, mad at us for asking them to do it, but when 135 00:07:28,940 --> 00:07:32,070 you guys say this is what happens in industry, there's a 136 00:07:32,070 --> 00:07:35,930 lot more impact on what they're going to do. 137 00:07:35,930 --> 00:07:39,240 And so I would go through very fast, so we have done case 138 00:07:39,240 --> 00:07:44,130 study on Matrix Multiply show doing how you can basically do 139 00:07:44,130 --> 00:07:46,580 things like algorithmic tricks, architecture tricks, 140 00:07:46,580 --> 00:07:47,800 and stuff like that get really good 141 00:07:47,800 --> 00:07:49,590 performance on Matrix Multiply. 142 00:07:49,590 --> 00:07:54,030 So we started with doing very object oriented, immutable 143 00:07:54,030 --> 00:07:58,570 type matrices, Matrix Multiply and then go 144 00:07:58,570 --> 00:08:00,050 down to doing blast. 145 00:08:00,050 --> 00:08:02,350 How much a performance gap do you think that has? 146 00:08:07,043 --> 00:08:10,138 AUDIENCE: It probably depends on how big the 147 00:08:10,138 --> 00:08:11,081 matrices are because-- 148 00:08:11,081 --> 00:08:12,880 SAMAN AMARASINGHE: Yeah it is 2k by a 2k 149 00:08:12,880 --> 00:08:17,030 matrix so it is, yeah-- 150 00:08:17,030 --> 00:08:18,710 So somebody said 200x. 151 00:08:18,710 --> 00:08:19,680 AUDIENCE: 10x 152 00:08:19,680 --> 00:08:21,590 SAMAN AMARASINGHE: Yeah 10x, so actually, in fact we've 153 00:08:21,590 --> 00:08:25,340 been-- since I started with the immutable matrix, very 154 00:08:25,340 --> 00:08:28,300 object oriented stuff like that, and then did all to 155 00:08:28,300 --> 00:08:31,690 optimize I could, I got 300,000x. 156 00:08:31,690 --> 00:08:36,799 So this is kind of extreme case, but it illustrates how 157 00:08:36,799 --> 00:08:39,659 much, kind of, performance sometimes is hidden in these 158 00:08:39,659 --> 00:08:40,870 applications. 159 00:08:40,870 --> 00:08:45,830 And then we talk bunch about, these are done lectures, talk 160 00:08:45,830 --> 00:08:49,960 about some very simple things in performance engineering, 161 00:08:49,960 --> 00:08:54,325 how to optimize loops, things like how to get the compiler 162 00:08:54,325 --> 00:08:55,590 to do certain things. 163 00:08:55,590 --> 00:08:58,150 Some basic facts, we have bunch of rules in there that 164 00:08:58,150 --> 00:08:59,900 we went through fast. 165 00:08:59,900 --> 00:09:03,460 And we are going to do introduce them to performance 166 00:09:03,460 --> 00:09:05,160 analysis for a lot of these people. 167 00:09:05,160 --> 00:09:07,080 First of all, they don't even know their code is running 168 00:09:07,080 --> 00:09:09,000 bad, because they don't know how to look at it other than 169 00:09:09,000 --> 00:09:10,305 getting one number then. 170 00:09:10,305 --> 00:09:12,470 Even if they know that their code is running bad, how do 171 00:09:12,470 --> 00:09:14,610 you go about figuring out what's going on? 172 00:09:14,610 --> 00:09:16,460 They know a little bit about GDB but they don't know 173 00:09:16,460 --> 00:09:18,150 anything about performance analysis, so we are 174 00:09:18,150 --> 00:09:21,280 introducing them to tools in here. 175 00:09:21,280 --> 00:09:24,310 And we are talking about C to Machine Code, lot of them are 176 00:09:24,310 --> 00:09:27,460 Java programmers, we already gave them a C primer, saying 177 00:09:27,460 --> 00:09:30,570 if you're Java what does C mean, kind of a thing. 178 00:09:30,570 --> 00:09:34,740 And I actually talk about computer architecture today 179 00:09:34,740 --> 00:09:38,780 and talk about the entire process they're going to use. 180 00:09:38,780 --> 00:09:41,110 They're using this Nehalem processor and all of the 181 00:09:41,110 --> 00:09:43,290 interesting things that happen inside the processor that they 182 00:09:43,290 --> 00:09:44,800 had to be aware of. 183 00:09:44,800 --> 00:09:46,770 And the same, maybe I will talk about the memory system 184 00:09:46,770 --> 00:09:52,510 optimization, and then Charles is going to talk about 185 00:09:52,510 --> 00:09:58,200 algorithms and data structures for caches in there and some 186 00:09:58,200 --> 00:10:00,370 about storage allocation. 187 00:10:00,370 --> 00:10:03,470 We'll have a bunch of lectures on parallelism that Charles is 188 00:10:03,470 --> 00:10:07,340 going to use Cilk Language to illustrate how to write 189 00:10:07,340 --> 00:10:08,660 parallel programs, that's what we are going 190 00:10:08,660 --> 00:10:10,810 to use in this class. 191 00:10:10,810 --> 00:10:13,660 And then more on parallelism, some things like data 192 00:10:13,660 --> 00:10:19,050 synchronization issues, dig deep into other performance 193 00:10:19,050 --> 00:10:21,270 issues in parallelism in there. 194 00:10:21,270 --> 00:10:24,160 And then since their final project is on Ray Tracing, 195 00:10:24,160 --> 00:10:28,130 we'll introduce them to a Ray Tracing primer, and see how 196 00:10:28,130 --> 00:10:29,970 Ray Tracing is done and so they can go 197 00:10:29,970 --> 00:10:32,510 into their final project. 198 00:10:32,510 --> 00:10:34,190 Then I'm going to talk a little bit about compile 199 00:10:34,190 --> 00:10:37,190 optimization, what compilers can do for you, and how to get 200 00:10:37,190 --> 00:10:39,500 compilers to do those things for you. 201 00:10:39,500 --> 00:10:42,160 And a little bit about distributed systems, so how 202 00:10:42,160 --> 00:10:44,100 can you scale out on this point? 203 00:10:44,100 --> 00:10:46,810 It's about getting a small piece of code to run fast, now 204 00:10:46,810 --> 00:10:51,640 how do we get millions of users go to this very large 205 00:10:51,640 --> 00:10:53,760 scale system, and get them to work, and 206 00:10:53,760 --> 00:10:55,850 what issues are involved. 207 00:10:55,850 --> 00:10:59,210 And then we are going to also have about three or four case 208 00:10:59,210 --> 00:11:00,620 studies sprinkled around. 209 00:11:00,620 --> 00:11:02,770 We'll get someone from University come and talk 210 00:11:02,770 --> 00:11:05,670 specific problems, OK, look I had this problem, and at the 211 00:11:05,670 --> 00:11:06,525 beginning it was bad. 212 00:11:06,525 --> 00:11:09,812 Here's how I went about figuring out why and here are 213 00:11:09,812 --> 00:11:13,230 the things I tried, these are things worked, these didn't 214 00:11:13,230 --> 00:11:14,490 work, and how we went go. 215 00:11:14,490 --> 00:11:18,060 So kind of a very hands on case studies about doing 216 00:11:18,060 --> 00:11:21,890 performance because what these people has to do is develop a 217 00:11:21,890 --> 00:11:22,690 methodology. 218 00:11:22,690 --> 00:11:25,020 Their own methodology of how to go about solving these 219 00:11:25,020 --> 00:11:27,030 problems, and then looking at these case studies will give 220 00:11:27,030 --> 00:11:30,180 them a feel how a very experienced person will go 221 00:11:30,180 --> 00:11:32,120 about looking at some of those problems. 222 00:11:32,120 --> 00:11:35,350 So these are the kind of lectures we 223 00:11:35,350 --> 00:11:37,280 are doing in a nutshell. 224 00:11:37,280 --> 00:11:40,180 So the projects we are doing. 225 00:11:40,180 --> 00:11:43,930 So students' mission, what we do is we write some 226 00:11:43,930 --> 00:11:47,730 inefficient piece of code, not that long, and we give them 227 00:11:47,730 --> 00:11:50,830 the specific, here so this is functionally correct but it 228 00:11:50,830 --> 00:11:52,220 runs darn slow. 229 00:11:52,220 --> 00:11:55,620 And what you can say is, OK, take advantage of right now, 230 00:11:55,620 --> 00:11:58,270 the first project is basically looking at algorithmic and 231 00:11:58,270 --> 00:11:59,870 data structure inefficiencies. 232 00:11:59,870 --> 00:12:03,230 So OK, trying to find better ways of doing that and change 233 00:12:03,230 --> 00:12:04,850 this program to run faster. 234 00:12:04,850 --> 00:12:06,820 So that's their thing, so they don't have deal with thousands 235 00:12:06,820 --> 00:12:07,570 of lines of code. 236 00:12:07,570 --> 00:12:11,945 Small program, it's correct, to run them faster, and this 237 00:12:11,945 --> 00:12:14,170 we'll also be asking them to write tests, so you can 238 00:12:14,170 --> 00:12:16,760 actually test their implementation, and make sure 239 00:12:16,760 --> 00:12:19,260 that implementation are also correct. 240 00:12:19,260 --> 00:12:21,560 And basically there's no right answer. 241 00:12:21,560 --> 00:12:23,980 This drives students crazy because they are like, "When 242 00:12:23,980 --> 00:12:26,750 am I done?" I'm like, "You're never done until the 243 00:12:26,750 --> 00:12:30,570 deadline," because you can keep doing more and more and 244 00:12:30,570 --> 00:12:34,340 you could keep increasing performance in there, and of 245 00:12:34,340 --> 00:12:37,900 course if you hit very marginal returns and at some 246 00:12:37,900 --> 00:12:42,180 point and you might decide, OK, that's good enough. 247 00:12:42,180 --> 00:12:45,840 And also more times the journey is as 248 00:12:45,840 --> 00:12:47,220 important as the outcome. 249 00:12:47,220 --> 00:12:49,140 So at the end of the day you can say I got it very fast, 250 00:12:49,140 --> 00:12:50,260 but how did you get there? 251 00:12:50,260 --> 00:12:51,470 What's the process you followed? 252 00:12:51,470 --> 00:12:54,370 Some of these programs are easy to get there, but if you 253 00:12:54,370 --> 00:12:58,550 haven't learned that process you can't scale it out. 254 00:12:58,550 --> 00:13:01,360 And so, a lot of times your part is to talk to them and 255 00:13:01,360 --> 00:13:03,550 say, "What did you do?" And say, "Okay look why did you 256 00:13:03,550 --> 00:13:06,820 skip that stage, why didn't you profile it?" And get them 257 00:13:06,820 --> 00:13:08,440 to get do that. 258 00:13:08,440 --> 00:13:09,870 And some will say, "Yeah, I just look at it, I realize 259 00:13:09,870 --> 00:13:11,880 what it is." Like, no just do something there might be 260 00:13:11,880 --> 00:13:13,720 something hidden in there, so get through the process, 261 00:13:13,720 --> 00:13:17,650 understand the process, that's the important. 262 00:13:17,650 --> 00:13:22,000 So the way the project works is, we give them a project, we 263 00:13:22,000 --> 00:13:27,040 start them the project, and there might be, some projects 264 00:13:27,040 --> 00:13:33,030 have two parts in there, and final and a project request 265 00:13:33,030 --> 00:13:36,580 design document for them to give us, saying what they 266 00:13:36,580 --> 00:13:39,490 figure out what's bad and what kind of optimizing they are 267 00:13:39,490 --> 00:13:42,440 thinking of doing in this project. 268 00:13:42,440 --> 00:13:44,470 And then we have a thing called a beta turn-in. 269 00:13:44,470 --> 00:13:48,190 They said OK look we ran this, we got the project and turned 270 00:13:48,190 --> 00:13:50,600 the product in, an we call it a beta, because 271 00:13:50,600 --> 00:13:52,050 I'll tell you why. 272 00:13:52,050 --> 00:13:54,880 And then what we do is, we run everybody's project against 273 00:13:54,880 --> 00:13:57,960 everybody, basically we run every project, and we figure 274 00:13:57,960 --> 00:14:00,790 out who got the fastest implementation. 275 00:14:00,790 --> 00:14:02,430 And we said OK, we announced this and said this is the 276 00:14:02,430 --> 00:14:06,430 fastest implementation, and then we figure out how off are 277 00:14:06,430 --> 00:14:09,550 you from the fastest, and we have a proportion of the grade 278 00:14:09,550 --> 00:14:10,990 that's basically computer graded. 279 00:14:10,990 --> 00:14:13,790 So we figure the fastest, you'll get 100% for something 280 00:14:13,790 --> 00:14:16,940 that on the other hand if you are 10x slower you get 10%. 281 00:14:16,940 --> 00:14:20,900 Except, the first time we tried, the fastest was 1,000x 282 00:14:20,900 --> 00:14:24,880 better than the slowest, so somebody got like 0.1%, that 283 00:14:24,880 --> 00:14:28,950 didn't work, so we are doing square root of the former so 284 00:14:28,950 --> 00:14:32,390 they'll be little bit more, in the 285 00:14:32,390 --> 00:14:34,570 somebody, got 1,000x there. 286 00:14:34,570 --> 00:14:37,570 So sometimes it's because somebody just missed one 287 00:14:37,570 --> 00:14:42,200 critical insight and so and also they might not have done 288 00:14:42,200 --> 00:14:44,280 the test properly and stuff like this, so we give them 289 00:14:44,280 --> 00:14:44,810 opportunity. 290 00:14:44,810 --> 00:14:48,200 And then after this beta turn-in you get this code, and 291 00:14:48,200 --> 00:14:52,340 the TAs get this code to run and do a very fast check over 292 00:14:52,340 --> 00:14:56,560 that and that, and then they are going to have a week to 293 00:14:56,560 --> 00:15:00,110 find a time with you, sit down for hour or 90 minutes, and go 294 00:15:00,110 --> 00:15:01,350 through this code. 295 00:15:01,350 --> 00:15:04,420 And then they will get all the feedback, the performance 296 00:15:04,420 --> 00:15:06,610 feedback, and they can talk to people and figure out what 297 00:15:06,610 --> 00:15:09,290 they missed and they get another chance to fix all 298 00:15:09,290 --> 00:15:11,770 those things, get the performance up to turn in, and 299 00:15:11,770 --> 00:15:13,550 there'll be another performance measurement, but 300 00:15:13,550 --> 00:15:16,120 now if they match up to that point, they can get a full 301 00:15:16,120 --> 00:15:20,880 amount so of course, if people exceed they don't get extra, 302 00:15:20,880 --> 00:15:23,600 because we want to limit the competition, but at least you 303 00:15:23,600 --> 00:15:25,980 get a chance to kind of match up the best code. 304 00:15:25,980 --> 00:15:30,290 So, what you have is this design review week, that they 305 00:15:30,290 --> 00:15:34,380 get to talk to you, and get feedback and, then after that, 306 00:15:34,380 --> 00:15:36,762 they fix everything up and then resubmit it. 307 00:15:36,762 --> 00:15:38,960 PROFESSOR: You should mention the beta tests. 308 00:15:38,960 --> 00:15:41,940 SAMAN AMARASINGHE: Yes, so what also we do in this is 309 00:15:41,940 --> 00:15:44,940 we're asking them also to create a test suite, and we 310 00:15:44,940 --> 00:15:48,050 are going to run everybody's programs against everybody's 311 00:15:48,050 --> 00:15:53,750 test suite, and also give them points on coverage of their 312 00:15:53,750 --> 00:15:57,910 suite, and also how well their program does 313 00:15:57,910 --> 00:15:58,760 against everybody else. 314 00:15:58,760 --> 00:16:03,380 So if somebody finds lot of bugs in other programs, or 315 00:16:03,380 --> 00:16:06,870 some there's a test that founds couple of bugs that 316 00:16:06,870 --> 00:16:09,740 nobody else found we will give a lot of points for that 317 00:16:09,740 --> 00:16:12,040 person, because that means they went and did a really 318 00:16:12,040 --> 00:16:13,480 good job in creating a test suite. 319 00:16:13,480 --> 00:16:16,330 So we are actually using that to basically emphasize on 320 00:16:16,330 --> 00:16:19,290 testing and testability issues in there. 321 00:16:19,290 --> 00:16:22,280 And then final, when you're turn in, then the TAs will, at 322 00:16:22,280 --> 00:16:25,770 that point, will grade for performance and also the 323 00:16:25,770 --> 00:16:26,760 coding style. 324 00:16:26,760 --> 00:16:29,680 So that time they will go to the code and assign the grade. 325 00:16:29,680 --> 00:16:32,310 And so if the students have listened to you, and carried 326 00:16:32,310 --> 00:16:35,100 out what you said, they should get really good grades on that 327 00:16:35,100 --> 00:16:35,970 part, and then they had to also provide 328 00:16:35,970 --> 00:16:38,080 a write up in that. 329 00:16:38,080 --> 00:16:42,110 So this is kind of the flow of the projects we have. 330 00:16:42,110 --> 00:16:46,580 And the project one is a simple algorithmic and data 331 00:16:46,580 --> 00:16:47,200 structure trick. 332 00:16:47,200 --> 00:16:52,160 So we did things like data rotator, bit flip counter, and 333 00:16:52,160 --> 00:16:54,800 this Pentominoes Puzzle that he's going to 334 00:16:54,800 --> 00:16:55,850 explain a little bit. 335 00:16:55,850 --> 00:16:58,720 So we give these things, that we have a pretty inefficient 336 00:16:58,720 --> 00:17:03,300 representation, where most of them has a much better bit 337 00:17:03,300 --> 00:17:06,400 representation, and you can do bit tricks to basically get 338 00:17:06,400 --> 00:17:07,060 good performance. 339 00:17:07,060 --> 00:17:09,829 So these are algorithmic and data structure representations 340 00:17:09,829 --> 00:17:11,670 that can have huge performance gains. 341 00:17:11,670 --> 00:17:14,430 So this is the first project and this is what next week 342 00:17:14,430 --> 00:17:16,819 you're going to get. 343 00:17:16,819 --> 00:17:20,119 So project two is more about memory system performance, 344 00:17:20,119 --> 00:17:22,660 things like image rotator and number sorting. 345 00:17:22,660 --> 00:17:25,359 We have two parts, the first part is we give them these 346 00:17:25,359 --> 00:17:28,650 problems, and they're supposed to run with different data set 347 00:17:28,650 --> 00:17:32,790 sizes, look at performance counter results and identify 348 00:17:32,790 --> 00:17:34,810 what's going on with these programs. 349 00:17:34,810 --> 00:17:37,830 So there's one thing that we'll give them bunch of 350 00:17:37,830 --> 00:17:40,700 source compiled, and they have to figure out which sort is 351 00:17:40,700 --> 00:17:45,000 which by looking at performance counters and 352 00:17:45,000 --> 00:17:45,690 different ones. 353 00:17:45,690 --> 00:17:48,180 So you had to identify, so basically give them idea to 354 00:17:48,180 --> 00:17:51,890 basically observe a program behavior, and then we ask them 355 00:17:51,890 --> 00:17:53,300 to go and fix some of the performance 356 00:17:53,300 --> 00:17:54,690 issues as a second part. 357 00:17:54,690 --> 00:17:57,690 So this is a lot about basically getting performance 358 00:17:57,690 --> 00:18:01,090 information, understanding a lot of hardware, what's going 359 00:18:01,090 --> 00:18:04,290 on and then going and doing some performance fixes. 360 00:18:04,290 --> 00:18:06,850 So there'll be two parts, to this project. 361 00:18:06,850 --> 00:18:10,090 And the project three is implementing 362 00:18:10,090 --> 00:18:12,970 efficient storage allocator. 363 00:18:12,970 --> 00:18:15,890 Most of these students find after they've done the Java 364 00:18:15,890 --> 00:18:18,830 and Python, they come thinking there are these objects 365 00:18:18,830 --> 00:18:21,850 running in memory, with a thing called pointer that 366 00:18:21,850 --> 00:18:26,360 points to, and to understand what a pointer is 367 00:18:26,360 --> 00:18:27,580 is sometimes hard. 368 00:18:27,580 --> 00:18:30,390 And this is an interesting example that they actually do 369 00:18:30,390 --> 00:18:32,390 a lot of pointer manipulations, and you have to 370 00:18:32,390 --> 00:18:34,420 get a lot of those things right and you have to have 371 00:18:34,420 --> 00:18:37,030 good discipline to do that, as well as getting some 372 00:18:37,030 --> 00:18:41,450 performance, so this is interesting project in there. 373 00:18:41,450 --> 00:18:44,520 Here you don't get too much of performance variance but 374 00:18:44,520 --> 00:18:48,030 students have to think very carefully about basically 375 00:18:48,030 --> 00:18:51,550 aliasing data structures and stuff like that. 376 00:18:51,550 --> 00:18:54,620 So getting some of this dirty little things you have to do, 377 00:18:54,620 --> 00:18:58,430 and learning how do it right. 378 00:18:58,430 --> 00:19:00,710 And then we go into parallel programming. 379 00:19:00,710 --> 00:19:05,050 So first part is introducing the concept of parallelism 380 00:19:05,050 --> 00:19:07,460 giving them some simple programs to basically 381 00:19:07,460 --> 00:19:14,310 parallelize, and then the second part is we give them 382 00:19:14,310 --> 00:19:17,650 insertion detection we're inserting a bunch of lines 383 00:19:17,650 --> 00:19:22,120 into a image and then they have to figure out when these 384 00:19:22,120 --> 00:19:27,570 lines move when they actually intersect, and so it's not 385 00:19:27,570 --> 00:19:31,360 embracing a parallel, you have to actually do by 386 00:19:31,360 --> 00:19:34,940 intersegmenting the data into regions and basically figuring 387 00:19:34,940 --> 00:19:36,550 out where communication is. 388 00:19:36,550 --> 00:19:38,600 So there's a lot of issue in there to get it done. 389 00:19:38,600 --> 00:19:41,640 It's a fairly complex program that they have to to deal with 390 00:19:41,640 --> 00:19:45,410 and so they're going to have to think through a lot of 391 00:19:45,410 --> 00:19:47,410 parallelism issues, synchronization issues, 392 00:19:47,410 --> 00:19:49,450 communication issues, all those things come 393 00:19:49,450 --> 00:19:52,650 into play in here. 394 00:19:52,650 --> 00:19:57,010 And then project 5 is just a problem set because we want to 395 00:19:57,010 --> 00:19:59,740 get to make sure that they understood some basic material 396 00:19:59,740 --> 00:20:01,530 we did, so you don't have to deal with that. 397 00:20:01,530 --> 00:20:03,220 We give them, actually, a write up they don't have to do 398 00:20:03,220 --> 00:20:07,510 any coding in there and they turn that in as a normal 399 00:20:07,510 --> 00:20:08,780 problem set. 400 00:20:08,780 --> 00:20:13,010 And the project six also you don't have time to critique 401 00:20:13,010 --> 00:20:16,970 that because it is delivered the last day of class, but if 402 00:20:16,970 --> 00:20:21,280 you're interested in basically giving them some feedback, or, 403 00:20:21,280 --> 00:20:24,110 just come in to the finals and see how they do. 404 00:20:24,110 --> 00:20:26,720 So there what they do is, this is a really fun project, we 405 00:20:26,720 --> 00:20:31,625 give them a very unoptimized ray tracer, and we okay here's 406 00:20:31,625 --> 00:20:34,620 an image that it can generate. 407 00:20:34,620 --> 00:20:37,210 If you generate image that looks the same to 408 00:20:37,210 --> 00:20:38,390 us, you'll be OK. 409 00:20:38,390 --> 00:20:40,660 So you can change the algorithms you are doing, come 410 00:20:40,660 --> 00:20:43,070 up with other things you can do, where you can still 411 00:20:43,070 --> 00:20:48,170 maintain the visual equivalence and then you can 412 00:20:48,170 --> 00:20:50,650 do that, you can optimize, you can parallelize, you can do 413 00:20:50,650 --> 00:20:54,220 anything you want and build a ray tracer. 414 00:20:54,220 --> 00:20:58,840 So they go and then we explain to them the basics of ray 415 00:20:58,840 --> 00:21:03,260 tracing and they do lot of cool things and a lot of these 416 00:21:03,260 --> 00:21:05,450 kids actually really change, think through algorithmic 417 00:21:05,450 --> 00:21:11,490 issues, even look at a lot of graphics and find different 418 00:21:11,490 --> 00:21:14,120 ways, or better ways of doing things, and come up with 419 00:21:14,120 --> 00:21:18,250 really cool tricks and then do really well. 420 00:21:18,250 --> 00:21:21,300 So for that we will invite you guys to come to the-- 421 00:21:21,300 --> 00:21:25,130 then we will have basically a bake off, everyone will come 422 00:21:25,130 --> 00:21:27,770 and figure out who has the fastest ray tracer, and they 423 00:21:27,770 --> 00:21:30,640 have the bragging rights, as well as the grade of having 424 00:21:30,640 --> 00:21:34,682 the fastest ray tracer, so-- 425 00:21:34,682 --> 00:21:36,110 PROFESSOR: I'm going to go through this. 426 00:21:36,110 --> 00:21:37,180 SAMAN AMARASINGHE: Okay, you go through-- we have the 427 00:21:37,180 --> 00:21:38,260 schedule here. 428 00:21:38,260 --> 00:21:43,740 So the most programs are done in C, and very little C++, not 429 00:21:43,740 --> 00:21:47,190 very complex C++ classes, or anything like that. 430 00:21:47,190 --> 00:21:50,990 We want them to be very close to the metal. 431 00:21:50,990 --> 00:21:54,180 They have been trained in a lot of abstract programming in 432 00:21:54,180 --> 00:21:56,370 Java, Python and stuff like that, now they're going to get 433 00:21:56,370 --> 00:21:59,440 to the metal, and understand things like pointers, malloc 434 00:21:59,440 --> 00:22:02,540 and free, native data types and stuff like that. 435 00:22:05,740 --> 00:22:09,410 We're not dealing with things like dealing in garbage 436 00:22:09,410 --> 00:22:12,660 collection and bound checks, and all the other things, so 437 00:22:12,660 --> 00:22:15,350 they're really seeing what's going close to the metal, and 438 00:22:15,350 --> 00:22:17,130 sometimes we are even encouraging to look at at a 439 00:22:17,130 --> 00:22:19,065 little bit of assembly work, that's not really required. 440 00:22:21,570 --> 00:22:23,710 AUDIENCE: Have these students had exposure to any kind of 441 00:22:23,710 --> 00:22:25,510 assembly language programing? 442 00:22:25,510 --> 00:22:29,260 SAMAN AMARASINGHE: In 004, they are using some assembly 443 00:22:29,260 --> 00:22:32,220 programming for in the architecture class, but I 444 00:22:32,220 --> 00:22:36,750 think it's a very simple, I think RISC machine inspection 445 00:22:36,750 --> 00:22:38,000 they're doing. 446 00:22:40,370 --> 00:22:46,570 And then we will have our course website as you go about 447 00:22:46,570 --> 00:22:49,820 you can look at what the course is doing and also if 448 00:22:49,820 --> 00:22:54,700 you change this F10 to a F09 you will see last year's code. 449 00:22:54,700 --> 00:22:58,530 So you can actually even see into the future what we have 450 00:22:58,530 --> 00:22:58,830 been doing. 451 00:22:58,830 --> 00:23:01,720 So if you want to kind of preface from the front. 452 00:23:01,720 --> 00:23:05,017 AUDIENCE: I took a look at this website and found that 453 00:23:05,017 --> 00:23:08,740 most of it was unavailable because of-- 454 00:23:08,740 --> 00:23:10,390 SAMAN AMARASINGHE: We should have Word readable we need to 455 00:23:10,390 --> 00:23:12,510 make it if it's not Word readable-- 456 00:23:12,510 --> 00:23:15,250 AUDIENCE: It says it's Word readable. 457 00:23:15,250 --> 00:23:15,660 To us. 458 00:23:15,660 --> 00:23:17,680 GUEST SPEAKER: Some of it is a lot of it was not I've said 459 00:23:17,680 --> 00:23:20,040 you need to, I mean it's all available for- 460 00:23:20,040 --> 00:23:20,340 AUDIENCE: Certificate? 461 00:23:20,340 --> 00:23:23,350 SAMAN AMARASINGHE: We will check that, because all this 462 00:23:23,350 --> 00:23:25,080 things that we have set up in the background to get 463 00:23:25,080 --> 00:23:27,140 everything Word-- we want to make everything Word readable, 464 00:23:27,140 --> 00:23:28,845 so we'll make sure that happens. 465 00:23:28,845 --> 00:23:35,530 So, OK, so that's all I have about the class and one thing 466 00:23:35,530 --> 00:23:38,920 interesting more so this projects, the best to worst 467 00:23:38,920 --> 00:23:41,230 can sometimes be 1,000x difference. 468 00:23:41,230 --> 00:23:43,900 So what that means, even for the people who are struggling, 469 00:23:43,900 --> 00:23:45,840 they can get something out of the class. 470 00:23:45,840 --> 00:23:48,870 But unlike other classes where you just read the limit and 471 00:23:48,870 --> 00:23:51,450 then you're bored, you can really keep pushing the limit, 472 00:23:51,450 --> 00:23:53,400 especially things like the final product, the people who 473 00:23:53,400 --> 00:23:56,280 did well really pushed the limits, they could have done 474 00:23:56,280 --> 00:23:58,450 that for a graphics class type thing. 475 00:23:58,450 --> 00:24:01,420 I mean they pushed algorithms changes, did amazing 476 00:24:01,420 --> 00:24:04,200 parallelization techniques, data partitioning, everything. 477 00:24:04,200 --> 00:24:06,590 And where some people just kind of stayed within that and 478 00:24:06,590 --> 00:24:10,430 did some small parallelization got some like low hanging 479 00:24:10,430 --> 00:24:11,680 fruit in there. 480 00:24:13,660 --> 00:24:15,630 I mean what we're trying to do is, computer science these 481 00:24:15,630 --> 00:24:18,310 days, we get some students, as I said, their first time 482 00:24:18,310 --> 00:24:20,650 they're coding anything more than ten lines and other 483 00:24:20,650 --> 00:24:27,130 people who are already a submitter for open source 484 00:24:27,130 --> 00:24:29,020 projects, who have written millions of lines of code, we 485 00:24:29,020 --> 00:24:30,100 have these two. 486 00:24:30,100 --> 00:24:32,700 And these codes, I think we are trying to cater to at 487 00:24:32,700 --> 00:24:36,770 every level, and keep everybody basically very 488 00:24:36,770 --> 00:24:38,680 motivated, and excited to be in there. 489 00:24:38,680 --> 00:24:41,540 And I think the last year it was a pretty good success. 490 00:24:41,540 --> 00:24:46,790 And they really enjoy meeting masters last year, and after 491 00:24:46,790 --> 00:24:48,760 we go to discussion we can talk about that a little bit. 492 00:24:48,760 --> 00:24:52,010 PROFESSOR: So we have two websites, as Saman mentioned 493 00:24:52,010 --> 00:24:55,570 before, so here they are, and then here's the schedule. 494 00:24:55,570 --> 00:25:00,510 So we'll run through this, in more detail for what is 495 00:25:00,510 --> 00:25:04,040 expected of you, in a moment, but basically there's four 496 00:25:04,040 --> 00:25:06,880 projects that's sort of are organized along here. 497 00:25:06,880 --> 00:25:08,660 Oops, that typo didn't get fixed. 498 00:25:08,660 --> 00:25:16,060 That's should be November 19 obviously there, instead of 499 00:25:16,060 --> 00:25:17,450 October 19 if you want to correct 500 00:25:17,450 --> 00:25:20,540 that on your calendars. 501 00:25:20,540 --> 00:25:25,700 OK, so in general it begins with an information session 502 00:25:25,700 --> 00:25:28,270 which you're allowed to attend in person but most people just 503 00:25:28,270 --> 00:25:30,700 dial in, it's more convenient. 504 00:25:30,700 --> 00:25:36,870 Then we will provide you with the beta code submitted by 505 00:25:36,870 --> 00:25:39,910 your four students and then you'll have two meetings that 506 00:25:39,910 --> 00:25:44,880 typically are 60 to 90 minutes with each of your two pairs. 507 00:25:44,880 --> 00:25:50,815 OK, so let's go through how this is working. 508 00:26:00,080 --> 00:26:05,440 So the first thing is just to make sure you folks recognize 509 00:26:05,440 --> 00:26:06,650 that you're making a commitment. 510 00:26:06,650 --> 00:26:12,490 It's very difficult for us, and it's even more difficult 511 00:26:12,490 --> 00:26:16,570 for the students, to cope with something that happens 512 00:26:16,570 --> 00:26:18,150 mid-term, OK? 513 00:26:18,150 --> 00:26:24,540 Where suddenly their master disappeared, or whatever, so 514 00:26:24,540 --> 00:26:28,460 we're very big on anti-flakiness, if you will. 515 00:26:28,460 --> 00:26:31,240 And so if you believe that there's going to be a problem 516 00:26:31,240 --> 00:26:34,650 please let us know as much in advance as you can. 517 00:26:34,650 --> 00:26:37,540 Sometimes things are unavoidable, they come up, we 518 00:26:37,540 --> 00:26:39,990 don't fault you for that or anything, OK? 519 00:26:39,990 --> 00:26:42,580 Just let us know, we'll try to deal with the situation. 520 00:26:42,580 --> 00:26:45,510 But for the most part we're really asking you to make a 521 00:26:45,510 --> 00:26:51,290 strong commitment to the class, and so if your 522 00:26:51,290 --> 00:26:56,510 situation is such that you're unsure it's best to talk with 523 00:26:56,510 --> 00:27:03,060 us or politely decline to participate, rather than 524 00:27:03,060 --> 00:27:05,650 putting on the rosy glasses, say, "Oh yeah I think I can do 525 00:27:05,650 --> 00:27:08,680 this, even though I know that I've got a major deadline that 526 00:27:08,680 --> 00:27:11,440 conflicts with one of these projects," or whatever. 527 00:27:11,440 --> 00:27:12,640 It's just really difficult on the 528 00:27:12,640 --> 00:27:16,030 students when things change. 529 00:27:16,030 --> 00:27:20,290 They are sort of going I don't know if you remember what it's 530 00:27:20,290 --> 00:27:23,230 like being in school as an undergraduate, but pretty much 531 00:27:23,230 --> 00:27:26,750 the students go sort of hand to mouth, in terms of like, 532 00:27:26,750 --> 00:27:29,300 they look and they say, OK I got this deadline this week I 533 00:27:29,300 --> 00:27:31,150 better work on that one. 534 00:27:31,150 --> 00:27:33,800 They don't really look ahead and so forth, and so it's up 535 00:27:33,800 --> 00:27:37,730 to us, to some extent, to recognize that they're in that 536 00:27:37,730 --> 00:27:41,010 mode and that we need to do things to make 537 00:27:41,010 --> 00:27:42,210 that easy for them. 538 00:27:42,210 --> 00:27:47,110 When they get sick or something mid-term it can 539 00:27:47,110 --> 00:27:50,410 really throw a student way off for the term, and so certainly 540 00:27:50,410 --> 00:27:58,100 when something happens to the staff, that sort of, at that 541 00:27:58,100 --> 00:28:06,435 caliber, can really knock them off their trajectory. 542 00:28:09,140 --> 00:28:13,260 The design and code reviews should normally be held at 543 00:28:13,260 --> 00:28:18,385 MIT, and the students will have some locations. 544 00:28:22,510 --> 00:28:26,660 If you are within walking distance to campus however, 545 00:28:26,660 --> 00:28:29,750 you may suggest an alternative place to meet, such as at your 546 00:28:29,750 --> 00:28:32,620 own workplace, if that's more convenient for you, OK? 547 00:28:32,620 --> 00:28:36,210 But if a student balks at doing that you shouldn't 548 00:28:36,210 --> 00:28:39,890 pressure them to accept. 549 00:28:39,890 --> 00:28:43,650 The content of the off campus meetings should be 550 00:28:43,650 --> 00:28:47,250 professional, it's strictly the review process, no lab 551 00:28:47,250 --> 00:28:53,680 tours, no free lunches, or dinners, or what have you, OK? 552 00:28:53,680 --> 00:28:56,860 And we'll talk a little bit more about that later. 553 00:28:56,860 --> 00:28:59,240 But the main thing about them is that they can be scheduled 554 00:28:59,240 --> 00:29:03,440 in the evening or you know whatever time you and your two 555 00:29:03,440 --> 00:29:06,680 students find convenient to get together, OK? 556 00:29:06,680 --> 00:29:11,280 There's no limits as to when you know what 557 00:29:11,280 --> 00:29:11,990 time those can be. 558 00:29:11,990 --> 00:29:15,940 They can be on the weekend they can be, whatever you can 559 00:29:15,940 --> 00:29:19,030 work out, very flexible. 560 00:29:19,030 --> 00:29:22,150 So here's the basic guidelines, each master is 561 00:29:22,150 --> 00:29:23,950 responsible for reviewing the code 562 00:29:23,950 --> 00:29:25,370 produced by four students. 563 00:29:28,420 --> 00:29:31,940 The students typically will work in teams of two or three 564 00:29:31,940 --> 00:29:34,150 for the projects, OK? 565 00:29:34,150 --> 00:29:38,590 So what you will have is your four students will be 566 00:29:38,590 --> 00:29:43,380 organized into two review groups of two students each, 567 00:29:43,380 --> 00:29:46,860 but none of the students will be on the same project. 568 00:29:46,860 --> 00:29:49,690 The reason for that is that we want to make sure that every 569 00:29:49,690 --> 00:29:53,860 student who goes to represent their project can represent 570 00:29:53,860 --> 00:29:56,790 the whole project. 571 00:29:56,790 --> 00:30:00,010 So they're responsible for the whole project. 572 00:30:00,010 --> 00:30:03,010 They don't have a buddy there on the same team, who can 573 00:30:03,010 --> 00:30:06,180 cover for them when you're asking them questions about 574 00:30:06,180 --> 00:30:06,970 their project. 575 00:30:06,970 --> 00:30:14,000 You ask them questions they've got to be able to answer about 576 00:30:14,000 --> 00:30:16,950 the whole thing, even if they didn't code 577 00:30:16,950 --> 00:30:17,810 every piece of that. 578 00:30:17,810 --> 00:30:19,830 We're encouraging them generally to do things like 579 00:30:19,830 --> 00:30:24,120 pair programming, so they really should understand 580 00:30:24,120 --> 00:30:30,500 what's going on throughout. 581 00:30:30,500 --> 00:30:33,390 The reason for having two groups, rather than meeting 582 00:30:33,390 --> 00:30:37,060 them individually, it turns out there's actually some good 583 00:30:37,060 --> 00:30:41,040 knowledge of one of them sort of being able to see what the 584 00:30:41,040 --> 00:30:42,830 other teams are doing. 585 00:30:42,830 --> 00:30:45,480 So generally they're not allowed to share their 586 00:30:45,480 --> 00:30:48,510 solutions, et cetera, with other teams, but in this 587 00:30:48,510 --> 00:30:50,400 meeting that's OK. 588 00:30:50,400 --> 00:30:53,190 The ideas and so forth can come but they shouldn't be 589 00:30:53,190 --> 00:30:55,540 making copies for each other of the code 590 00:30:55,540 --> 00:30:56,920 of the other group. 591 00:30:56,920 --> 00:30:59,730 But they can say, oh is that what the other team did, And 592 00:30:59,730 --> 00:31:03,710 so forth, and there can be some learning for them to 593 00:31:03,710 --> 00:31:04,925 submit the final project. 594 00:31:04,925 --> 00:31:07,650 SAMAN AMARASINGHE: Also last year, lot of masters very 595 00:31:07,650 --> 00:31:09,980 successfully used the other team members to kind critique 596 00:31:09,980 --> 00:31:11,370 each other. 597 00:31:11,370 --> 00:31:14,820 So showing something do you understand this, and then they 598 00:31:14,820 --> 00:31:17,140 can look at it and say, "Yeah, I can see what's going on, 599 00:31:17,140 --> 00:31:20,890 that's very useful," also when we go to masters we can talk 600 00:31:20,890 --> 00:31:22,420 about of that type of thing. 601 00:31:22,420 --> 00:31:24,550 PROFESSOR: Also things like documentation. 602 00:31:24,550 --> 00:31:28,260 You can look at the code there and ask the other one, "Do you 603 00:31:28,260 --> 00:31:31,180 understand what that documentation 604 00:31:31,180 --> 00:31:32,040 says?" And so forth. 605 00:31:32,040 --> 00:31:34,820 It turns out it's actually easier than that, because 606 00:31:34,820 --> 00:31:38,130 usually if the documentation is inadequate, the student 607 00:31:38,130 --> 00:31:39,790 himself has trouble remembering 608 00:31:39,790 --> 00:31:40,690 what they did, right? 609 00:31:40,690 --> 00:31:45,430 I mean you know how this works with code, so. 610 00:31:45,430 --> 00:31:49,120 So consequently you're responsible for generally for 611 00:31:49,120 --> 00:31:52,760 two review meetings for each of the four projects. 612 00:31:52,760 --> 00:31:55,970 Now as it turns out we'll assign things, we're going to 613 00:31:55,970 --> 00:31:58,680 have things like students dropping the class, and so 614 00:31:58,680 --> 00:32:02,150 there will be some minor reshuffling as we go on. 615 00:32:02,150 --> 00:32:05,900 Some of you may end up with only one team of two students. 616 00:32:05,900 --> 00:32:08,900 Some of you may find that you're reconstituting it. 617 00:32:08,900 --> 00:32:11,950 In some cases if we end up-- 618 00:32:11,950 --> 00:32:16,430 we may ask somebody, "Can you cover an extra team this time 619 00:32:16,430 --> 00:32:18,000 because somebody is going to be out of town?" Or 620 00:32:18,000 --> 00:32:18,830 something like that. 621 00:32:18,830 --> 00:32:21,270 So there may be some variations on this, but this 622 00:32:21,270 --> 00:32:23,600 is basically how things go. 623 00:32:26,200 --> 00:32:29,280 Now, one thing you should understand is that you are not 624 00:32:29,280 --> 00:32:32,780 going to grade the students. 625 00:32:32,780 --> 00:32:41,410 So, one of the things I learned long ago was that when 626 00:32:41,410 --> 00:32:44,490 you grade somebody they behave differently than if you don't. 627 00:32:47,030 --> 00:32:51,030 So you're not grading them that has a plus and a minus. 628 00:32:51,030 --> 00:32:55,610 The plus is that then this is really pure feedback for them. 629 00:32:55,610 --> 00:32:58,870 This is to help them, they know that you're supposed to 630 00:32:58,870 --> 00:32:59,360 have read it. 631 00:32:59,360 --> 00:33:03,000 The downside is some students will say, "Eh, then I don't 632 00:33:03,000 --> 00:33:06,970 need to listen, because nobody's holding a stick over 633 00:33:06,970 --> 00:33:12,860 my head." But the reason we do that is twofold. 634 00:33:12,860 --> 00:33:18,580 One is because we think that the quality of interaction is 635 00:33:18,580 --> 00:33:23,200 better, and the second reason is because you're not 636 00:33:23,200 --> 00:33:24,805 empowered by MIT to give grades. 637 00:33:27,830 --> 00:33:30,440 So you won't be grading them. 638 00:33:30,440 --> 00:33:32,600 You're also not responsible for the technical 639 00:33:32,600 --> 00:33:34,430 content of the class. 640 00:33:34,430 --> 00:33:36,490 We're going to be teaching stuff, hopefully which is 641 00:33:36,490 --> 00:33:41,040 sufficiently new, some of it, that some of you may not know 642 00:33:41,040 --> 00:33:43,400 all of what we're teaching with respect to parallelism, 643 00:33:43,400 --> 00:33:43,960 and so forth. 644 00:33:43,960 --> 00:33:49,590 Some of you may that's great, but that's not the role. 645 00:33:49,590 --> 00:33:51,850 We will take responsibility for teaching the 646 00:33:51,850 --> 00:33:53,410 content of the class. 647 00:33:53,410 --> 00:33:57,240 What we're really after here is for you to listen as an 648 00:33:57,240 --> 00:34:02,320 experienced program developer, and provide feedback to the 649 00:34:02,320 --> 00:34:06,640 students about software engineering. 650 00:34:06,640 --> 00:34:10,040 In other words explained to them what's going on. "Why 651 00:34:10,040 --> 00:34:12,219 didn't you write that in your documentation? 652 00:34:12,219 --> 00:34:14,350 How come all your variables have only one letter? 653 00:34:17,870 --> 00:34:20,600 Why is this stuff wrapping around three 654 00:34:20,600 --> 00:34:22,300 lines before you-- 655 00:34:22,300 --> 00:34:25,580 why no white space?" This kind of stuff. 656 00:34:25,580 --> 00:34:30,830 So, remember they're very smart students, but they're 657 00:34:30,830 --> 00:34:32,909 also very immature many of them. 658 00:34:32,909 --> 00:34:37,690 Some of them you'll discover are like way mature, but 659 00:34:37,690 --> 00:34:39,969 there's going to be some of them that are just absolutely 660 00:34:39,969 --> 00:34:42,500 this is new to them, and what they need is some 661 00:34:42,500 --> 00:34:45,550 encouragement and some suggestions as to what they 662 00:34:45,550 --> 00:34:48,739 can do to improve the quality of their code. 663 00:34:48,739 --> 00:34:53,499 And since we're not in a position to review it, why 664 00:34:53,499 --> 00:34:57,790 we're deputizing you as members of the MIT POSSE, is 665 00:34:57,790 --> 00:35:02,940 to deputize you to help them produce better quality code, 666 00:35:02,940 --> 00:35:05,500 which is not something that's easy for us either to give 667 00:35:05,500 --> 00:35:07,660 feedback on, or to grade. 668 00:35:07,660 --> 00:35:10,330 So hopefully when we are grading them in the end on 669 00:35:10,330 --> 00:35:13,900 their final submission and the quality of things, it reflects 670 00:35:13,900 --> 00:35:17,630 that they've learned something from you folks about 671 00:35:17,630 --> 00:35:18,940 producing good code. 672 00:35:23,290 --> 00:35:28,820 Also you want to be careful, this is one of the bugs I have 673 00:35:28,820 --> 00:35:31,950 when I interact with the students is, I tend to do most 674 00:35:31,950 --> 00:35:35,970 of the talking if I don't check myself. 675 00:35:35,970 --> 00:35:39,860 And one of the really good things is to have a guideline 676 00:35:39,860 --> 00:35:44,510 that they I don't know how many of you have teenage kids, 677 00:35:44,510 --> 00:35:53,240 and if you lecture them how quickly they learn right? 678 00:35:53,240 --> 00:35:54,840 No, they don't. 679 00:35:54,840 --> 00:35:58,650 So the goal here is to help them learn. 680 00:35:58,650 --> 00:36:01,860 And so lecturing usually doesn't work. 681 00:36:01,860 --> 00:36:03,850 What works generally is getting 682 00:36:03,850 --> 00:36:05,690 them to do the talking. 683 00:36:05,690 --> 00:36:08,110 And then it's great to pepper your 684 00:36:08,110 --> 00:36:11,470 interactions with anecdotes. 685 00:36:11,470 --> 00:36:14,530 I work with one person who did this, or early in my career I 686 00:36:14,530 --> 00:36:18,070 did this and here's how it blew up in my face, 687 00:36:18,070 --> 00:36:18,900 that kind of thing. 688 00:36:18,900 --> 00:36:23,370 Excellent to have anecdotes that you can give with real 689 00:36:23,370 --> 00:36:25,390 world experience. 690 00:36:25,390 --> 00:36:30,320 Why you might think it's like this, but in fact, if you do 691 00:36:30,320 --> 00:36:34,330 it that way you're headed down a very bad path. 692 00:36:34,330 --> 00:36:35,660 Let me tell you story about that. 693 00:36:35,660 --> 00:36:36,780 That's fine, OK. 694 00:36:36,780 --> 00:36:38,780 SAMAN AMARASINGHE: Or if you find a very stubborn person 695 00:36:38,780 --> 00:36:41,040 saying, "If you do that I won't hire you." 696 00:36:41,040 --> 00:36:43,460 PROFESSOR: That counts too. 697 00:36:43,460 --> 00:36:48,320 You would never get a job here if you coded like that. 698 00:36:48,320 --> 00:36:51,170 And in fact that's actually what Saman says, that's 699 00:36:51,170 --> 00:36:54,080 actually one of the big benefits of having folks from 700 00:36:54,080 --> 00:36:57,860 industry providing that feedback, because we can say 701 00:36:57,860 --> 00:37:03,430 that, if you do it like that you wouldn't be hired by XYZ 702 00:37:03,430 --> 00:37:04,640 corporation. 703 00:37:04,640 --> 00:37:08,330 You can say that, but if you say, I wouldn't hire you, if 704 00:37:08,330 --> 00:37:13,930 you did that, that has a, it's like, oh! 705 00:37:13,930 --> 00:37:16,250 It has a big impact, whereas when we do it it's 706 00:37:16,250 --> 00:37:17,790 like eh, you know. 707 00:37:17,790 --> 00:37:20,120 It's like what do they know? 708 00:37:23,630 --> 00:37:27,130 So the guideline is make them do a lot of the talking, so 709 00:37:27,130 --> 00:37:29,970 that they're trying to explain and you teach them a little 710 00:37:29,970 --> 00:37:31,820 bit what a design and code review is. 711 00:37:31,820 --> 00:37:34,310 Now, in fact what your review is, is both 712 00:37:34,310 --> 00:37:36,112 design and code review. 713 00:37:36,112 --> 00:37:38,725 SAMAN AMARASINGHE: To add to that, what we have told them 714 00:37:38,725 --> 00:37:42,320 is to prepare for what a filing statement type thing, 715 00:37:42,320 --> 00:37:45,540 to walk through and explain what they did to you guys. 716 00:37:45,540 --> 00:37:48,140 So they will come with some preparations stuff that they 717 00:37:48,140 --> 00:37:52,210 can do that, let them, both of them kind of do that, and then 718 00:37:52,210 --> 00:37:56,510 start them off the instructive part. 719 00:37:56,510 --> 00:37:57,760 PROFESSOR: And maybe they'll do that. 720 00:38:00,820 --> 00:38:03,170 But that's the goal is, you should say, "Look, when you 721 00:38:03,170 --> 00:38:07,090 come you should prepare something that brings me up to 722 00:38:07,090 --> 00:38:09,080 speed," and teach them a little bit about what's 723 00:38:09,080 --> 00:38:12,720 expected of them when you have a design or 724 00:38:12,720 --> 00:38:15,840 code review in industry. 725 00:38:15,840 --> 00:38:18,020 So for each of the projects, as we mentioned, there will be 726 00:38:18,020 --> 00:38:21,690 a short information session, typically by dialing 727 00:38:21,690 --> 00:38:23,580 conferencing, except for this one, which 728 00:38:23,580 --> 00:38:24,840 we'll do in a minute. 729 00:38:24,840 --> 00:38:28,860 After the students have submitted their beta releases 730 00:38:28,860 --> 00:38:32,670 we will get the code to you. 731 00:38:32,670 --> 00:38:35,030 Last year we had the students responsible for getting the 732 00:38:35,030 --> 00:38:40,980 code to the MIT POSSE, and that was basically a nightmare 733 00:38:40,980 --> 00:38:43,270 for everybody involved. 734 00:38:43,270 --> 00:38:47,970 So this time we will make sure that we get you their code, 735 00:38:47,970 --> 00:38:51,580 and I hope that way the unreliability-- 736 00:38:51,580 --> 00:38:54,020 I don't know if you remember but like, these are mostly 737 00:38:54,020 --> 00:38:57,100 like juniors and seniors, and when you're juniors and 738 00:38:57,100 --> 00:39:00,530 seniors you're not 100% reliable in everything you do 739 00:39:00,530 --> 00:39:04,990 and your word is your bond is not necessarily, oh I forgot 740 00:39:04,990 --> 00:39:07,260 that my word is my bond, kind of thing, right? 741 00:39:12,610 --> 00:39:16,400 So by us getting it to you, we'll remove one layer 742 00:39:16,400 --> 00:39:20,270 hopefully of flakiness. 743 00:39:20,270 --> 00:39:22,540 Next what you'll do is, you'll coordinate to meet with a 744 00:39:22,540 --> 00:39:26,190 mutually agreeable time, and then after the review you're 745 00:39:26,190 --> 00:39:28,430 going to provide us with a little bit of feed back, it 746 00:39:28,430 --> 00:39:33,560 doesn't have to be long, just a short email, not as a grade 747 00:39:33,560 --> 00:39:37,760 or evaluation, but to help us understand where the student's 748 00:39:37,760 --> 00:39:39,630 are doing well, and what they're missing. 749 00:39:39,630 --> 00:39:43,090 So what we may need to stress in class and so forth. 750 00:39:43,090 --> 00:39:45,340 And then, of course, after the review, they have the 751 00:39:45,340 --> 00:39:50,320 opportunity to make changes to their code before they submit 752 00:39:50,320 --> 00:39:52,100 their final revision. 753 00:39:52,100 --> 00:39:53,920 Now, that's a little bit different from industry where 754 00:39:53,920 --> 00:39:57,025 you would go through typically some kind of feature freeze, 755 00:39:57,025 --> 00:39:59,340 and code freeze, and so forth. 756 00:39:59,340 --> 00:40:04,070 Our beta is beta sort of in name, but not necessarily in 757 00:40:04,070 --> 00:40:07,190 all aspects, in that they can actually completely rewrite 758 00:40:07,190 --> 00:40:12,196 their code between the beta and the final version. 759 00:40:12,196 --> 00:40:15,240 SAMAN AMARASINGHE: So in your feedback you can also tell a 760 00:40:15,240 --> 00:40:17,410 little bit about in your interactions what worked and 761 00:40:17,410 --> 00:40:18,040 what didn't. 762 00:40:18,040 --> 00:40:20,510 This is the first time, as far as we know anybody's doing 763 00:40:20,510 --> 00:40:23,580 this kind of a thing anywhere. 764 00:40:23,580 --> 00:40:25,790 We are also developing a process so 765 00:40:25,790 --> 00:40:27,340 good practice is very-- 766 00:40:27,340 --> 00:40:30,020 PROFESSOR: And since your email will go to MIT POSSE and 767 00:40:30,020 --> 00:40:35,690 everybody will read it, what hopefully you can do is, some 768 00:40:35,690 --> 00:40:38,390 of the practices that you find useful, I tried this at work, 769 00:40:38,390 --> 00:40:40,100 I tried this, it didn't work. 770 00:40:40,100 --> 00:40:43,360 That starts to get spread out among you and is becomes very 771 00:40:43,360 --> 00:40:47,360 helpful for each other to say, "Oh, well that was an 772 00:40:47,360 --> 00:40:50,660 interesting idea let me try that." And so we hopefully 773 00:40:50,660 --> 00:40:53,933 we'll be able then to start compiling some best practices. 774 00:40:53,933 --> 00:40:56,520 AUDIENCE: Will we be identifying students by name 775 00:40:56,520 --> 00:40:57,888 in those broadcasting minutes? 776 00:40:57,888 --> 00:41:01,940 PROFESSOR: Yes, yes, in fact here's the thing is, what 777 00:41:01,940 --> 00:41:04,860 you're going to do is give, well it one, names the 778 00:41:04,860 --> 00:41:07,860 students who attended, and that helps us keep track of 779 00:41:07,860 --> 00:41:11,270 who's actually going to these and who isn't. 780 00:41:11,270 --> 00:41:14,330 The strengths and weaknesses in the student presentations. 781 00:41:14,330 --> 00:41:16,360 Some suggestions for improving the assignment. 782 00:41:16,360 --> 00:41:19,110 That's suggestions for us to improve the assignment for 783 00:41:19,110 --> 00:41:23,690 them, and any other comments. 784 00:41:23,690 --> 00:41:26,400 So we got some really good feedback last year that, "Hey 785 00:41:26,400 --> 00:41:31,310 the code you're handing out as the initial code that was 786 00:41:31,310 --> 00:41:35,940 really sloppily documented." Last year we were much more 787 00:41:35,940 --> 00:41:38,010 behind the eight-ball in terms of trying to do this. 788 00:41:38,010 --> 00:41:40,990 This time we've had more time, and in particular we also have 789 00:41:40,990 --> 00:41:43,790 some really outstanding TAs who've worked very hard on the 790 00:41:43,790 --> 00:41:45,290 software engineering of the project. 791 00:41:45,290 --> 00:41:47,730 So I think that we'll be better in that regard, this 792 00:41:47,730 --> 00:41:49,242 year, than we were last year. 793 00:41:49,242 --> 00:41:50,540 AUDIENCE: I just had a question 794 00:41:50,540 --> 00:41:52,210 PROFESSOR: Yeah, sure. 795 00:41:52,210 --> 00:41:54,880 AUDIENCE: You mentioned that they're going to give to you 796 00:41:54,880 --> 00:41:56,190 and you're going to pass the code out. 797 00:41:56,190 --> 00:41:56,495 PROFESSOR: Yes. 798 00:41:56,495 --> 00:41:59,246 AUDIENCE: Do you mean just the code or are you thinking 799 00:41:59,246 --> 00:42:02,226 structured more as a design review, they really will be 800 00:42:02,226 --> 00:42:05,022 talking about, a review package. 801 00:42:05,022 --> 00:42:07,260 It would be the code plus I don't know whether you're 802 00:42:07,260 --> 00:42:12,490 doing documentation generation or any sort of an intro or 803 00:42:12,490 --> 00:42:12,990 front matter? 804 00:42:12,990 --> 00:42:15,440 PROFESSOR: Yeah, so the question is whether in 805 00:42:15,440 --> 00:42:17,770 addition to the code there should there's going to be any 806 00:42:17,770 --> 00:42:21,190 other documentation, or package, or whatever. 807 00:42:21,190 --> 00:42:24,110 In fact, most of the final documentation is going to be 808 00:42:24,110 --> 00:42:28,350 for the final project and not for the beta, and so they 809 00:42:28,350 --> 00:42:31,270 should have things well documented within the code, 810 00:42:31,270 --> 00:42:34,090 for example about what their strategies are, and how they 811 00:42:34,090 --> 00:42:38,420 work, and so forth, but there won't generally be a write up. 812 00:42:38,420 --> 00:42:43,240 They should be providing you at your meeting with a brief 813 00:42:43,240 --> 00:42:46,030 outline of what's going on, and you can ask them after the 814 00:42:46,030 --> 00:42:49,170 first meeting for any other thing that you think would be 815 00:42:49,170 --> 00:42:53,300 helpful to them and to you in making the design meeting more 816 00:42:53,300 --> 00:42:54,960 productive. 817 00:42:54,960 --> 00:42:57,260 One of the things always in these things is how much do 818 00:42:57,260 --> 00:43:04,600 you require out of the students and at which time. 819 00:43:04,600 --> 00:43:09,110 They have in this project, we're on a relentless series 820 00:43:09,110 --> 00:43:10,520 of deadlines for them. 821 00:43:10,520 --> 00:43:13,850 And so we've tried to do as much as we can while being 822 00:43:13,850 --> 00:43:17,520 still relatively minimalistic in asking for too 823 00:43:17,520 --> 00:43:19,220 much stuff too early. 824 00:43:19,220 --> 00:43:22,020 And so it would be great if they had a complete package of 825 00:43:22,020 --> 00:43:25,180 here's what's going on, the fact is that they were up 826 00:43:25,180 --> 00:43:27,930 really late the night before trying to get this stuff done, 827 00:43:27,930 --> 00:43:32,400 they've also had to submit beta tests and so we decided 828 00:43:32,400 --> 00:43:35,310 that the final write up of how their project worked, et 829 00:43:35,310 --> 00:43:38,670 cetera, we would save for the final, and it won't be 830 00:43:38,670 --> 00:43:43,680 something, in English written like that will only be in the 831 00:43:43,680 --> 00:43:47,970 code, it won't be as a separate package. 832 00:43:47,970 --> 00:43:49,220 AUDIENCE: Right. 833 00:43:51,450 --> 00:43:54,260 PROFESSOR: Any other questions about that? 834 00:43:54,260 --> 00:43:59,245 OK, so one final word, relationships with students. 835 00:44:03,480 --> 00:44:07,590 So one of the things that MIT has, and many other places 836 00:44:07,590 --> 00:44:09,140 have, I'm sure that you're aware, that if you're in a 837 00:44:09,140 --> 00:44:11,940 power position with somebody, and this in particular applies 838 00:44:11,940 --> 00:44:16,000 at MIT with students, you must ensure that all your 839 00:44:16,000 --> 00:44:19,560 relationships are strictly educational. 840 00:44:19,560 --> 00:44:26,540 And what that means is like a, no romance, OK, duh. 841 00:44:26,540 --> 00:44:30,295 But it also means in this context, no recruiting, hints 842 00:44:30,295 --> 00:44:34,010 at job opportunities, offers of summer internships, lab 843 00:44:34,010 --> 00:44:37,540 tours, et cetera, free dinners, and so forth. 844 00:44:37,540 --> 00:44:40,420 Your job has to be completely educational. 845 00:44:40,420 --> 00:44:47,310 However when the term is over you're welcome to continue 846 00:44:47,310 --> 00:44:51,720 your friendship in a non-power relationship. 847 00:44:51,720 --> 00:44:55,810 There's no longer a power relationship you're welcome to 848 00:44:55,810 --> 00:44:58,790 start a romance with one of the students if you will, but 849 00:44:58,790 --> 00:45:03,450 in particular, allowed to seduce them to come to your 850 00:45:03,450 --> 00:45:10,320 company as a summer intern, or a job or what have you. 851 00:45:10,320 --> 00:45:16,360 So you're welcome to do that but not during the term, those 852 00:45:16,360 --> 00:45:18,830 sorts of things are absolutely off bounds. 853 00:45:18,830 --> 00:45:21,890 Now the students themselves may say, "Hey do you guys have 854 00:45:21,890 --> 00:45:24,890 summer internships, and so forth?" And it's up to you 855 00:45:24,890 --> 00:45:32,110 folks to draw the line and say something like, "Yes, we do, 856 00:45:32,110 --> 00:45:36,110 but if you're interested in that, we can talk about that 857 00:45:36,110 --> 00:45:39,060 after the term is over," for example. 858 00:45:39,060 --> 00:45:43,310 So, put them off in some way, and return the conversation to 859 00:45:43,310 --> 00:45:45,830 the educational mission for the term. 860 00:45:45,830 --> 00:45:46,566 Yeah? 861 00:45:46,566 --> 00:45:50,454 AUDIENCE: So what if the students do a good job? 862 00:45:55,320 --> 00:45:58,340 PROFESSOR: Yes, but then you run the risk of it being 863 00:45:58,340 --> 00:46:04,300 interpreted as a quid pro quo for employment, which is 864 00:46:04,300 --> 00:46:10,820 exactly the thing that we're trying to steer away from. 865 00:46:10,820 --> 00:46:13,950 They're smart MIT students, I think they'll figure out that 866 00:46:13,950 --> 00:46:16,850 if they're interested in a summer internship they should 867 00:46:16,850 --> 00:46:18,020 be impressing their mentor. 868 00:46:18,020 --> 00:46:22,065 Not all of them figure this out, by the way. 869 00:46:22,065 --> 00:46:23,518 AUDIENCE: So just to clarify. 870 00:46:23,518 --> 00:46:26,871 Just to clarify, it's okay to say, "If you write your code 871 00:46:26,871 --> 00:46:29,745 this way, I won't hire you." But it's not OK to say, "I 872 00:46:29,745 --> 00:46:33,580 wouldn't hire you." I just want to clarify. 873 00:46:33,580 --> 00:46:35,350 PROFESSOR: You'd say I wouldn't hire you, OK, my 874 00:46:35,350 --> 00:46:37,240 company would not hire somebody who wrote 875 00:46:37,240 --> 00:46:38,290 their code like this. 876 00:46:38,290 --> 00:46:39,220 You could say that. 877 00:46:39,220 --> 00:46:41,240 AUDIENCE: But it's not okay to say my company looks for 878 00:46:41,240 --> 00:46:44,920 people who would write code this way? 879 00:46:44,920 --> 00:46:47,370 PROFESSOR: No, I think that would be OK too. 880 00:46:47,370 --> 00:46:52,010 No, the issue is whether you personalize it, right? 881 00:46:52,010 --> 00:46:56,190 If you're interested in a summer job, I can get you a 882 00:46:56,190 --> 00:47:00,490 summer job, all you have to do is, dadadadadadadaaa, and now 883 00:47:00,490 --> 00:47:03,470 they feel like there's another master to serve. 884 00:47:03,470 --> 00:47:07,110 So what we want to avoid is having them feel like there's 885 00:47:07,110 --> 00:47:10,550 another obligation on top of the obligation 886 00:47:10,550 --> 00:47:12,020 they have to the class. 887 00:47:12,020 --> 00:47:16,120 They should not feel that in some ways they're obliged to 888 00:47:16,120 --> 00:47:20,080 do something for you in order, for example, to get a job. 889 00:47:20,080 --> 00:47:20,840 SAMAN AMARASINGHE: Or get a good grade. 890 00:47:20,840 --> 00:47:22,900 PROFESSOR: Or get a good grade, or-- 891 00:47:22,900 --> 00:47:25,562 SAMAN AMARASINGHE: If I say no to the summer job they're 892 00:47:25,562 --> 00:47:28,708 going to badmouth me and I will fail this class or get a 893 00:47:28,708 --> 00:47:29,676 bad grade, and then. 894 00:47:29,676 --> 00:47:33,420 So, that put them in a binding situation that they won't work 895 00:47:33,420 --> 00:47:34,955 for the class, but they'll feel obliged 896 00:47:34,955 --> 00:47:35,900 to something else. 897 00:47:35,900 --> 00:47:39,780 PROFESSOR: You're in a power situation, and you're in a 898 00:47:39,780 --> 00:47:43,250 situation where you must not let them have any sense that 899 00:47:43,250 --> 00:47:46,560 there's any power relationship there, if you 900 00:47:46,560 --> 00:47:47,450 will, in other words-- 901 00:47:47,450 --> 00:47:49,390 AUDIENCE: We shouldn't try to extort meals from them. 902 00:47:49,390 --> 00:47:52,300 PROFESSOR: For example. 903 00:47:52,300 --> 00:47:53,755 Exactly, exactly. 904 00:47:59,960 --> 00:48:02,890 Also if you feel anything awkward is developing, let 905 00:48:02,890 --> 00:48:06,340 Saman, or me, this is something for which the staff 906 00:48:06,340 --> 00:48:11,330 only email is better than probably the MIT POSSE one. 907 00:48:11,330 --> 00:48:12,910 SAMAN AMARASINGHE: Or even to us directly. 908 00:48:12,910 --> 00:48:15,690 PROFESSOR: Or even to us directly, although I actually 909 00:48:15,690 --> 00:48:18,600 think it better to go via the staff only. 910 00:48:18,600 --> 00:48:20,700 It really is much better to go get via staff only, because 911 00:48:20,700 --> 00:48:23,830 the TAs need to know what's going on with all the students 912 00:48:23,830 --> 00:48:25,180 in class as well. 913 00:48:25,180 --> 00:48:26,365 Question back here. 914 00:48:26,365 --> 00:48:28,457 AUDIENCE: Two logistical questions but I don't want to 915 00:48:28,457 --> 00:48:29,620 interrupt you before you finish. 916 00:48:29,620 --> 00:48:30,550 PROFESSOR: No, that's fine. 917 00:48:30,550 --> 00:48:33,130 AUDIENCE: Okay, it's not clear to me do we meet with the same 918 00:48:33,130 --> 00:48:35,080 four students throughout the term? 919 00:48:35,080 --> 00:48:36,320 PROFESSOR: If possible we will do that. 920 00:48:36,320 --> 00:48:40,210 Because otherwise what happens is, they hear it from one and 921 00:48:40,210 --> 00:48:42,000 then they go to another. 922 00:48:42,000 --> 00:48:45,150 So this way there's some amount of continuity, but that 923 00:48:45,150 --> 00:48:48,200 won't happen perfectly because students will drop and we'll 924 00:48:48,200 --> 00:48:50,890 have to reconstitute groups and things. 925 00:48:50,890 --> 00:48:53,365 GUEST SPEAKER: The winners get David and the losers get me. 926 00:48:53,365 --> 00:48:53,860 That's OK. 927 00:48:53,860 --> 00:48:55,850 I just wanted to be clear. 928 00:48:55,850 --> 00:49:00,156 Also you e-mail the code to us before we do 929 00:49:00,156 --> 00:49:01,120 the sit down session? 930 00:49:01,120 --> 00:49:01,602 PROFESSOR: Yes. 931 00:49:01,602 --> 00:49:03,530 GUEST SPEAKER: Are we expected to review it by ourselves 932 00:49:03,530 --> 00:49:04,494 beforehand? 933 00:49:04,494 --> 00:49:07,386 PROFESSOR: I think it helps to take a look at it, yes. 934 00:49:07,386 --> 00:49:09,314 GUEST SPEAKER: As opposed to walk in cold 935 00:49:09,314 --> 00:49:10,290 and doing just that. 936 00:49:10,290 --> 00:49:12,790 PROFESSOR: Yeah, yes, that's right, I mean I think you do a 937 00:49:12,790 --> 00:49:16,280 better job if you have looked at the code beforehand to see, 938 00:49:16,280 --> 00:49:19,550 oh my goodness this is, and take a few notes. 939 00:49:22,330 --> 00:49:25,380 But for this we're relying on you to use your best judgment 940 00:49:25,380 --> 00:49:26,600 for what's the best way of giving 941 00:49:26,600 --> 00:49:27,630 feedback to the students. 942 00:49:27,630 --> 00:49:30,400 But I think generally the reason we email it to you in 943 00:49:30,400 --> 00:49:34,900 advance is specifically so you have a chance to look it over. 944 00:49:34,900 --> 00:49:39,210 Once again we're not so concerned about whether the 945 00:49:39,210 --> 00:49:43,290 content of what they're learning in it as much as-- 946 00:49:43,290 --> 00:49:46,860 you look at it, it will take you two seconds as soon as you 947 00:49:46,860 --> 00:49:49,630 see one piece of undergraduate code, it'll take you two 948 00:49:49,630 --> 00:49:54,660 seconds to say, I don't care what this thing does this 949 00:49:54,660 --> 00:50:00,050 student needs to learn X. I mean you will see. 950 00:50:00,050 --> 00:50:02,400 Is that the feedback, from people who took this-- 951 00:50:02,400 --> 00:50:04,990 AUDIENCE: You'll know it when you see it. 952 00:50:04,990 --> 00:50:06,750 PROFESSOR: Any other comments from people 953 00:50:06,750 --> 00:50:08,260 from last year what-- 954 00:50:08,260 --> 00:50:10,950 AUDIENCE: Yeah, a couple comments. 955 00:50:10,950 --> 00:50:17,360 One very minor sort of procedural things. 956 00:50:17,360 --> 00:50:20,650 Personally, I found it a lot more useful to me to show up 957 00:50:20,650 --> 00:50:23,218 in person for the information sessions than do it by 958 00:50:23,218 --> 00:50:26,440 conference call, if for no other reason then a lot of 959 00:50:26,440 --> 00:50:29,526 people who called in had issues with voice quality. 960 00:50:29,526 --> 00:50:31,960 You know, just getting a good quality voice 961 00:50:31,960 --> 00:50:33,210 signal over the phone. 962 00:50:35,250 --> 00:50:38,570 Also I found it very helpful to have each student review 963 00:50:38,570 --> 00:50:39,280 the other one's code. 964 00:50:39,280 --> 00:50:42,289 So I would just do that to start with, just hand it to 965 00:50:42,289 --> 00:50:44,500 each other and here, what do you think? 966 00:50:44,500 --> 00:50:48,485 That also gives them some experience of actually doing a 967 00:50:48,485 --> 00:50:51,630 review, as well as being the person who's 968 00:50:51,630 --> 00:50:54,620 work is being reviewed. 969 00:50:54,620 --> 00:50:58,340 PROFESSOR: That's a great technique just because one of 970 00:50:58,340 --> 00:51:00,530 the things that you want them to do is empathize with the 971 00:51:00,530 --> 00:51:05,260 person who's going to read the code, and so, by putting them 972 00:51:05,260 --> 00:51:07,350 in the situation where they have to read somebody else's 973 00:51:07,350 --> 00:51:13,440 code they very quickly learn oh, this is, my goodness 974 00:51:13,440 --> 00:51:16,700 that's exactly what I did to the other one, so that is a 975 00:51:16,700 --> 00:51:17,950 great technique. 976 00:51:20,990 --> 00:51:22,458 AUDIENCE: The reference implementations are we going 977 00:51:22,458 --> 00:51:23,700 to get those-- 978 00:51:23,700 --> 00:51:24,220 PROFESSOR: Yes. 979 00:51:24,220 --> 00:51:24,980 AUDIENCE: Soon? 980 00:51:24,980 --> 00:51:25,280 Early? 981 00:51:25,280 --> 00:51:27,620 PROFESSOR: Yes, those generally we will be able to 982 00:51:27,620 --> 00:51:32,460 give you the reference implementations at the 983 00:51:32,460 --> 00:51:34,720 information session. 984 00:51:34,720 --> 00:51:36,730 Or actually, we should probably get it to them before 985 00:51:36,730 --> 00:51:37,650 the information session. 986 00:51:37,650 --> 00:51:38,860 AUDIENCE: I would suggest before the-- 987 00:51:38,860 --> 00:51:40,670 PROFESSOR: Yeah, let's get those make sure we get those 988 00:51:40,670 --> 00:51:42,890 to you before the information session. 989 00:51:42,890 --> 00:51:44,850 We'll get you a reference implementation at least a few 990 00:51:44,850 --> 00:51:45,680 days in advance. 991 00:51:45,680 --> 00:51:49,570 AUDIENCE: OK, also something that was a recurring issue 992 00:51:49,570 --> 00:51:51,890 last year regarding the reference supplementations 993 00:51:51,890 --> 00:51:53,140 which was the... 994 00:51:55,510 --> 00:51:56,840 there was some issues with some of the reference 995 00:51:56,840 --> 00:51:57,135 implementation-- 996 00:51:57,135 --> 00:51:57,430 [INTERPOSING VOICES] 997 00:51:57,430 --> 00:51:59,300 SAMAN AMARASINGHE: --software engineering. 998 00:51:59,300 --> 00:52:03,290 AUDIENCE: In particular things like functions that should 999 00:52:03,290 --> 00:52:07,156 have been local to a file they were not declared static or, 1000 00:52:07,156 --> 00:52:12,060 that kind of thing, or macros that should have been used or 1001 00:52:12,060 --> 00:52:13,974 that were used and shouldn't have been. 1002 00:52:17,240 --> 00:52:20,060 PROFESSOR: Last year we were running with a much larger 1003 00:52:20,060 --> 00:52:23,600 class than we expected, with no infrastructure to speak of, 1004 00:52:23,600 --> 00:52:30,000 and we had two TAs who were flat out, and so we definitely 1005 00:52:30,000 --> 00:52:30,440 cut corners. 1006 00:52:30,440 --> 00:52:33,570 This year the department has been good to us, we have four 1007 00:52:33,570 --> 00:52:39,480 TAs, and so I think that the quality is going to be higher. 1008 00:52:39,480 --> 00:52:48,230 That doesn't mean that the TAs are seasoned 20 years of 1009 00:52:48,230 --> 00:52:51,510 software development experience or more, either. 1010 00:52:51,510 --> 00:52:58,990 So they have some things to learn too, but already based 1011 00:52:58,990 --> 00:53:01,940 on the first project we're ahead of the game. 1012 00:53:01,940 --> 00:53:05,060 AUDIENCE: OK, also if from time to time one of us wants 1013 00:53:05,060 --> 00:53:06,690 to attend the class? 1014 00:53:06,690 --> 00:53:08,160 PROFESSOR: Feel free to attend the class. 1015 00:53:08,160 --> 00:53:09,090 AUDIENCE: OK, where's the schedule? 1016 00:53:09,090 --> 00:53:14,590 PROFESSOR: It is Tuesdays and Thursdays in 26-100 at-- 1017 00:53:14,590 --> 00:53:15,460 AUDIENCE: Is it on the website? 1018 00:53:15,460 --> 00:53:19,690 PROFESSOR: It's on the website at 2:30 to 4:00. 1019 00:53:19,690 --> 00:53:23,840 So Tuesdays and Thursdays 2:30 to 4:00, you're welcome to 1020 00:53:23,840 --> 00:53:27,380 come and learn all about performance engineering. 1021 00:53:27,380 --> 00:53:28,290 Reed, did you have a question? 1022 00:53:28,290 --> 00:53:30,820 AUDIENCE: No, I guess I was just going to say that in 1023 00:53:30,820 --> 00:53:36,085 regard to the feedback, we TAs here have got that. 1024 00:53:36,085 --> 00:53:38,530 SAMAN AMARASINGHE: During class last week most of the 1025 00:53:38,530 --> 00:53:41,219 TAs were students last year, so they aren't learning 1026 00:53:41,219 --> 00:53:42,469 anything new. 1027 00:53:44,398 --> 00:53:47,670 AUDIENCE: I'm sorry, where is the class? 1028 00:53:47,670 --> 00:53:50,160 PROFESSOR: It's in 26-100 1029 00:53:50,160 --> 00:53:52,164 AUDIENCE: So it's not here? 1030 00:53:52,164 --> 00:53:54,680 PROFESSOR: No. 1031 00:53:54,680 --> 00:53:58,000 So this is the situation, we outgrew our classroom which 1032 00:53:58,000 --> 00:54:07,010 seated 60, and we had 85 or 90 students, so they put us into 1033 00:54:07,010 --> 00:54:09,700 the next smaller classroom that we would fit into. 1034 00:54:09,700 --> 00:54:18,580 That was 26-100 which fits 500. 1035 00:54:18,580 --> 00:54:24,860 Then we found that in 26-100 you needed a microphone for 1036 00:54:24,860 --> 00:54:27,550 the students to hear you, even though we had them all crowded 1037 00:54:27,550 --> 00:54:30,230 into one quarter of the auditorium, you still then-- 1038 00:54:30,230 --> 00:54:32,420 just the structure of it-- you needed a microphone, so they 1039 00:54:32,420 --> 00:54:36,620 said, "That will be $85 a lecture." And you say, "What 1040 00:54:36,620 --> 00:54:38,766 do you mean $85 a lecture?" 1041 00:54:38,766 --> 00:54:41,100 SAMAN AMARASINGHE: Someone has to walk in just to turn on-- 1042 00:54:41,100 --> 00:54:43,510 PROFESSOR: To turn on thing thing. 1043 00:54:43,510 --> 00:54:46,010 So, anyway we sorted all this out OK, but it was sort of 1044 00:54:46,010 --> 00:54:51,750 funny that you're charging us for being in a room that we 1045 00:54:51,750 --> 00:54:52,940 have no choice as to be in? 1046 00:54:52,940 --> 00:54:54,864 Anyway it was very funny. 1047 00:54:54,864 --> 00:54:57,691 AUDIENCE: Are your lectures video taped are they 1048 00:54:57,691 --> 00:54:58,290 available-- 1049 00:54:58,290 --> 00:54:59,420 PROFESSOR: They are videotaped. 1050 00:54:59,420 --> 00:55:04,350 We are not planning to put them up quick because what 1051 00:55:04,350 --> 00:55:06,860 that does is discourages students from attending the 1052 00:55:06,860 --> 00:55:11,030 lectures, as you can imagine. 1053 00:55:11,030 --> 00:55:14,800 SAMAN AMARASINGHE: Mainly for OCW OpenCourseWare So they 1054 00:55:14,800 --> 00:55:16,640 basically they could go to OpenCourseWare they will 1055 00:55:16,640 --> 00:55:18,825 process it and they have to go through a lot of legal stuff 1056 00:55:18,825 --> 00:55:20,640 and make sure the named are right. 1057 00:55:20,640 --> 00:55:22,520 PROFESSOR: Are right and so forth, yeah. 1058 00:55:22,520 --> 00:55:25,870 There is a bunch of stuff there. 1059 00:55:25,870 --> 00:55:33,160 Good, so it says final words here but they aren't really 1060 00:55:33,160 --> 00:55:34,630 final, because we still have Eric to talk 1061 00:55:34,630 --> 00:55:40,130 about the first project. 1062 00:55:40,130 --> 00:55:44,350 But the feedback from the students last year was that 1063 00:55:44,350 --> 00:55:47,480 the MIT POSSE was one thing that made this one of their 1064 00:55:47,480 --> 00:55:48,410 favorite classes. 1065 00:55:48,410 --> 00:55:53,230 It was getting that kind of seasoned feedback in a very 1066 00:55:53,230 --> 00:56:03,520 small group setting when you look at the student faculty 1067 00:56:03,520 --> 00:56:06,730 ratio, that's one thing you're always battling. 1068 00:56:06,730 --> 00:56:11,570 especially at MIT, where we are in a very popular major, 1069 00:56:11,570 --> 00:56:16,060 and so the ability to recruit all you folks to help that 1070 00:56:16,060 --> 00:56:20,400 ratio in favor of the students is really very much 1071 00:56:20,400 --> 00:56:24,590 appreciated by students and by us, so enjoy the term. 1072 00:56:24,590 --> 00:56:28,000 This is really rewarding the people who have done it before 1073 00:56:28,000 --> 00:56:31,050 we had just tremendously positive feedback from them 1074 00:56:31,050 --> 00:56:36,080 about just how rewarding it was to work with these young 1075 00:56:36,080 --> 00:56:37,172 programmers. 1076 00:56:37,172 --> 00:56:39,806 SAMAN AMARASINGHE: They are very smart people, you can see 1077 00:56:39,806 --> 00:56:41,630 the changes, you will see the you impact on them. 1078 00:56:41,630 --> 00:56:44,501 You will see you're molding these people into better 1079 00:56:44,501 --> 00:56:47,310 programmers, so that's the fun part. 1080 00:56:47,310 --> 00:56:49,280 PROFESSOR: So Eric is now going to talk a little bit 1081 00:56:49,280 --> 00:56:53,550 about project one, and this is similar to what we will do, 1082 00:56:53,550 --> 00:56:55,750 although most of you will probably be on the phone 1083 00:56:55,750 --> 00:57:01,980 unless you heed Barry's advice, for the future one. 1084 00:57:01,980 --> 00:57:04,530 So I'll get out of your way. 1085 00:57:04,530 --> 00:57:08,760 ERIC: So the project one this is, I think, the one project 1086 00:57:08,760 --> 00:57:12,980 that was substantially different from last year. 1087 00:57:12,980 --> 00:57:17,110 So, the code for this project we, the TAs, 1088 00:57:17,110 --> 00:57:18,360 coded up this semester. 1089 00:57:23,020 --> 00:57:27,660 Did we give out the hand outs, Saman, or Charles? 1090 00:57:27,660 --> 00:57:29,800 Yeah so these are the-- 1091 00:57:29,800 --> 00:57:39,562 PROFESSOR: So this is the actual assignment and we'll 1092 00:57:39,562 --> 00:57:40,890 share this with you, plus the reference 1093 00:57:40,890 --> 00:57:42,490 implementation, I think. 1094 00:57:48,350 --> 00:57:51,620 ERIC: Well we'll send out the reference implementation 1095 00:57:51,620 --> 00:57:52,870 tonight then. 1096 00:57:55,100 --> 00:57:58,870 In fact, now people have already done their betas for 1097 00:57:58,870 --> 00:58:01,580 project one. 1098 00:58:01,580 --> 00:58:06,480 Project one has two parts, it's a part called Every Bit 1099 00:58:06,480 --> 00:58:09,890 Counts and a part called Tiling a Torus with 1100 00:58:09,890 --> 00:58:11,140 Pentominoes. 1101 00:58:12,950 --> 00:58:24,590 So the first part it's an abstract data types of 1102 00:58:24,590 --> 00:58:30,100 modeling and bit array, packed bit array and they are a given 1103 00:58:30,100 --> 00:58:33,990 a couple of tasks to do on long strings of bits. 1104 00:58:33,990 --> 00:58:37,330 So you might have eight million bits and there are two 1105 00:58:37,330 --> 00:58:41,890 functions to rotate the substring of the bits by some 1106 00:58:41,890 --> 00:58:45,940 amount to the left or right, and the other operation is to 1107 00:58:45,940 --> 00:58:48,910 count how many flipped bits there 1108 00:58:48,910 --> 00:58:50,710 are in a given substring. 1109 00:58:50,710 --> 00:58:56,040 So the specific interface for this, this an excerpt without 1110 00:58:56,040 --> 00:59:01,915 the comments from the header file of this C module. 1111 00:59:05,220 --> 00:59:09,730 There is a couple of accessors which accesses bits 1112 00:59:09,730 --> 00:59:15,700 individually those are not, well those accessors are 1113 00:59:15,700 --> 00:59:18,540 currently used to implement, in the reference 1114 00:59:18,540 --> 00:59:26,070 implementation, the rotate and count flips operations. 1115 00:59:26,070 --> 00:59:32,110 So what they will need to do is to go into the C module, 1116 00:59:32,110 --> 00:59:38,800 the implementation, and change these functions, to basically 1117 00:59:38,800 --> 00:59:41,980 be 10,000 times faster, or whatever, I can't remember 1118 00:59:41,980 --> 00:59:43,380 what they actually got. 1119 00:59:43,380 --> 00:59:46,730 In particular the rotate operation is incredibly slow, 1120 00:59:46,730 --> 00:59:49,040 there's one constraint for them and we're saying that, 1121 00:59:49,040 --> 00:59:52,090 well imagine that this is on the cell phone or something, 1122 00:59:52,090 --> 00:59:57,520 where you have a really big bit array, but you don't 1123 00:59:57,520 --> 01:00:03,060 really have very much more memory to consume beyond that 1124 01:00:03,060 --> 01:00:03,990 big bit array. 1125 01:00:03,990 --> 01:00:08,420 So we're asking them to only do this using a constant 1126 01:00:08,420 --> 01:00:11,700 amount of memory. 1127 01:00:11,700 --> 01:00:15,270 So that's the first problem with these two parts, the 1128 01:00:15,270 --> 01:00:18,500 rotate and the count flips. 1129 01:00:18,500 --> 01:00:23,010 Any problem, questions about that particular part? 1130 01:00:23,010 --> 01:00:25,836 Does it seem clear what? 1131 01:00:25,836 --> 01:00:27,410 AUDIENCE: What does the count flips do? 1132 01:00:27,410 --> 01:00:30,980 ERIC: Oh yeah, so I should've swap those two slides. 1133 01:00:30,980 --> 01:00:34,740 So, if you have a bit string, suppose nine bits or 1134 01:00:34,740 --> 01:00:38,470 something, 1, 2, 3, 4, 5, 6, 7, 8, that would have to be 8. 1135 01:00:43,780 --> 01:00:48,110 If this is the substring you want to count, then you count 1136 01:00:48,110 --> 01:00:54,090 transitions from zero to one, or one to zero. 1137 01:00:54,090 --> 01:00:58,790 And there's some new tricks you can do by for instance, 1138 01:00:58,790 --> 01:00:59,550 considering six-- 1139 01:00:59,550 --> 01:01:04,230 AUDIENCE: Count the number of runs, of consecutive value. 1140 01:01:04,230 --> 01:01:06,622 ERIC: Yeah, the number of runs. 1141 01:01:06,622 --> 01:01:07,945 AUDIENCE: Plus plus one-- 1142 01:01:07,945 --> 01:01:09,270 or minus one, yeah. 1143 01:01:09,270 --> 01:01:10,660 ERIC: That's right. 1144 01:01:10,660 --> 01:01:13,280 And you don't count the beginning or the end as a 1145 01:01:13,280 --> 01:01:17,160 transition, so in this particular substring there is 1146 01:01:17,160 --> 01:01:20,130 one there, one there, and one there. 1147 01:01:20,130 --> 01:01:22,670 And it's not a substrings, it's always substrings, it's 1148 01:01:22,670 --> 01:01:28,940 not the entire string, and you can see that for instance, you 1149 01:01:28,940 --> 01:01:32,260 give us an argument, the bit array and you say where the 1150 01:01:32,260 --> 01:01:39,580 starting offset and the number of bits that the substring 1151 01:01:39,580 --> 01:01:41,400 that the substring is and that's where the 1152 01:01:41,400 --> 01:01:42,300 operation is done. 1153 01:01:42,300 --> 01:01:47,100 So our testing routines will do lots of rotations in 1154 01:01:47,100 --> 01:01:50,184 different parts of that substring. 1155 01:01:50,184 --> 01:01:52,047 AUDIENCE: For the memory constraint, do you have a 1156 01:01:52,047 --> 01:01:55,500 fixed size that they're allowed to use or? 1157 01:01:55,500 --> 01:01:57,330 ERIC: We decided against the fixed size. 1158 01:01:57,330 --> 01:02:04,630 We just say don't use malloc, and you can allocate constant 1159 01:02:04,630 --> 01:02:08,100 amounts of memory, and the thing is if they choose to 1160 01:02:08,100 --> 01:02:13,720 have a 16 megabyte or four gigabyte lookup table then 1161 01:02:13,720 --> 01:02:15,110 their performance will suffer anyway. 1162 01:02:18,560 --> 01:02:19,696 So yep? 1163 01:02:19,696 --> 01:02:21,710 AUDIENCE: What is the computer architecture? 1164 01:02:21,710 --> 01:02:22,410 ERIC: What's that? 1165 01:02:22,410 --> 01:02:24,550 AUDIENCE: What is the computer architecture? 1166 01:02:24,550 --> 01:02:26,890 SAMAN AMARASINGHE: We are running on-- 1167 01:02:26,890 --> 01:02:34,510 we got this donation from both Intel and Dell, we have 16 1168 01:02:34,510 --> 01:02:40,390 machine-segments, each with two six core processors and 48 1169 01:02:40,390 --> 01:02:41,235 gigs of memory. 1170 01:02:41,235 --> 01:02:43,640 So they're doing it on 12 cores so it becomes 1171 01:02:43,640 --> 01:02:46,116 interesting, and you got a parallel 740 gigs, so we have 1172 01:02:46,116 --> 01:02:48,149 a lot of memory in these kinds of things and we'll be asking 1173 01:02:48,149 --> 01:02:48,695 them to run through that. 1174 01:02:48,695 --> 01:02:54,100 So these were the latest what's the word? 1175 01:02:54,100 --> 01:02:54,770 PROFESSOR: Core i7. 1176 01:02:54,770 --> 01:02:55,620 SAMAN AMARASINGHE: Core i7s. 1177 01:02:55,620 --> 01:02:56,830 PROFESSOR: Nehalem. 1178 01:02:56,830 --> 01:02:59,540 ERIC: For this first project, we're asking them specifically 1179 01:02:59,540 --> 01:03:02,810 not to parallelize. 1180 01:03:02,810 --> 01:03:05,140 AUDIENCE: It's all on Windows or Linux? 1181 01:03:05,140 --> 01:03:05,940 ERIC: Linux. 1182 01:03:05,940 --> 01:03:06,856 AUDIENCE: Linux? 1183 01:03:06,856 --> 01:03:09,610 ERIC: Yeah. 1184 01:03:09,610 --> 01:03:14,430 So the idea here is to exploit bit operation and in 1185 01:03:14,430 --> 01:03:15,710 particular in rotates. 1186 01:03:15,710 --> 01:03:18,220 The reference implementation does the really stupid thing 1187 01:03:18,220 --> 01:03:25,310 of you want sort of 4,000 bits to the right rotates, well 1188 01:03:25,310 --> 01:03:29,560 I'll do it one at a time, that's the reference 1189 01:03:29,560 --> 01:03:30,810 implementation. 1190 01:03:32,620 --> 01:03:36,020 But they're only allowed to us a constant amount of memory, 1191 01:03:36,020 --> 01:03:40,300 so there is certain amount of tricks you have to do to do it 1192 01:03:40,300 --> 01:03:42,946 in a more efficient way. 1193 01:03:42,946 --> 01:03:45,862 AUDIENCE: Do you stress in the course about portable data 1194 01:03:45,862 --> 01:03:48,535 code from one operating system to another, one 1195 01:03:48,535 --> 01:03:51,010 machine to the other. 1196 01:03:51,010 --> 01:03:54,550 PROFESSOR: This is where we want you to stress the 1197 01:03:54,550 --> 01:03:57,380 importance of it, because that's not something that 1198 01:03:57,380 --> 01:04:01,810 we're in a position to do or enforce, or what have you, OK? 1199 01:04:05,000 --> 01:04:08,140 We let them assume for this problem, for example, that the 1200 01:04:08,140 --> 01:04:10,000 machine they're working on is Little Endian. 1201 01:04:10,000 --> 01:04:13,250 We talked about the issue, but we did not insist that they 1202 01:04:13,250 --> 01:04:17,850 wrote code that would be that would port to a Big Endian 1203 01:04:17,850 --> 01:04:22,500 machine, because they're running on the Intel machines. 1204 01:04:22,500 --> 01:04:27,030 But this is exactly the kind of thing where code quality 1205 01:04:27,030 --> 01:04:32,630 would say, portability, maintainability, readability, 1206 01:04:32,630 --> 01:04:36,920 all these kinds of things, this is exactly the kind of 1207 01:04:36,920 --> 01:04:39,770 thing we want you to say. 1208 01:04:39,770 --> 01:04:42,700 You say "Hey, you did it like this, in fact did you know 1209 01:04:42,700 --> 01:04:46,930 that without sacrificing anything in performance, you 1210 01:04:46,930 --> 01:04:49,600 could have made it portable from one operating system to 1211 01:04:49,600 --> 01:04:54,450 another?" And then you could talk about those issues, and 1212 01:04:54,450 --> 01:04:57,500 that's absolutely super, to do that. 1213 01:04:57,500 --> 01:05:02,420 But we are not spending a lot of class time doing that, 1214 01:05:02,420 --> 01:05:04,770 we're really focusing on the performance engineering part 1215 01:05:04,770 --> 01:05:06,120 of the course. 1216 01:05:06,120 --> 01:05:07,910 ERIC: The reference implementation should be 1217 01:05:07,910 --> 01:05:15,940 portable, so this should be portable, although we did make 1218 01:05:15,940 --> 01:05:19,900 sure here, for instance, in the reference representation 1219 01:05:19,900 --> 01:05:23,620 of bit array here, that the order of the bits within each 1220 01:05:23,620 --> 01:05:26,320 bite happened to coincide with the low end 1221 01:05:26,320 --> 01:05:27,410 ideas of these machines. 1222 01:05:27,410 --> 01:05:31,550 So that if you happen to cast it to a 64-bit integer on each 1223 01:05:31,550 --> 01:05:35,900 of the bytes in the array then you would get something that 1224 01:05:35,900 --> 01:05:43,300 was easy to work with on a low end in architecture. 1225 01:05:43,300 --> 01:05:47,060 But the reference implementation is portable 1226 01:05:47,060 --> 01:05:50,940 itself, or should be, so tell us any kind of problems with 1227 01:05:50,940 --> 01:05:53,760 the reference implementation like that. 1228 01:05:53,760 --> 01:05:56,540 The next problem is based on the puzzle, 1229 01:05:56,540 --> 01:05:59,940 it's a puzzle solver. 1230 01:05:59,940 --> 01:06:02,920 It's this puzzle that I'd never heard of before. 1231 01:06:02,920 --> 01:06:07,040 Apparently, if you generalize dominoes you get Pentominoes 1232 01:06:07,040 --> 01:06:10,080 and the five end cases. 1233 01:06:10,080 --> 01:06:16,080 So there are this many configurations of dominoes 1234 01:06:16,080 --> 01:06:19,900 with five squares on them, I guess. 1235 01:06:19,900 --> 01:06:25,250 And the pentominoes puzzle is you're given an eight by eight 1236 01:06:25,250 --> 01:06:29,900 board with four squares crossed out, and now you're 1237 01:06:29,900 --> 01:06:35,210 supposed to arrange these so that the entire board is 1238 01:06:35,210 --> 01:06:37,040 filled up, and only-- 1239 01:06:37,040 --> 01:06:37,400 what's that? 1240 01:06:37,400 --> 01:06:38,540 SAMAN AMARASINGHE: You can do flips of these-- 1241 01:06:38,540 --> 01:06:39,280 ERIC: Oh, right. 1242 01:06:39,280 --> 01:06:41,220 You can do flips, you rotate 1243 01:06:41,220 --> 01:06:43,620 SAMAN AMARASINGHE: And they will dissipate 1244 01:06:43,620 --> 01:06:45,600 and all those things. 1245 01:06:45,600 --> 01:06:50,860 ERIC: Right so the task is find all the solutions, 1246 01:06:50,860 --> 01:06:56,800 although I believe in our reference implementation that 1247 01:06:56,800 --> 01:07:01,660 was too fast, so we decided to generalize the puzzle to the 1248 01:07:01,660 --> 01:07:08,140 toroidal case, where the board wraps around the edges, just 1249 01:07:08,140 --> 01:07:10,460 to make it take a little longer, to do. 1250 01:07:10,460 --> 01:07:12,300 PROFESSOR: Like space boards right? 1251 01:07:12,300 --> 01:07:14,953 You go off the right edge you come in the left edge. 1252 01:07:14,953 --> 01:07:16,336 AUDIENCE: Top and bottom also? 1253 01:07:16,336 --> 01:07:18,650 PROFESSOR: Top and bottom also, yeah. 1254 01:07:18,650 --> 01:07:21,190 ERIC: So these two are both examples of 1255 01:07:21,190 --> 01:07:23,060 solutions to this puzzle. 1256 01:07:23,060 --> 01:07:23,680 AUDIENCE: I've got a question here. 1257 01:07:23,680 --> 01:07:24,840 ERIC: Yep. 1258 01:07:24,840 --> 01:07:26,260 AUDIENCE: Are you allowed to put the empty space 1259 01:07:26,260 --> 01:07:27,320 where ever you want? 1260 01:07:27,320 --> 01:07:33,020 ERIC: Well, that's the input to the solver. 1261 01:07:33,020 --> 01:07:34,880 SAMAN AMARASINGHE: Given these empty spaces-- 1262 01:07:34,880 --> 01:07:36,740 AUDIENCE: OK, and then it fills in the rest. 1263 01:07:36,740 --> 01:07:37,205 ERIC: That's right. 1264 01:07:37,205 --> 01:07:38,920 Of course you can put empty spaces so 1265 01:07:38,920 --> 01:07:40,300 that it can't solved. 1266 01:07:40,300 --> 01:07:42,175 And then they have to correctly determine that 1267 01:07:42,175 --> 01:07:42,490 there's no answer. 1268 01:07:42,490 --> 01:07:43,340 PROFESSOR: That there's no answer. 1269 01:07:43,340 --> 01:07:44,850 AUDIENCE: Right. 1270 01:07:44,850 --> 01:07:48,310 ERIC: And, also I believe the reference solution takes days, 1271 01:07:48,310 --> 01:07:49,910 for certain. 1272 01:07:49,910 --> 01:07:54,220 To find all the solutions of certain configurations of the 1273 01:07:54,220 --> 01:07:56,520 initial four dots. 1274 01:07:56,520 --> 01:07:59,720 So there's an option to the program we give them, to just 1275 01:07:59,720 --> 01:08:01,390 find the first 2,000 or something. 1276 01:08:01,390 --> 01:08:03,440 PROFESSOR: So once again you can see this is conducive to 1277 01:08:03,440 --> 01:08:07,460 bit tricks, where you represent the board as a 1278 01:08:07,460 --> 01:08:13,330 64-bit word and then do masking operations, and so 1279 01:08:13,330 --> 01:08:15,800 forth, to determine whether a piece fits 1280 01:08:15,800 --> 01:08:18,060 and do clever shifting. 1281 01:08:18,060 --> 01:08:21,680 It's easy to shift a piece down one row, where you're 1282 01:08:21,680 --> 01:08:27,029 trying it out, because that's just a shift by eight, but how 1283 01:08:27,029 --> 01:08:32,109 do you shift it horizontally, to come around on the other-- 1284 01:08:32,109 --> 01:08:35,200 So they have to do some shifting, some masking-- 1285 01:08:35,200 --> 01:08:40,859 So anyway, the first project is all about thinking about 1286 01:08:40,859 --> 01:08:43,074 bit representations of things, and so forth. 1287 01:08:43,074 --> 01:08:45,609 ERIC: In fact, we give them a solver that we don't really-- 1288 01:08:45,609 --> 01:08:50,960 well, a searcher, routine to search the space of possible 1289 01:08:50,960 --> 01:08:54,160 solutions, that we don't really expect them to change, 1290 01:08:54,160 --> 01:08:56,810 but they can change it if they want to do. 1291 01:08:56,810 --> 01:09:04,689 So, the interface here is basically a board data 1292 01:09:04,689 --> 01:09:08,340 structure that they're free to change the internal 1293 01:09:08,340 --> 01:09:09,689 representations of. 1294 01:09:09,689 --> 01:09:13,510 Or did we somehow prohibit that due to testing? 1295 01:09:13,510 --> 01:09:13,810 No? 1296 01:09:13,810 --> 01:09:16,649 No, no, no, that's the whole point, right. 1297 01:09:16,649 --> 01:09:23,149 So again, you have this basic accessor for use by the 1298 01:09:23,149 --> 01:09:25,330 testing routines. 1299 01:09:25,330 --> 01:09:29,410 But then what you really need to, well, you need to change 1300 01:09:29,410 --> 01:09:33,000 basically the entire implementation of all of this, 1301 01:09:33,000 --> 01:09:35,180 if you're changing the representation of the board, 1302 01:09:35,180 --> 01:09:37,770 for instance. 1303 01:09:37,770 --> 01:09:42,220 But this is the function that should be running faster after 1304 01:09:42,220 --> 01:09:45,899 you're done, so I guess that comment is misleading. 1305 01:09:45,899 --> 01:09:49,189 This is the function that is supposed to run a lot faster 1306 01:09:49,189 --> 01:09:50,850 when you're done. 1307 01:09:50,850 --> 01:09:56,470 There is actual comments in the header file. 1308 01:09:56,470 --> 01:09:58,050 So right, you give it a function 1309 01:09:58,050 --> 01:10:00,688 pointer to a call back. 1310 01:10:00,688 --> 01:10:03,650 PROFESSOR: Now, one sort of standard thing we decided 1311 01:10:03,650 --> 01:10:08,060 we're doing is, we're not trying to write both 32 and 1312 01:10:08,060 --> 01:10:12,070 64-bit code in the classroom, we're just going to do 64-bit. 1313 01:10:12,070 --> 01:10:14,880 So just one more level. 1314 01:10:14,880 --> 01:10:17,850 In practice you would want to have stuff that runs both on 1315 01:10:17,850 --> 01:10:22,190 32 and 64, but for the most part it's fine if they just 1316 01:10:22,190 --> 01:10:25,622 have it running on 64-bit. 1317 01:10:25,622 --> 01:10:30,460 ERIC: Right, so these by the way are the initial four 1318 01:10:30,460 --> 01:10:32,510 points that are the input to the puzzle. 1319 01:10:35,860 --> 01:10:40,660 I believe that's the problem set one. 1320 01:10:40,660 --> 01:10:41,810 Questions about, yeah? 1321 01:10:41,810 --> 01:10:45,802 AUDIENCE: Can students submit more than one answer? 1322 01:10:45,802 --> 01:10:46,800 PROFESSOR: No. 1323 01:10:46,800 --> 01:10:51,570 Nope, they got to decide what they're doing. 1324 01:10:51,570 --> 01:10:53,046 AUDIENCE: I guess I have a question about the answer. 1325 01:10:53,046 --> 01:10:53,538 ERIC: Yeah. 1326 01:10:53,538 --> 01:10:56,711 AUDIENCE: Is an answer that is probabilistically correct, I 1327 01:10:56,711 --> 01:11:00,740 mean like, it will sometimes when you test it, you have it 1328 01:11:00,740 --> 01:11:03,390 pass all the test cases, but mine isn't guaranteed to 1329 01:11:03,390 --> 01:11:05,544 necessarily always solve all test cases is that OK? 1330 01:11:05,544 --> 01:11:08,890 ERIC: If they can conceal that to us, then I think they-- 1331 01:11:08,890 --> 01:11:12,060 PROFESSOR: They deserve credit. 1332 01:11:12,060 --> 01:11:16,210 ERIC: Keep in mind that the other half of the problem set 1333 01:11:16,210 --> 01:11:20,160 is to write test cases that will catch as many obscure 1334 01:11:20,160 --> 01:11:24,100 bugs in the other students' code as possible. 1335 01:11:24,100 --> 01:11:27,270 So they run the risk of competing against-- 1336 01:11:27,270 --> 01:11:29,000 PROFESSOR: They lose extra points if they don't pass 1337 01:11:29,000 --> 01:11:32,240 their own tests. 1338 01:11:32,240 --> 01:11:33,853 AUDIENCE: They each need to write some tests 1339 01:11:33,853 --> 01:11:35,016 that will be as-- 1340 01:11:35,016 --> 01:11:36,125 PROFESSOR: Yeah, so then they-- 1341 01:11:36,125 --> 01:11:36,680 AUDIENCE: They exercise somebody else's. 1342 01:11:36,680 --> 01:11:38,160 PROFESSOR: --to somebody else's, yeah. 1343 01:11:38,160 --> 01:11:39,500 SAMAN AMARASINGHE: We are running all the tests against 1344 01:11:39,500 --> 01:11:40,850 everybody else. 1345 01:11:40,850 --> 01:11:42,935 PROFESSOR: And then for the final version we give them the 1346 01:11:42,935 --> 01:11:47,720 full regression suite of the whole class, so they have very 1347 01:11:47,720 --> 01:11:49,960 good confidence, and we good confidence that they're 1348 01:11:49,960 --> 01:11:53,080 handing in something that is correct. 1349 01:11:55,740 --> 01:11:58,450 SAMAN AMARASINGHE: OK, so you want to open up for-- 1350 01:11:58,450 --> 01:12:00,521 PROFESSOR: For questions or comments. 1351 01:12:00,521 --> 01:12:02,030 SAMAN AMARASINGHE: Especially, I won't even mind the people 1352 01:12:02,030 --> 01:12:06,965 who did it last time, last time to provide some of your 1353 01:12:06,965 --> 01:12:08,945 feedback on how we can... 1354 01:12:08,945 --> 01:12:10,430 [BUZZING NOISE] 1355 01:12:10,430 --> 01:12:11,420 PROFESSOR: Don't want to do that? 1356 01:12:11,420 --> 01:12:13,895 SAMAN AMARASINGHE: Yeah, 1357 01:12:13,895 --> 01:12:16,370 PROFESSOR: I was trying to turn on the lights. 1358 01:12:16,370 --> 01:12:18,450 Do we have more lights we can turn on? 1359 01:12:23,813 --> 01:12:25,801 SAMAN AMARASINGHE: Also, if you could turn these on, too? 1360 01:12:25,801 --> 01:12:27,300 PROFESSOR: Good. 1361 01:12:27,300 --> 01:12:30,598 Yeah, so comments? 1362 01:12:30,598 --> 01:12:33,574 AUDIENCE: I want to say that's why I was a master last year, 1363 01:12:33,574 --> 01:12:36,054 and I had a great time, but I figured I'd stay-- 1364 01:12:36,054 --> 01:12:37,542 [INTERPOSING VOICES] 1365 01:12:37,542 --> 01:12:38,534 PROFESSOR: Yeah, could you stand up so 1366 01:12:38,534 --> 01:12:39,526 people can hear you? 1367 01:12:39,526 --> 01:12:40,022 Thanks. 1368 01:12:40,022 --> 01:12:41,014 SAMAN AMARASINGHE: Give him a mic. 1369 01:12:41,014 --> 01:12:43,990 Give him a mic because I think it'll be good-- 1370 01:12:43,990 --> 01:12:46,966 PROFESSOR: It'll be good to have these-- yeah. 1371 01:12:46,966 --> 01:12:47,462 All right? 1372 01:12:47,462 --> 01:12:47,958 AUDIENCE: All right. 1373 01:12:47,958 --> 01:12:49,470 Thank you. 1374 01:12:49,470 --> 01:12:55,070 So the first thing I found really helpful was to take the 1375 01:12:55,070 --> 01:12:57,060 reference solution and actually diff what the student 1376 01:12:57,060 --> 01:12:59,130 provide because they often just provided a solution, and 1377 01:12:59,130 --> 01:13:00,800 if you don't know what they started from, it was hard to 1378 01:13:00,800 --> 01:13:01,760 tell what they'd actually done. 1379 01:13:01,760 --> 01:13:04,760 So diffing the two, that was a good place to start. 1380 01:13:04,760 --> 01:13:08,190 And then I found incredibly helpful just to spend 15 or 20 1381 01:13:08,190 --> 01:13:11,430 minutes prior to actually meeting with them, looking at 1382 01:13:11,430 --> 01:13:13,610 the code and writing like two or three or four things to 1383 01:13:13,610 --> 01:13:14,745 talk to them about. 1384 01:13:14,745 --> 01:13:17,090 And it might sound like it's going to be highfalutin and 1385 01:13:17,090 --> 01:13:20,020 stuff, but it was like they're using their returning function 1386 01:13:20,020 --> 01:13:23,120 pointers to local variables, stuff like that. 1387 01:13:23,120 --> 01:13:27,590 It was really like what the hell the makefiles were doing, 1388 01:13:27,590 --> 01:13:30,010 for example, is something that I think they really 1389 01:13:30,010 --> 01:13:32,960 appreciated me telling them that didn't get 1390 01:13:32,960 --> 01:13:34,210 talked about in class. 1391 01:13:36,230 --> 01:13:37,800 Especially once I got a good rapport with them, they just 1392 01:13:37,800 --> 01:13:40,380 ask questions, and I spent the whole time answering more 1393 01:13:40,380 --> 01:13:41,920 practical stuff about the problem. 1394 01:13:41,920 --> 01:13:44,780 We had a good discussion, so that's what I would suggest. 1395 01:13:44,780 --> 01:13:48,360 PROFESSOR: Thank you, that's great feedback. 1396 01:13:48,360 --> 01:13:50,730 Yeah, as I say, don't underestimate-- 1397 01:13:50,730 --> 01:13:57,170 I mean, most people learn the kinds of things you're saying, 1398 01:13:57,170 --> 01:14:02,480 but somebody told them that, hey, these are practices that 1399 01:14:02,480 --> 01:14:05,760 really don't make sense in a real software system. 1400 01:14:05,760 --> 01:14:08,210 AUDIENCE: People were, by the time we got to the projects, 1401 01:14:08,210 --> 01:14:11,605 your standard pattern was highly representative, a bunch 1402 01:14:11,605 --> 01:14:16,500 of flags you want to encode in a bunch of fields, right? 1403 01:14:16,500 --> 01:14:18,215 And you've seen them a couple times, it's 1404 01:14:18,215 --> 01:14:19,930 just a standard pattern. 1405 01:14:19,930 --> 01:14:21,530 PROFESSOR: Yeah, so one of the things you'll find in this 1406 01:14:21,530 --> 01:14:23,960 first one is that they're very confused about the difference 1407 01:14:23,960 --> 01:14:29,070 between unsigned and signed, and how shifts work, and what 1408 01:14:29,070 --> 01:14:33,870 happens when, you know, how come I shifted this thing left 1409 01:14:33,870 --> 01:14:36,320 33 bits and I got a zero. 1410 01:14:36,320 --> 01:14:37,310 Why? 1411 01:14:37,310 --> 01:14:41,350 I thought I was shifting a 64-bit value, but in fact, 1412 01:14:41,350 --> 01:14:45,760 they hadn't done 1LL, they just did 1. 1413 01:14:45,760 --> 01:14:50,840 And so there are things like that, where they don't-- 1414 01:14:50,840 --> 01:14:58,100 very low hanging fruit, if you will, to talk about. 1415 01:14:58,100 --> 01:15:00,580 AUDIENCE: Did you tell them about valgrind by the way? 1416 01:15:00,580 --> 01:15:03,133 Like, why would programs crash when they said they spent a 1417 01:15:03,133 --> 01:15:06,213 huge amount of time debugging these crazy C programs when 1418 01:15:06,213 --> 01:15:08,460 they're not used to the compiler not protecting them. 1419 01:15:08,460 --> 01:15:10,250 PROFESSOR: Actually, that's a good point because we were 1420 01:15:10,250 --> 01:15:15,490 going to try to introduce-- maybe we should do that as 1421 01:15:15,490 --> 01:15:17,540 part of the next lecture, spend a little 1422 01:15:17,540 --> 01:15:20,238 bit of time on valgrind. 1423 01:15:20,238 --> 01:15:22,470 SAMAN AMARASINGHE: Yeah. 1424 01:15:22,470 --> 01:15:24,060 PROFESSOR: Because the memory checker there is really a 1425 01:15:24,060 --> 01:15:28,150 pretty useful tool for them to get correct code. 1426 01:15:28,150 --> 01:15:28,960 AUDIENCE: I second that. 1427 01:15:28,960 --> 01:15:30,520 That thing has saved my butt so many times. 1428 01:15:30,520 --> 01:15:31,770 PROFESSOR: So many times, exactly. 1429 01:15:35,102 --> 01:15:39,635 AUDIENCE: I've heard that, but more low-hanging fruit for 1430 01:15:39,635 --> 01:15:48,520 valgrind is to always compile a -w all to just cache all the 1431 01:15:48,520 --> 01:15:50,750 warning and declare all warnings as errors, and it 1432 01:15:50,750 --> 01:15:52,970 just makes-- 1433 01:15:52,970 --> 01:15:54,315 PROFESSOR: I think that we have that as a 1434 01:15:54,315 --> 01:15:55,230 default in our makefile. 1435 01:15:55,230 --> 01:15:55,680 Is that right? 1436 01:15:55,680 --> 01:15:56,960 ERIC: At least for the first project. 1437 01:15:56,960 --> 01:15:59,350 PROFESSOR: The first project? 1438 01:15:59,350 --> 01:16:03,390 AUDIENCE: I think they should understand that in industry 1439 01:16:03,390 --> 01:16:08,775 practice, if you don't do that, you're a schmuck. 1440 01:16:08,775 --> 01:16:10,200 PROFESSOR: Right. 1441 01:16:10,200 --> 01:16:11,625 Yep. 1442 01:16:11,625 --> 01:16:16,170 Good, so that's good, and why, in particular, the valgrind-- 1443 01:16:16,170 --> 01:16:19,710 we discussed that last year, and really actually, the 1444 01:16:19,710 --> 01:16:22,440 upcoming lecture's exactly when we should do that. 1445 01:16:22,440 --> 01:16:24,570 SAMAN AMARASINGHE: Because there's also another tool 1446 01:16:24,570 --> 01:16:26,240 called Dr. Memory. 1447 01:16:26,240 --> 01:16:27,960 PROFESSOR: OK, which makes sense, yeah. 1448 01:16:32,800 --> 01:16:34,920 AUDIENCE: One issue that I experienced a little last year 1449 01:16:34,920 --> 01:16:37,122 was that people they specifically intend to write a 1450 01:16:37,122 --> 01:16:38,680 little test for their code. 1451 01:16:38,680 --> 01:16:41,526 They've mostly relied on a few runs by hand, then they wrote 1452 01:16:41,526 --> 01:16:45,110 a progression producing things that they ran earlier. 1453 01:16:45,110 --> 01:16:47,340 I guess that now you're actually encouraging them to 1454 01:16:47,340 --> 01:16:47,590 actually have a test suite. 1455 01:16:47,590 --> 01:16:50,840 PROFESSOR: Yeah, well, now they get points off if they 1456 01:16:50,840 --> 01:16:53,960 didn't write enough test that somebody else's code passed it 1457 01:16:53,960 --> 01:16:54,960 that had a bug. 1458 01:16:54,960 --> 01:16:58,740 AUDIENCE: And in this case the testing run will be as far as 1459 01:16:58,740 --> 01:17:02,830 the first turn in, and then the second turn in is just you 1460 01:17:02,830 --> 01:17:05,170 have a version to run against and then 1461 01:17:05,170 --> 01:17:06,010 just need to optimize. 1462 01:17:06,010 --> 01:17:07,080 PROFESSOR: Right, that's right. 1463 01:17:07,080 --> 01:17:09,132 SAMAN AMARASINGHE: So first, about the actual tests they 1464 01:17:09,132 --> 01:17:12,100 have write a lot of tests because that will help, and 1465 01:17:12,100 --> 01:17:14,200 the second, then you give them all the tests. 1466 01:17:14,200 --> 01:17:17,280 So they will have a lot of test suite to run and then of 1467 01:17:17,280 --> 01:17:19,726 course we have a lot of number of points we'll deduct of you 1468 01:17:19,726 --> 01:17:21,210 actually fail those test. 1469 01:17:21,210 --> 01:17:22,100 Because they have no excuse. 1470 01:17:22,100 --> 01:17:23,610 PROFESSOR: There's no excuse at that point, it's just a 1471 01:17:23,610 --> 01:17:24,340 question of having-- 1472 01:17:24,340 --> 01:17:28,360 AUDIENCE: What performance and measurement tools are you 1473 01:17:28,360 --> 01:17:30,160 going to be using this year? 1474 01:17:30,160 --> 01:17:32,955 SAMAN AMARASINGHE: So, right now, we are going to give them 1475 01:17:32,955 --> 01:17:38,690 perf because what we found was, the process of ECUT is so 1476 01:17:38,690 --> 01:17:42,090 new a lot of performance tools don't have-- like OperaFile 1477 01:17:42,090 --> 01:17:45,200 didn't work, because they haven't been ported properly. 1478 01:17:45,200 --> 01:17:46,500 There's no port for it yet. 1479 01:17:46,500 --> 01:17:49,680 So perf we are going to use, and we are thinking of giving 1480 01:17:49,680 --> 01:17:51,830 them gprof in there. 1481 01:17:51,830 --> 01:17:56,585 And then last year gave them couple Pintools we didn't ask 1482 01:17:56,585 --> 01:17:58,880 them to write anything but for example, account number 1483 01:17:58,880 --> 01:18:01,980 instruction or couple of tools they do that. 1484 01:18:01,980 --> 01:18:05,140 Those are main tools you get, and also we need to go to 1485 01:18:05,140 --> 01:18:09,400 Cilk, you'll do a bunch of Cilk tools in there. 1486 01:18:09,400 --> 01:18:12,170 AUDIENCE: Everyone last year, they were given VTune, I think 1487 01:18:12,170 --> 01:18:15,500 it was, it was too hard for them to use. 1488 01:18:15,500 --> 01:18:17,610 PROFESSOR: Yeah, that was too hard for them to use because 1489 01:18:17,610 --> 01:18:21,040 they have to use the machines remotely, and VTune and is an 1490 01:18:21,040 --> 01:18:24,750 interactive tool, and so that just made it very complicated 1491 01:18:24,750 --> 01:18:25,460 to do things. 1492 01:18:25,460 --> 01:18:28,820 So instead we're going to go with a something that has 1493 01:18:28,820 --> 01:18:33,030 textual output, and is easy, therefore, to run from command 1494 01:18:33,030 --> 01:18:37,155 line and has all the advantages of running things 1495 01:18:37,155 --> 01:18:39,160 that you get when you run things from command line. 1496 01:18:42,888 --> 01:18:47,050 AUDIENCE: So a logistical question so, meeting on MIT is 1497 01:18:47,050 --> 01:18:49,920 fine, but where are there designated places to meet? 1498 01:18:49,920 --> 01:18:51,870 SAMAN AMARASINGHE: We will work with student to find 1499 01:18:51,870 --> 01:18:54,070 places for them. 1500 01:18:54,070 --> 01:18:57,790 For example, there are locations for PSS students to 1501 01:18:57,790 --> 01:19:00,090 meet, and we are going to get them arranged. 1502 01:19:00,090 --> 01:19:04,840 So if in the organizing you guys can create probably an 1503 01:19:04,840 --> 01:19:05,995 online scheduling something. 1504 01:19:05,995 --> 01:19:07,230 What's that website? 1505 01:19:07,230 --> 01:19:08,650 Online is, online scheduling is-- 1506 01:19:08,650 --> 01:19:09,150 PROFESSOR: Doodle. 1507 01:19:09,150 --> 01:19:10,650 SAMAN AMARASINGHE: Doodle, Doodle or something like that, 1508 01:19:10,650 --> 01:19:14,900 and get their times and then they'll work with us to figure 1509 01:19:14,900 --> 01:19:17,910 out the place to meet, and then they can send it out. 1510 01:19:17,910 --> 01:19:22,810 One thing we will have to do is, between four students, 1511 01:19:22,810 --> 01:19:26,240 because every project we are chaining the pairings, so 1512 01:19:26,240 --> 01:19:29,200 sometimes we might end up in a way that, two of your students 1513 01:19:29,200 --> 01:19:32,170 are paired together, and then we will tell you don't put 1514 01:19:32,170 --> 01:19:34,100 them together in the same group, you'll basically have 1515 01:19:34,100 --> 01:19:36,010 to mix them in the other way. 1516 01:19:36,010 --> 01:19:38,860 If they are not in any kind of a pairing, then you can 1517 01:19:38,860 --> 01:19:40,870 organize the four in any way you want. 1518 01:19:43,610 --> 01:19:45,920 PROFESSOR: Actually I don't even want of the four of them, 1519 01:19:45,920 --> 01:19:47,710 I don't even want us pairing. 1520 01:19:47,710 --> 01:19:48,630 That shouldn't be. 1521 01:19:48,630 --> 01:19:50,470 But we'll see what happens. 1522 01:19:50,470 --> 01:19:52,650 Barry? 1523 01:19:52,650 --> 01:19:56,756 AUDIENCE: Last year of course was in classroom downstairs 1524 01:19:56,756 --> 01:20:00,018 and I just met them just outside the classroom. 1525 01:20:00,018 --> 01:20:01,220 There's plenty of little space. 1526 01:20:01,220 --> 01:20:03,450 PROFESSOR: Also the first floor of STATA, I mean we've 1527 01:20:03,450 --> 01:20:05,090 had a lot of people just using the first 1528 01:20:05,090 --> 01:20:06,820 floor of this building. 1529 01:20:06,820 --> 01:20:12,140 There's lots of cafe and place there, and so forth, to sit 1530 01:20:12,140 --> 01:20:17,130 there, get a coffee, and so forth. 1531 01:20:17,130 --> 01:20:19,330 So some people just did something that informally, 1532 01:20:19,330 --> 01:20:22,960 other people wanted a more quiet private place to talk. 1533 01:20:22,960 --> 01:20:28,460 And I think that we'll help the students facilitate that. 1534 01:20:28,460 --> 01:20:31,340 SAMAN AMARASINGHE: And the key thing is, especially if any 1535 01:20:31,340 --> 01:20:34,150 students are flaking out, for example, doesn't answer your 1536 01:20:34,150 --> 01:20:37,590 email, or missed the meeting, or something like that, or 1537 01:20:37,590 --> 01:20:38,600 late to the meeting, let us know. 1538 01:20:38,600 --> 01:20:41,260 Because that's part of their grade, even though you're not 1539 01:20:41,260 --> 01:20:46,420 grading them, if they are not participating in working with 1540 01:20:46,420 --> 01:20:48,380 you guys, they will get points deducted. 1541 01:20:48,380 --> 01:20:50,270 So we really want to know that, and we have tried to 1542 01:20:50,270 --> 01:20:53,440 emphasize that they have to act, and actually do it right. 1543 01:20:53,440 --> 01:20:56,320 So we really need to know that, if the students are not 1544 01:20:56,320 --> 01:20:59,120 actually cooperating with you guys. 1545 01:20:59,120 --> 01:21:02,775 PROFESSOR: So I hope that this year will have a better-- 1546 01:21:05,890 --> 01:21:09,380 So the vast majority of people last year had no trouble, but 1547 01:21:09,380 --> 01:21:15,010 we did have a couple of people for whom it was one or two 1548 01:21:15,010 --> 01:21:20,780 students who just made life a little bit miserable for their 1549 01:21:20,780 --> 01:21:25,490 master, and so hopefully we'll provide a few more incentives 1550 01:21:25,490 --> 01:21:28,670 this year to avoid that situation. 1551 01:21:28,670 --> 01:21:33,110 But they're students and so they-- 1552 01:21:33,110 --> 01:21:35,700 AUDIENCE: When do we find out which students 1553 01:21:35,700 --> 01:21:37,748 are assigned to us? 1554 01:21:37,748 --> 01:21:39,212 SAMAN AMARASINGHE: Probably the next two days. 1555 01:21:42,628 --> 01:21:46,532 OK, and then who's responsible for contacting whom? 1556 01:21:49,340 --> 01:21:50,144 That's a good question. 1557 01:21:50,144 --> 01:21:51,265 Who should we contact? 1558 01:21:51,265 --> 01:21:53,120 PROFESSOR: We decided that, didn't we, at the meeting? 1559 01:21:53,120 --> 01:21:54,370 What did we decide? 1560 01:21:57,274 --> 01:21:58,556 AUDIENCE: This is what happens when you don't 1561 01:21:58,556 --> 01:22:01,230 write things down. 1562 01:22:01,230 --> 01:22:02,640 SAMAN AMARASINGHE: You have to cover the old stuff. 1563 01:22:09,530 --> 01:22:11,450 PROFESSOR: Let's see, so last time I think we had it that 1564 01:22:11,450 --> 01:22:14,930 the students contacted the mentor, and then-- 1565 01:22:14,930 --> 01:22:17,090 SAMAN AMARASINGHE: What we will do is we will set up, 1566 01:22:17,090 --> 01:22:19,820 we'll send the intro email to everybody, we'll send the 1567 01:22:19,820 --> 01:22:22,860 intro email to the mentor, Cc the student then saying I am 1568 01:22:22,860 --> 01:22:24,780 introducing you to each other. 1569 01:22:24,780 --> 01:22:27,880 And then one thing you can do is immediately reply and, if 1570 01:22:27,880 --> 01:22:30,300 you have Peter Doodle Paul, or something like that. 1571 01:22:30,300 --> 01:22:32,515 And then say, OK, look, do you know your students? 1572 01:22:32,515 --> 01:22:34,570 So you can reply to that and hopefully they will reply 1573 01:22:34,570 --> 01:22:36,170 back, and proceed. 1574 01:22:36,170 --> 01:22:38,865 So when we send you the names you will also see the emails 1575 01:22:38,865 --> 01:22:39,120 of students. 1576 01:22:39,120 --> 01:22:40,755 PROFESSOR: Are people familiar with doodle? 1577 01:22:40,755 --> 01:22:43,390 Anybody not familiar with doodle? 1578 01:22:43,390 --> 01:22:47,850 So doodle is a website where you can basically enter a 1579 01:22:47,850 --> 01:22:53,180 whole bunch of times, and then people enter their names and 1580 01:22:53,180 --> 01:22:57,190 mark off which times they can make things. 1581 01:22:57,190 --> 01:22:58,460 It's a poll source. 1582 01:22:58,460 --> 01:23:00,074 SAMAN AMARASINGHE: Don't do what I did the last time, I 1583 01:23:00,074 --> 01:23:03,960 marked off all the times that I cannot participate, so I was 1584 01:23:03,960 --> 01:23:05,200 basically the exact opposite. 1585 01:23:05,200 --> 01:23:09,310 PROFESSOR: It's green and red, is what the colors they use. 1586 01:23:09,310 --> 01:23:12,615 So green means you can make it, and red means you can't. 1587 01:23:12,615 --> 01:23:15,550 So, anyway you don't have to use that facility, but it is a 1588 01:23:15,550 --> 01:23:16,810 convenient one to use. 1589 01:23:19,702 --> 01:23:23,360 AUDIENCE: Can we expect students to be dropping? 1590 01:23:23,360 --> 01:23:24,470 SAMAN AMARASINGHE: There will be people dropping. 1591 01:23:24,470 --> 01:23:25,740 They just started. 1592 01:23:28,820 --> 01:23:32,470 This is also a group project and at 2:00 AM we got mails 1593 01:23:32,470 --> 01:23:34,910 saying OK, I'm dropping the class, and we had to scramble 1594 01:23:34,910 --> 01:23:36,840 trying to add a 3:00 AM to create another 1595 01:23:36,840 --> 01:23:39,180 group, and so, Yeah. 1596 01:23:39,180 --> 01:23:41,480 AUDIENCE: You shouldn't take dropping as a 1597 01:23:41,480 --> 01:23:44,603 reflection on our end. 1598 01:23:44,603 --> 01:23:46,580 People drop out. 1599 01:23:46,580 --> 01:23:47,790 SAMAN AMARASINGHE: You have to know that. 1600 01:23:47,790 --> 01:23:49,040 PROFESSOR: You can if you want. 1601 01:23:54,136 --> 01:23:56,620 AUDIENCE: I had like three people drop 1602 01:23:56,620 --> 01:23:59,314 PROFESSOR: No, that tends to be more-- 1603 01:23:59,314 --> 01:24:02,116 AUDIENCE: I had one student, it was awesome. 1604 01:24:02,116 --> 01:24:04,460 So easy. 1605 01:24:04,460 --> 01:24:05,040 PROFESSOR: Yeah. 1606 01:24:05,040 --> 01:24:07,300 AUDIENCE: To get an idea of the mindset the students are 1607 01:24:07,300 --> 01:24:12,258 going to be in this sort of a really tough 6-170 type thing, 1608 01:24:12,258 --> 01:24:14,090 or is this one of the easier classes. 1609 01:24:14,090 --> 01:24:15,570 PROFESSOR: No this is a challenging class. 1610 01:24:15,570 --> 01:24:18,210 SAMAN AMARASINGHE: So you take 6-170 that 1611 01:24:18,210 --> 01:24:19,490 has about four projects. 1612 01:24:19,490 --> 01:24:24,032 We doubled the number of turn-ins because each project 1613 01:24:24,032 --> 01:24:26,540 has beta and a final, and some projects has 1614 01:24:26,540 --> 01:24:27,680 two turn-ins in there. 1615 01:24:27,680 --> 01:24:31,250 So basically, they have all their big projects going on, 1616 01:24:31,250 --> 01:24:34,145 because they are doing the new project and they have 1617 01:24:34,145 --> 01:24:36,045 submitted final on the previous project. 1618 01:24:36,045 --> 01:24:39,640 And they're already completed project zero that was-- 1619 01:24:39,640 --> 01:24:41,901 PROFESSOR: Just like real life huh? 1620 01:24:41,901 --> 01:24:43,769 SAMAN AMARASINGHE: We gave them project zero. 1621 01:24:43,769 --> 01:24:48,517 That was built to to get used to the system and we can help 1622 01:24:48,517 --> 01:24:51,120 them with the class, they have to finish this one. 1623 01:24:51,120 --> 01:24:54,585 So this class just screams excess very, very-- 1624 01:24:54,585 --> 01:24:59,150 PROFESSOR: Yeah, and of course they're students, some of them 1625 01:24:59,150 --> 01:25:02,250 have learned you put off things to the end, and haven't 1626 01:25:02,250 --> 01:25:07,195 learned the lessons of well not always. 1627 01:25:10,470 --> 01:25:16,600 So as I said, as a group they're relatively immature 1628 01:25:16,600 --> 01:25:19,420 when it comes to some of these things, but there's a large 1629 01:25:19,420 --> 01:25:23,670 fraction of them who are incredibly mature about these 1630 01:25:23,670 --> 01:25:24,430 kinds of things. 1631 01:25:24,430 --> 01:25:31,590 So our job is as lecturers in the class is to make it so 1632 01:25:31,590 --> 01:25:35,180 that the students who start work 1633 01:25:35,180 --> 01:25:37,360 early don't get penalized. 1634 01:25:37,360 --> 01:25:39,970 And that's probably the hardest thing in the software 1635 01:25:39,970 --> 01:25:43,840 related class because, the classic thing is that they 1636 01:25:43,840 --> 01:25:48,390 want to get started, they find all the bugs right? 1637 01:25:48,390 --> 01:25:50,410 And they waste their time doing it, and if you do it 1638 01:25:50,410 --> 01:25:53,900 later, then the TAs have worked all the bugs out. 1639 01:25:53,900 --> 01:25:59,460 So one of our challenges is to make it so that students who 1640 01:25:59,460 --> 01:26:05,090 start early are rewarded by being able to have more time 1641 01:26:05,090 --> 01:26:06,350 not wasting their time. 1642 01:26:06,350 --> 01:26:08,440 SAMAN AMARASINGHE: And today was the day that they turn in 1643 01:26:08,440 --> 01:26:11,530 the project and by looking at the class, you realize they 1644 01:26:11,530 --> 01:26:13,810 haven't gone to sleep, and I asked and most people haven't 1645 01:26:13,810 --> 01:26:15,290 slept in about 30 hours. 1646 01:26:15,290 --> 01:26:17,970 They have been up entire last night and an email 1647 01:26:17,970 --> 01:26:20,390 conversation when I went to sleep there was 1648 01:26:20,390 --> 01:26:21,360 an email train going. 1649 01:26:21,360 --> 01:26:22,740 Every five minutes, something pop up. 1650 01:26:22,740 --> 01:26:26,200 When I woke up, the train was still going, and amazingly, 1651 01:26:26,200 --> 01:26:29,317 there were a couple of TAs up and answering all through the 1652 01:26:29,317 --> 01:26:31,600 night, and that kept continuing. 1653 01:26:31,600 --> 01:26:36,200 So these kids they can be flaky sometimes, but they're 1654 01:26:36,200 --> 01:26:37,280 amazingly hard working. 1655 01:26:37,280 --> 01:26:38,450 And this is only one class they're taking. 1656 01:26:38,450 --> 01:26:41,630 They might be taking four classes like that. 1657 01:26:41,630 --> 01:26:44,730 And I have seen people scheduling their schedule as 1658 01:26:44,730 --> 01:26:47,510 by hour, scheduling and they say, OK, look I can do the 1659 01:26:47,510 --> 01:26:49,680 problems set or I have one hour of sleep. 1660 01:26:49,680 --> 01:26:52,580 And a lot of times that's their thing, and then 1661 01:26:52,580 --> 01:26:55,180 sometimes they triage. 1662 01:26:55,180 --> 01:26:58,340 That's why sometimes they miss classes, they realize, OK, I 1663 01:26:58,340 --> 01:27:02,490 can do the problem set, I can sleep, I came do that. 1664 01:27:02,490 --> 01:27:05,600 So I think these kids work amazingly hard. 1665 01:27:05,600 --> 01:27:09,500 PROFESSOR: I do think it's helpful to also counsel them 1666 01:27:09,500 --> 01:27:13,570 on, hey, you can't do everything on a death march. 1667 01:27:13,570 --> 01:27:17,660 You got to learn at some point what you're capable of, and 1668 01:27:17,660 --> 01:27:21,390 manage your own time resources and so forth. 1669 01:27:21,390 --> 01:27:25,640 Because the joke at MIT is, classes, 1670 01:27:25,640 --> 01:27:27,670 friends, sleep, pick two. 1671 01:27:31,260 --> 01:27:33,920 The other thing, let me just say, is that despite the 1672 01:27:33,920 --> 01:27:39,430 obvious sleep deprivation we saw in the class today the 1673 01:27:39,430 --> 01:27:43,150 number of students who came up after class so charged about 1674 01:27:43,150 --> 01:27:49,010 working on this first project was really quite amazing. 1675 01:27:49,010 --> 01:27:50,570 They were all very, very excited. 1676 01:27:50,570 --> 01:27:54,030 And very excited we also gave them the initial feedback on 1677 01:27:54,030 --> 01:27:57,000 the performance, and you could see, there's one group of 1678 01:27:57,000 --> 01:27:59,480 students who clearly got it, and then there's another tier 1679 01:27:59,480 --> 01:28:03,670 of students who didn't get it quite this much, and then 1680 01:28:03,670 --> 01:28:07,120 there's the ones who their code has errors and stuff. 1681 01:28:10,280 --> 01:28:14,110 There's no doubt that there are a lot of students who are 1682 01:28:14,110 --> 01:28:15,630 very charged about this. 1683 01:28:15,630 --> 01:28:18,270 This is a fun class but it's a hard class. 1684 01:28:21,020 --> 01:28:23,040 SAMAN AMARASINGHE: I think you'll find this is true. 1685 01:28:23,040 --> 01:28:26,240 They will be, probably tired, but they will be soaking up 1686 01:28:26,240 --> 01:28:29,280 this information like a sieve, and sometimes 1687 01:28:29,280 --> 01:28:32,590 I found last year's-- 1688 01:28:32,590 --> 01:28:36,080 After the looking at the first set of code, some of those the 1689 01:28:36,080 --> 01:28:38,200 masters were really upset. 1690 01:28:38,200 --> 01:28:40,820 How can you teach you guys, these guys write this kind of 1691 01:28:40,820 --> 01:28:43,950 bad code, but when they realized after they said 1692 01:28:43,950 --> 01:28:45,790 something, this is getting into their heads. 1693 01:28:45,790 --> 01:28:47,900 I mean, they're improving they're actually changing. 1694 01:28:47,900 --> 01:28:49,920 These guys are very smart, and they're looking 1695 01:28:49,920 --> 01:28:51,470 for you guys for-- 1696 01:28:51,470 --> 01:28:54,790 They're basically sponge, really empty sponge. 1697 01:28:54,790 --> 01:28:59,220 They're going absorb a lot in this class. 1698 01:28:59,220 --> 01:29:02,610 PROFESSOR: I have a 2 and 1/2 year old at home, and it's 1699 01:29:02,610 --> 01:29:07,545 amazing what the progress is she's made in six months. 1700 01:29:07,545 --> 01:29:12,910 She talking now in complete sentences, and so forth, it's 1701 01:29:12,910 --> 01:29:14,990 just really amazing how how she does it, and these 1702 01:29:14,990 --> 01:29:16,630 students are like that. 1703 01:29:16,630 --> 01:29:19,410 They start out and you say, oh my God, they have no skills 1704 01:29:19,410 --> 01:29:19,730 whatsoever. 1705 01:29:19,730 --> 01:29:24,280 By the end of the term the progress that they've made is 1706 01:29:24,280 --> 01:29:26,120 really astounding. 1707 01:29:26,120 --> 01:29:29,080 You just say, gee if you could just keep on that trajectory 1708 01:29:29,080 --> 01:29:31,860 your whole life. 1709 01:29:31,860 --> 01:29:34,240 But really, they really are very smart, and they come up 1710 01:29:34,240 --> 01:29:38,230 to speed very, very fast, especially given good 1711 01:29:38,230 --> 01:29:38,660 counseling. 1712 01:29:38,660 --> 01:29:41,180 The main thing that they need right now is just the 1713 01:29:41,180 --> 01:29:43,880 attention so somebody actually can look at their code and 1714 01:29:43,880 --> 01:29:48,640 say, you know you did it like this it would be better code. 1715 01:29:54,760 --> 01:29:57,740 Any other questions or issues? 1716 01:29:57,740 --> 01:29:58,950 This is lots of fun. 1717 01:29:58,950 --> 01:30:01,960 If you run into any troubles, we're right here, 1718 01:30:01,960 --> 01:30:03,970 just send us email. 1719 01:30:03,970 --> 01:30:12,390 And as I say they're young and immature, but then you get to 1720 01:30:12,390 --> 01:30:16,840 see them grow, of course some of them will flake out on you, 1721 01:30:16,840 --> 01:30:22,780 but the vast majority, you'll see, are really very dedicated 1722 01:30:22,780 --> 01:30:23,520 and well meaning. 1723 01:30:23,520 --> 01:30:26,380 They really want to do a good job in the class, and really, 1724 01:30:26,380 --> 01:30:28,240 really find the class very exciting. 1725 01:30:28,240 --> 01:30:34,440 Our numbers, in fact, almost doubled for last year. 1726 01:30:34,440 --> 01:30:38,990 So the reputation got around that this was a 1727 01:30:38,990 --> 01:30:40,460 good class to be doing. 1728 01:30:40,460 --> 01:30:44,570 And the other thing is, right now what I really like about 1729 01:30:44,570 --> 01:30:47,450 the class, the students right now compared with 1730 01:30:47,450 --> 01:30:49,260 say 10 years ago. 1731 01:30:49,260 --> 01:30:52,940 So 10 years ago we had the Internet boom, and there were 1732 01:30:52,940 --> 01:30:56,960 all kinds of students taking computer science because they 1733 01:30:56,960 --> 01:31:01,140 thought it was a ticket to fortune and so forth. 1734 01:31:01,140 --> 01:31:11,790 And now we're back to what it was pre-2000, 1998, whatever. 1735 01:31:11,790 --> 01:31:14,040 Where the vast majority of students who are taking the 1736 01:31:14,040 --> 01:31:16,840 class really enjoy engineering. 1737 01:31:16,840 --> 01:31:18,270 They really enjoy the software. 1738 01:31:18,270 --> 01:31:19,390 They really enjoy the engineering. 1739 01:31:19,390 --> 01:31:23,690 The fact that you end up with a pretty good job and 1740 01:31:23,690 --> 01:31:26,650 opportunity sometimes to do entrepreneurship, and 1741 01:31:26,650 --> 01:31:31,320 opportunity to explore things, it's sort of like, oh that's a 1742 01:31:31,320 --> 01:31:32,090 fringe benefit. 1743 01:31:32,090 --> 01:31:35,030 But what they're really after is just the intellectual 1744 01:31:35,030 --> 01:31:36,110 excitement and so forth. 1745 01:31:36,110 --> 01:31:40,070 So it's really quite fun to work with the students and 1746 01:31:40,070 --> 01:31:42,810 quite rewarding. 1747 01:31:42,810 --> 01:31:45,820 Really very nice type of class to have right now, where the 1748 01:31:45,820 --> 01:31:48,140 students taking it because they're actually interested in 1749 01:31:48,140 --> 01:31:51,990 the material, not because it buys them a bread ticket, meal 1750 01:31:51,990 --> 01:31:54,510 ticket, whatever. 1751 01:31:54,510 --> 01:31:55,020 Yeah, question? 1752 01:31:55,020 --> 01:31:57,280 AUDIENCE: The standard, is the coding standard in the 1753 01:31:57,280 --> 01:32:02,740 reference, the standard is to consider for them provided? 1754 01:32:02,740 --> 01:32:05,790 SAMAN AMARASINGHE: I don't think we have set up a 1755 01:32:05,790 --> 01:32:07,280 standard, per se. 1756 01:32:07,280 --> 01:32:09,660 What we want them to do is kind of 1757 01:32:09,660 --> 01:32:11,640 create their own style. 1758 01:32:11,640 --> 01:32:16,240 It's like in a writing class, you don't give them a standard 1759 01:32:16,240 --> 01:32:18,615 writing guideline is to follow this one, you don't constrain 1760 01:32:18,615 --> 01:32:20,260 them to that. 1761 01:32:20,260 --> 01:32:24,980 We want to give them the opportunity to grow into their 1762 01:32:24,980 --> 01:32:29,905 style, but kind of guide them, so that they don't make the 1763 01:32:29,905 --> 01:32:31,155 classic mistakes. 1764 01:32:33,930 --> 01:32:36,350 That's why we need you guys, I mean, if there's a standard, 1765 01:32:36,350 --> 01:32:38,490 we can come up with a standard, create a script to 1766 01:32:38,490 --> 01:32:40,790 actually check the standard, and then say, OK, thou shall 1767 01:32:40,790 --> 01:32:41,960 follow the standard. 1768 01:32:41,960 --> 01:32:43,880 And you can do that and everybody will hate it. 1769 01:32:46,410 --> 01:32:47,710 You can't make that bad happen. 1770 01:32:47,710 --> 01:32:50,350 One thing you want to do is make them lifelong good 1771 01:32:50,350 --> 01:32:53,250 coders, not something they realize OK, I need to do this 1772 01:32:53,250 --> 01:32:55,360 to get this grade, and I'm going to abandon everything 1773 01:32:55,360 --> 01:32:57,740 and convince myself never to that again. 1774 01:32:57,740 --> 01:33:00,400 And we have had sometimes, like when we needed all this 1775 01:33:00,400 --> 01:33:00,900 software engineering. 1776 01:33:00,900 --> 01:33:03,650 We went through things like thou shall write all the 1777 01:33:03,650 --> 01:33:06,330 preconditions and postconditions, and everything 1778 01:33:06,330 --> 01:33:06,910 will be graded. 1779 01:33:06,910 --> 01:33:11,700 And people did it, but half of them got into them and said 1780 01:33:11,700 --> 01:33:12,380 this is good things. 1781 01:33:12,380 --> 01:33:14,340 Other half, they didn't realize why they're doing it, 1782 01:33:14,340 --> 01:33:15,480 they just hated it. 1783 01:33:15,480 --> 01:33:19,200 And I don't think they left assuming I would 1784 01:33:19,200 --> 01:33:20,120 never do this again. 1785 01:33:20,120 --> 01:33:22,270 So the key thing here is, we don't want force 1786 01:33:22,270 --> 01:33:23,410 something on to them. 1787 01:33:23,410 --> 01:33:25,830 We want them to come through a natural process, and I think a 1788 01:33:25,830 --> 01:33:28,110 lot of them, can, when they understand what they're doing, 1789 01:33:28,110 --> 01:33:30,790 they'll develop a really good kind of practice. 1790 01:33:30,790 --> 01:33:35,180 PROFESSOR: It's also the case, I think, that coding standards 1791 01:33:35,180 --> 01:33:38,570 vary culturally from place to place, and the what people 1792 01:33:38,570 --> 01:33:41,250 expect in one place is different from what thing. 1793 01:33:41,250 --> 01:33:45,490 So being too prescriptive means, as Saman is saying, 1794 01:33:45,490 --> 01:33:50,730 that it becomes a grammatical thing, rather than is this 1795 01:33:50,730 --> 01:33:51,970 code organized. 1796 01:33:51,970 --> 01:33:54,660 The real thing, coding standards are very important, 1797 01:33:54,660 --> 01:34:00,230 especially in large software organizations of course, so 1798 01:34:00,230 --> 01:34:03,340 that everybody can tell what's going on in any particular 1799 01:34:03,340 --> 01:34:05,750 piece of code without having been the author. 1800 01:34:05,750 --> 01:34:09,100 But in this kind of thing where we have something that's 1801 01:34:09,100 --> 01:34:11,830 relatively small, what we're mostly interested in is the 1802 01:34:11,830 --> 01:34:17,940 organizational aspects of coding style, as opposed to 1803 01:34:17,940 --> 01:34:20,950 the grammatical ones. 1804 01:34:20,950 --> 01:34:23,650 SAMAN AMARASINGHE: So also don't impose your standard and 1805 01:34:23,650 --> 01:34:26,500 say, my company this is what we do, I want to follow that. 1806 01:34:26,500 --> 01:34:29,740 Just figure out and kind of guide them towards something 1807 01:34:29,740 --> 01:34:33,260 while they're maturing, and try to make it better. 1808 01:34:33,260 --> 01:34:33,820 That's the thing. 1809 01:34:33,820 --> 01:34:37,660 That's why you cannot have a cookie-cutter model. 1810 01:34:37,660 --> 01:34:39,550 PROFESSOR: And why it's good to have senior software 1811 01:34:39,550 --> 01:34:47,300 engineers who understand what's really important, as 1812 01:34:47,300 --> 01:34:55,900 opposed to what might be required in any particular 1813 01:34:55,900 --> 01:34:58,780 individual situation. 1814 01:34:58,780 --> 01:35:01,245 SAMAN AMARASINGHE: One other topic I want to add is 1815 01:35:01,245 --> 01:35:04,430 sometimes when you have two students, there might be a 1816 01:35:04,430 --> 01:35:07,750 case that one person might be very talkative and dominating, 1817 01:35:07,750 --> 01:35:10,250 and one person might be just a listener, and so you have to 1818 01:35:10,250 --> 01:35:14,360 keep an eye on that and make sure that you give the other 1819 01:35:14,360 --> 01:35:17,430 person opportunities to talk, and because it might 1820 01:35:17,430 --> 01:35:19,050 be just like that. 1821 01:35:19,050 --> 01:35:21,540 Encouragement and stuff like that, so make sure that you 1822 01:35:21,540 --> 01:35:23,940 get both of them to talk. 1823 01:35:23,940 --> 01:35:25,980 And also the are supposed to be 1824 01:35:25,980 --> 01:35:27,150 responsible for all the code. 1825 01:35:27,150 --> 01:35:29,850 You should not let them get away by saying, oh my partner 1826 01:35:29,850 --> 01:35:31,530 wrote it, so I don't understand. 1827 01:35:31,530 --> 01:35:33,700 So that's not a good answer. 1828 01:35:33,700 --> 01:35:36,980 So get them to actually go through that, and if they 1829 01:35:36,980 --> 01:35:39,970 don't come prepared tell them that, and you can give them 1830 01:35:39,970 --> 01:35:41,930 some feedback, as a next time can you please 1831 01:35:41,930 --> 01:35:44,260 do, this and this. 1832 01:35:44,260 --> 01:35:46,640 Because they also don't know what to expect, and we give 1833 01:35:46,640 --> 01:35:49,610 them a little bit of guideline, but it'll be good, 1834 01:35:49,610 --> 01:35:51,870 also for you, the first time around, if you find some 1835 01:35:51,870 --> 01:35:56,000 mistakes also for the next code review you can encourage 1836 01:35:56,000 --> 01:35:58,970 them what to do, how to prepare and what to do. 1837 01:35:58,970 --> 01:36:01,470 Don't give them too much work, because we're already giving 1838 01:36:01,470 --> 01:36:02,140 them enough work. 1839 01:36:02,140 --> 01:36:05,750 Don't ask them to write extra documentation, but you can say 1840 01:36:05,750 --> 01:36:09,040 it would have been nice if you had this level of preparation, 1841 01:36:09,040 --> 01:36:11,990 if you could have explained to me, or given me a summary, or 1842 01:36:11,990 --> 01:36:12,810 something like that. 1843 01:36:12,810 --> 01:36:16,100 So something like that is something you can expect. 1844 01:36:16,100 --> 01:36:19,580 And the other thing is if you had to figure out how we want 1845 01:36:19,580 --> 01:36:20,280 to do code review. 1846 01:36:20,280 --> 01:36:23,090 So, for example, you might want to bring your laptop, or 1847 01:36:23,090 --> 01:36:26,540 ask them to bring a laptop in there, if you want each other 1848 01:36:26,540 --> 01:36:29,000 to look at the code on the computer, so ask them to bring 1849 01:36:29,000 --> 01:36:30,590 the laptops or something. 1850 01:36:30,590 --> 01:36:34,830 So think about the logistics of how you're going to do 1851 01:36:34,830 --> 01:36:37,050 that, and that'll be useful. 1852 01:36:37,050 --> 01:36:39,290 PROFESSOR: And I think any other sort of expectations you 1853 01:36:39,290 --> 01:36:45,530 have, in your email to them the first time say, here's 1854 01:36:45,530 --> 01:36:46,610 what I'd like you. 1855 01:36:46,610 --> 01:36:48,760 I think it's helpful to say I'd like you to come prepared 1856 01:36:48,760 --> 01:36:53,120 to give me a five minute update on how you did each of 1857 01:36:53,120 --> 01:36:54,760 the problems, for example. 1858 01:36:54,760 --> 01:36:57,310 We will be telling them that, but to have it come directly 1859 01:36:57,310 --> 01:37:00,320 from you means-- 1860 01:37:00,320 --> 01:37:03,550 The difference if I say go do this to that person, versus 1861 01:37:03,550 --> 01:37:08,870 you're coming to me and expecting it. 1862 01:37:08,870 --> 01:37:10,120 Good. 1863 01:37:11,700 --> 01:37:17,140 So, I want to once again, I can't thank you folks enough 1864 01:37:17,140 --> 01:37:20,360 for being willing to give your time. 1865 01:37:20,360 --> 01:37:27,390 Time is the stuff life is made out of, so I really appreciate 1866 01:37:27,390 --> 01:37:31,870 your willingness to volunteer your time for these students, 1867 01:37:31,870 --> 01:37:37,040 and I really think you have a dramatically meaningful impact 1868 01:37:37,040 --> 01:37:38,290 on the students. 1869 01:37:40,610 --> 01:37:44,690 The students may or may not fully appreciate that, OK, but 1870 01:37:44,690 --> 01:37:48,990 Saman and I really appreciate that, and we will make sure 1871 01:37:48,990 --> 01:37:52,012 the students appreciate it. 1872 01:37:52,012 --> 01:37:52,505 AUDIENCE: Yeah. 1873 01:37:52,505 --> 01:37:53,491 I just have one. 1874 01:37:53,491 --> 01:37:56,942 What what are the guidelines for a contact outside of the 1875 01:37:56,942 --> 01:37:58,421 code reviews with the students. 1876 01:37:58,421 --> 01:38:03,130 I mean are they, can we have them email us with questions 1877 01:38:03,130 --> 01:38:06,460 about the process and just kind of general guidance 1878 01:38:06,460 --> 01:38:08,990 PROFESSOR: It's your level of tolerance we don't want you to 1879 01:38:08,990 --> 01:38:12,640 have to commit more than about 20 hours across the term, 1880 01:38:12,640 --> 01:38:14,690 because then it becomes onerous. 1881 01:38:14,690 --> 01:38:20,520 But if you're willing I think it's completely open ended, in 1882 01:38:20,520 --> 01:38:22,320 terms of how much else. 1883 01:38:29,110 --> 01:38:31,560 I mean it's one thing if you go into solving their problems 1884 01:38:31,560 --> 01:38:34,810 for them, that we don't want you doing, but when it comes 1885 01:38:34,810 --> 01:38:47,990 to, especially the quality, and non-metrical aspects of 1886 01:38:47,990 --> 01:38:51,820 programming, the more you can give them the better, OK? 1887 01:38:51,820 --> 01:38:55,780 Because it's only making them be better programmers. 1888 01:38:55,780 --> 01:38:58,430 And I think the fact that there may be some unevenness 1889 01:38:58,430 --> 01:39:01,530 in that across the masters is irrelevant. 1890 01:39:01,530 --> 01:39:06,100 Really, I do not want to hold back some students from 1891 01:39:06,100 --> 01:39:09,140 getting good mentorship because somebody else is not 1892 01:39:09,140 --> 01:39:13,870 getting the same level of attention, et cetera. 1893 01:39:13,870 --> 01:39:17,560 But really, no expectation there, on our part, to do more 1894 01:39:17,560 --> 01:39:21,760 than the code reviews themselves. 1895 01:39:21,760 --> 01:39:22,760 SAMAN AMARASINGHE: So, that said I want to make sure that 1896 01:39:22,760 --> 01:39:24,990 you aren't answering their question, at some point I 1897 01:39:24,990 --> 01:39:28,330 don't want to be a crutch for them. 1898 01:39:28,330 --> 01:39:32,100 For example, if they say, OK, before prebeta, they say OK, 1899 01:39:32,100 --> 01:39:35,030 this is my next problem, can you on a little bit, I didn't 1900 01:39:35,030 --> 01:39:35,810 understand. 1901 01:39:35,810 --> 01:39:39,060 If you have that, so they're trying to get too much into 1902 01:39:39,060 --> 01:39:42,830 that level, kind of making you their programmer, or something 1903 01:39:42,830 --> 01:39:44,810 like that, just let us know. 1904 01:39:44,810 --> 01:39:47,610 A lot of these things, there will be a lot of cases that 1905 01:39:47,610 --> 01:39:49,890 arise that we haven't thought through. 1906 01:39:49,890 --> 01:39:52,280 The students are ingenious enough they will find a lot of 1907 01:39:52,280 --> 01:39:54,245 loopholes, a lot of kind of interesting things that we 1908 01:39:54,245 --> 01:39:55,090 never thought through. 1909 01:39:55,090 --> 01:39:57,740 So if you find something that you're not feeling comfortable 1910 01:39:57,740 --> 01:39:59,800 just send a mail and say OK, take a look. 1911 01:39:59,800 --> 01:40:01,840 PROFESSOR: It really is, if their questions are about 1912 01:40:01,840 --> 01:40:04,540 course content it's not appropriate for you folks to 1913 01:40:04,540 --> 01:40:05,545 be dealing with, really. 1914 01:40:05,545 --> 01:40:08,380 OK, that's what our TAs are for, and course staff. 1915 01:40:08,380 --> 01:40:17,770 If it's about coding style and engineering practice, and even 1916 01:40:17,770 --> 01:40:20,760 time management, or anything that's sort of the 1917 01:40:20,760 --> 01:40:27,130 non-technical aspects, but things that have a strong 1918 01:40:27,130 --> 01:40:29,830 impact on technical, that yes. 1919 01:40:29,830 --> 01:40:31,510 Anything you can provide there is great. 1920 01:40:31,510 --> 01:40:34,330 SAMAN AMARASINGHE: So if you find anything that's outside 1921 01:40:34,330 --> 01:40:36,310 the norm of what we discussed if you feel a little bit 1922 01:40:36,310 --> 01:40:37,620 uncomfortable, just send email. 1923 01:40:37,620 --> 01:40:39,560 Send an email, and say, hey, can I do this? 1924 01:40:39,560 --> 01:40:40,400 Is it OK, for me to do this? 1925 01:40:40,400 --> 01:40:43,480 And then we can always provide guidance, so we are 1926 01:40:43,480 --> 01:40:43,690 responsible. 1927 01:40:43,690 --> 01:40:45,680 PROFESSOR: --do something and say after the fact, oh, it 1928 01:40:45,680 --> 01:40:48,690 went past, let us know. 1929 01:40:48,690 --> 01:40:54,760 There's rarely anything you can do on one shot basis that 1930 01:40:54,760 --> 01:40:59,070 is heinous or unrecoverable from, or whatever, so. 1931 01:40:59,070 --> 01:40:59,840 SAMAN AMARASINGHE: It is always good, 1932 01:40:59,840 --> 01:41:01,670 I mean that's why-- 1933 01:41:01,670 --> 01:41:04,340 since we see everybody able to and we have done these kind of 1934 01:41:04,340 --> 01:41:05,460 situation before. 1935 01:41:05,460 --> 01:41:07,270 We can just easily tell you what. 1936 01:41:07,270 --> 01:41:12,350 PROFESSOR: But, mentor them, for sure, mentor them. 1937 01:41:12,350 --> 01:41:14,270 SAMAN AMARASINGHE: I think a lot of times, when you talk to 1938 01:41:14,270 --> 01:41:19,290 students last time they got a lot more information out from 1939 01:41:19,290 --> 01:41:22,540 the masters, other than just the coding style. 1940 01:41:22,540 --> 01:41:25,050 I mean, they talk about what is it like to be an engineer 1941 01:41:25,050 --> 01:41:26,240 in a company, what are the things? 1942 01:41:26,240 --> 01:41:27,710 And so they get a good feel. 1943 01:41:27,710 --> 01:41:30,200 I mean, some of them might not have done a 1944 01:41:30,200 --> 01:41:31,560 internship in a company. 1945 01:41:31,560 --> 01:41:32,340 So they don't know. 1946 01:41:32,340 --> 01:41:36,490 I mean, they're just green, and talking to you guys they 1947 01:41:36,490 --> 01:41:38,010 get a feel for what it's like. 1948 01:41:38,010 --> 01:41:40,940 And also from a non-marketing situation too. 1949 01:41:40,940 --> 01:41:43,440 I mean you might have ulterior motives to market your company 1950 01:41:43,440 --> 01:41:45,940 to them, and stuff, but this is not that they're going into 1951 01:41:45,940 --> 01:41:47,080 a job interview. 1952 01:41:47,080 --> 01:41:48,630 So, for a lot of them it's rare. 1953 01:41:48,630 --> 01:41:51,090 I mean they might not have retinues of friends that they 1954 01:41:51,090 --> 01:41:53,160 can go and talk at that kind of casual level. 1955 01:41:53,160 --> 01:41:55,250 Most of the time they're on guard because they're on an 1956 01:41:55,250 --> 01:41:59,870 interview or they assume that information coming to them 1957 01:41:59,870 --> 01:42:02,830 will be sugar-coated, and here is a way that they can get-- 1958 01:42:02,830 --> 01:42:05,160 I think it's very good for them. 1959 01:42:05,160 --> 01:42:06,665 PROFESSOR: Eight minutes over time. 1960 01:42:06,665 --> 01:42:08,070 SAMAN AMARASINGHE: OK, I think we should. 1961 01:42:08,070 --> 01:42:12,650 PROFESSOR: So, any last final comments? 1962 01:42:12,650 --> 01:42:15,190 Saman and I will hang around for a few minutes, for anybody 1963 01:42:15,190 --> 01:42:17,350 wants to chat more one one. 1964 01:42:17,350 --> 01:42:24,620 And one and once again I thank you for all the time that 1965 01:42:24,620 --> 01:42:28,420 you're planning to put into the 6-172, thanks. 1966 01:42:28,420 --> 01:42:29,670 AUDIENCE: Thank you.