Fall 19 Week 6 Update

Edited Transcript

Good morning everyone and welcome to this special update video for Computational Core. After looking at the grades for lab 4, I decided I needed to do a little bit to help explain exactly how some of these projects are structured. Hopefully this will make a little bit more sense to you as you start working on project 5, which will be due not Monday but Wednesday of next week.

So here in Codio I pulled up project 5 and you’ll notice over here you’ll have the program specification where it describes how the program should work and then it gives you some sample inputs and outputs. And then below that you have this test using sample inputs. What this does is this runs your program using these three sample inputs, mainly just to help you debug very simple things with your program, like it’s not reading input correctly or it’s not processing input correctly or it has some sort of syntax error. So these are really meant to help you get your program started and get these first few simple cases figured out. And so on project 4 I only really included these tests in with each part of the program.

And then at the bottom there was this full set of grading tests that actually check your program using all sorts of inputs, not just the three sample inputs. The intent is that the sample inputs give you an idea of what your program should do, but then the grading inputs, will check all sorts of different inputs. For example, in the last project, one of the programs was to tell how many months… how many days were in each month. The sample inputs would test two or three of those months, but the grading inputs actually tested all 12 months plus several invalid values just to make sure your program worked correctly.

So for project 5, I’ve changed things a little bit. Now you have this test using sample inputs button that will run your code using these three sample inputs. But then I’ve also added a second test right below it that will test that part of the program against all of the grading tests. And so this might run anywhere from 20 to 30 actual grading inputs against your program, and it will give you some sort of output to show you whether your program has worked or not. So you might be asking, where are these tests stored? They’re over here in this tests folder. So if I open this tests folder up, you’ll notice we’re working on the power program. So if I scroll down here to power, you’ll see the first three inputs, one, two, and three are the same as the sample inputs here. But then there are many, many other outputs that we provide to this program. And along with each input file is the expected output that your programs should produce. So if you’re curious to see what things you’re going to need to actually make your program work with, those would give you a really good idea of how that looks.

So I’ve written some sample code in Power.py to test this out. I’m not going to show you that code because that would give away the answers. But if I click this “Check it” button, you’ll notice that it’s able to check all of these first inputs. Remember the first three check terminal input, the second three check file input. Then I can go down to the grading tests and hit that “Check it” button and it’ll take a little bit, but you’ll see I got a score of 22 out of 25 which means that at least one of my outputs was incorrect. And here it gives you this details. I’ve got this zoomed in, but if I zoom this out a little bit, you can read it a little bit better. So if I go here, you can see that it gives me the name of the file that the output is going to be in. And so what I can do is I can go to this output, this power.pregrade file, and it gives me all sorts of information. It’s probably easiest to view this as a static webpage so I can right click on it and hit preview static. And here it will show me that I have gotten 87% of these tests correct and then it will show me which test I got wrong. So here I know that the input file power5.in, I got that incorrect, my output was a little bit wrong. power6 I got a little bit incorrect power8 I’ve got a little bit incorrect, 9 I got incorrect and so I can see that those are incorrect and you’ll notice that it runs them both for terminal input and for file input.

So to debug this program, I’ll need to look at the inputs for power5, power6, power8, power9 and see what my program does when I provide those as input. So I could run my program manually and either provide those inputs via the terminal or I could place them in input.txt and then choose the file input option here to test them. Either one of those works. The intent is that as you work on this program, you’ll slowly first be able to get these sample tests to work to make sure your program works in the simple case. And then you’ll use these grading tests to slowly work your way through all of the errors that the grading tests find and keep repeating this process until you get 100% on each part of the project.

Now, of course, you may run into errors where you’re not sure how to solve the problem, but the idea is once you get that far, then you can take these errors to myself or the GTA and say, Hey, I’m getting this error on this particular input. Here’s my code, what do you think I’m doing wrong? And we can help you solve those errors pretty quickly.

So I hope this helps clarify a bit of information about how these projects are structured and how I hope that you can use the autograder and the feedback that it gives you to continually improve on your projects until you get everything working correctly. It can be a time consuming process, so I encourage you to start it as early as possible.

The other thing I wanted to talk about really quickly this morning is that I’ve noticed in the past couple of projects, there’s been several people that get stuck and then either give up or ask questions very, very late before the due date. And it really isn’t a very good way to go about this class because I’m unable to really give you help at the time that you need it, which is right before the due date, since it’s usually 11 o’clock at night and I’m usually already in bed. And so I really encourage you to start as early as you can on these projects, but I also encourage you to reach out and ask us whenever you have questions or get stuck. Because this is an online course, we don’t see each other in class face to face two or three times a week, like you do in a normal college class. And so it’s hard for me to get those, really quick interactions between myself and the students to figure out how things are going and answer any questions you have. Instead because it’s an online course, both I as an instructor. and you as a [student] have to be a little bit more deliberate about how we communicate and how we ask questions.

So I really want to encourage you that if you get stuck or you have questions, don’t give up. Feel free to come ask us questions because that’s really how you’re going to learn this material. We’re always here to help, my GTAs have office hours three times during the week, but even outside of that, they’re available via email or via Piazza. Again, we prefer that you use Piazza so that we can keep track of all the communication going on in this class. But feel free to contact us and say, Hey, I’m not available for the normal office hours, but I’m available these times. Would one of you be available to help me either in person or via Zoom? And we can definitely do that. I’m usually sitting here working from home the other four days of the week, so I’m very glad to help students out when I can.

So, I hope you find this information very useful as you start working on project 5. Don’t forget that project 5 is due Wednesday, of next week, not Monday, and it’s due Wednesday by 5:00 PM. So if you’re not sure that you’ll be able to work after work or if you’ve got things going on Wednesday, my hope is that you’ll spend Monday night and Tuesday night working on the project. So you can ask any last minute questions you have on Wednesday, either during the office hours or just via Piazza. So if you have any questions about this course or you’re concerned or you get stuck or you’re lost, please contact us and let us know. If you find something in the programs or in the projects or in the textbook that is unclear, you can submit a note on Piazza for the bug bounty extra credit points. We’re always looking to improve the instructions and make things as clear as possible, but we really depend on your feedback to tell us what didn’t make sense and how we can make things better.

So I wish you the best of luck on project 5. I look forward to hearing from you if you have any questions, comments, or concerns about anything going on in the class. But otherwise, I will look forward to hearing from you later this week.