 Good evening, everyone. I hope you can hear me clearly. If you don't, please post on the chat. My name is Arvind. And in today's recitation, we're going to go over the assignments, basically. I'm going to walk you through the questions. This is describe, generally, what needs to be done, and also share some general comments that I have to say based on the discussions that I'm seeing on Piazza and some of the questions that I've also been receiving. So let's get started. So this assignment is basically a bigger level of assignment that's mainly to get you comfortable with using Linux. That's the part two. And also, we are looking at getting you familiar with using make files and also command line arguments. These are three things that are basically going to be useful for you in future assignments. So let's dive into each of the parts. I hope part one is pretty clear. I hope everyone who attend here have already registered on Piazza. I think there are still a few people who haven't enrolled there. If you haven't, please do join. There are a lot of discussions happening there, lots of questions being asked, and lots of people helping each other out. The part two is primarily about this war game called Bandit, which is a bigger level war game that lets you get familiar with using Linux commands and the terminal. A lot of people we have seen are not very comfortable using the command line on Linux. So this is going to get you up to speed in using that. But we also just don't want you to just play Bandit. Before you do that, you also need to register for an account on Vechal and link your Vechal account to Bandit so that we can automatically track your progress. A lot of people actually having trouble linking their Vechal account to Bandit. So I'm just going to dive a bit into that. So these are the instructions to actually link your Vechal and Bandit accounts. These two need to be set up first. And these two need to be done on your machine, the machine that you will be using to SSH into Bandit servers and not on Bandit server itself. A couple of people have been using these commands on Bandit server. That's not exactly going to work. You have to do this on your machine. If you do want to do it on Bandit server, look at what Adam demoed during the lecture yesterday where he showed you a nice quick way of doing it if you're on Bandit server without having to export this and pass it over SSH and things of that sort. This step is also something a couple of people have been having trouble with. Sometimes this directory here, till slash dot SSH, might not exist. And you would have to actually create it. So if it's not there, if you're having trouble writing it, make sure that this directory actually exists before you actually configure this file. The other important thing is that this config file needs to have a very specific permissions. It has to be readable and writable by your user, but not by anyone else. There is a discussion on PRSR, which says what permissions need to be set and how to actually set it. The command to do that is ch-mode. And the permissions that you need to set are 600. You can just search online on how to exactly do it. And once you've configured this clearly, and if you have also set these variables, everything should be working fine, and you should be able to play, bandit, and solve level after level. There is also a URL on your WeChat profile, where I think you can verify if the linking was done correctly. Someone had posted the URL to check if the linking was done properly on PRSR. So I would recommend that you go there and check again. And once you do that, you just need to solve levels one to five of bandit. And automatically, your progress will be updated on WeChat. And when you submit your readme file, we will automatically check if you have finished all the levels and give you the appropriate grade. A couple of other things about the bandit is that you can also just solve all the levels at one go, and then run the single WeChat command, and then everything gets automatically synced. Admer also mentioned that during yesterday's lecture. If there are any questions, please post it here. Otherwise, I'm going to move on to part three, which is about using makefiles. Now, makefiles are primarily some configuration directives that you give to the make command. The make is actually an automatic build system that can quickly run a set of series of commands that you don't have to keep copy-pasting a bunch of commands to recompile every time. It's one of the most widely used build systems on Linux. There are, of course, many other build systems. And I believe even Windows has one which is called nmake. But in this one, we are primarily going to write two makefiles, one for compiling C programs and the other for getting an executable out of Python. So the important thing is that you have to name your makefiles specifically as makefile.c and makefile.python, because that's what the grader would look for when you submit your solution on grade scope. Now, I think most people have got the C makefile correct. There is not much issues. You just take this source code file that Aram has provided and write of C makefile to compile this and generate this executable file, and that's mostly it. I've seen that a lot of people have been having trouble with the Python makefile. I'd see a lot of questions on PSI asking. I couldn't find any resources on how to do it. The key thing to remember is that a makefile is nothing but just a sequence of commands that you specify. There's no other magic to what is a makefile. And another important thing is that since Python is actually interpreted and not compiled, makefiles are not very commonly used in Python programs. And that's why you would not find many resources. But you don't really need to know too many things on how to actually do it, because one of the commands that you need is actually given here. This is the command that you use to make your Python script executable. And that would be this file here that you create. Finally, it should be executable. The other thing that you need to also know is that when you want to run the Python program as .slash Python program, it should also specify the shebang. You can read more about this. It's basically a directive that you give inside the file which specifies which interpreter to use, because Python is interpreted. There is nothing to do with make or Python to write this next file. It's a series of simple Linux commands that you actually need to create this file executable program from this script file. If you have any other comments. Right, a couple of people have been posting their make files. And I'm seeing that many of you are running the Python script for the Python make file. That is not what is supposed to happen. The make file should only build the final program. It should not actually execute and print the output anywhere. We will execute the final executable that you produce ourselves after the make is completed. The other thing is that a lot of people have been having formatting issues in your make files. Make is very picky on how the file should be structured. You cannot mix tabs and spaces. In fact, I think make files will not accept spaces. Everything should be aligned using that. If you're using a reasonable IDE or an editor, it should automatically detect the make file type. And it should set all the indentation and everything appropriately. If it does not, you might have to manually specify to the IDE that you're actually editing a make file and then everything would work correctly again. The last thing that I've seen a lot of people struggling with is that since we have custom names that are needed for the make file, and when they try to build their solution locally to test it, they say it doesn't work. Now make command by default looks for a specific file name. And since we're not using that standard file name, make is not going to find the make file. In fact, I think for some cases, it actually tries to build the make file.c when you run the make command without any arguments. There's a specific option that you can use to make in order to specify use a custom make file. I'm not going to give you the option, but please look it up. It's very easy to find. That's also how we'll be evaluating your solution. So key thing to remember, do not run the Python script. We don't want the output to run in make. We just want the final executable to be produced, and we will run the executable ourselves. Be sure that if there are any formatting issues, make sure you don't mix tabs and spaces. Do not use spaces in a make file, only use tabs. And finally, make sure that if you're trying to test your custom make file, please specify the option correctly so that make picks up the correct make file. The last part of this assignment is about command line arguments, which is basically one of the ways that you can give inputs to a program in addition to ways like you can give input via the standard input. Now, command line arguments are going to be used for many of the future assignments, so it's always good to have a nice understanding on what they are and how do you use them, right? So in this, you need to produce a program called command, which when passed arguments in this format would specify an output saying, this is the number of arguments and this is each argument. Now, in case you haven't seen Adam's post on Piazza just a few minutes ago, he has relaxed some of the requirements for this part, specifically that if you have a trailing white space that's going to be ignored by the grader because a lot of people were missing that since it's not very apparent from the output that you give on grader, right? But in case you find that the output that is produced by your command is correct, it likely means that you have made some formatting issues somewhere, so always just go back and check. And if you still can't figure it out, maybe create a post on Piazza and we take a look at it, right? So the tricky thing here would be of course this, but I think if you were to implement your program correctly, it should still work. We have no language requirements for this part, so you can write it in any language as long as you produce an executable output file called command, which is going to run your solution and it's going to print the answer. So if you were writing in some interpreted language, make sure that you invoke your solution correctly from this executable file. Couple of people who are writing in Java had recent issues about it. There are ways that you can do it. I think there are some solutions which are also discussed on Piazza, so I encourage you to go back and check. But it's definitely possible. You just need to make sure that you have this file here as executable, which is going to invoke your solution and print the output. That's how we are really going to evaluate, right? Couple of other general guidelines for this assignment. I see that a couple of people are testing on possibly non-standard environments which we are not testing on, which is giving a different behavior where the people say it works on my machine, but then the grader says that it's not correct. I strongly encourage that you test on Ubuntu 18.04 as well because that's also what we are testing on. So if you see any issues locally, it should also happen remotely, right? Another important thing that many people have been doing is they upload a file, readme.txt with some extension, and then the grader says that no readme file is found, but then they upload a readme file. The readme file has to have the name readme in caps. No extensions are necessary. You can configure your IDE or editor to save without an extension. If you add an extension, the grader is not going to find the file and then it's going to complain that it couldn't find the readme file, right? The third thing, I'm seeing that many people are posting on Piazza that I try running a specific command, it didn't work, and then I ran the command with sudo in front of it and then everything worked fine. Well, for probably most of the commands, it's safe. I would still not recommend that you randomly just prefix sudo if your command as regular is not working. Now, of course, don't know how the Ubuntu subsystem inside Windows works, but normally you shouldn't have to run sudo for almost any command that you need in this assignment. If you see that you're faced with a situation that you need to run sudo, you might want to ask yourself if there is something that should be done differently. On the grader, we will not evaluate any commands with sudo, so if you find a situation that you need to solve it with sudo, you're probably missing something and you will want to go back and check. This is a general tip, not necessarily something for this assignment. And finally, of course, of late people have been doing it correctly, but if you face some kind of an error, I strongly encourage that you just run a search online for it. It's very, very likely that someone has faced an error like this before and there is a solution very likely available online. You don't necessarily have to quickly go create a PR support as soon as you encounter an error. Run a search, in a few minutes, you will very likely find the answer. So that's mostly what I had to say in this assignment. I just, if you have any questions about this assignment and also necessarily about the course material that has been covered in now, you can post it on chat and I can always try answer. So question I was asked here is, how do you remake the Python make file exactly since it's not a compilation? I'm not sure what you meant by remake the make file because you just have to create a make file once and it should just work. You will not have to edit the make file. If you go clarify the question, that would be good. Or I said that are you asking how do we make sure? I think one of the assignment questions is that it should work fine if the file is modified and it should still rerun. Is that the question? Okay, I'm not seeing any response here. I'm just waiting for response. Okay, yeah, sorry, I just got applied. Right, so the question is basically that in the C make file, the make was able to determine that it did not need to change anything and so it did not rebuild anything. But in the Python make file, it keeps running the operations over and over again, even though the actual file was never modified. So how do you make the behavior same as the C make file? That's what I'm assuming the question is. Now, if it works on the C make file, then you probably want to compare the C make file with the Python make file and see where is the difference. You just were not specifying some kind of a dependency check that make has to do to determine if a file was updated and so a recompilation is required. If it works correctly on C and if it doesn't work correctly in your Python make file, I'd recommend that you compare the two together. You will notice that there is some difference between the two and that is the one that's missing in your Python make file. I hope that helps you find the answer. Anybody has any other questions? Please post on the chat and I'd be around for some more time if anybody wants an answer. So I have another question here. So the Python make file is supposed to have Linux commands to change the Python underscore program dot type to Python underscore program. Yes, mostly because Python is not compiled. You just need to interpret it. So there is not a lot of work that's actually necessary to convert the Python underscore program dot type pi to Python underscore program itself. I hope that answers the question. If not, please respond on the chat and I can clarify further. Also in case you didn't notice, Adam just created a note on Piazza. For those of you who are working on part four using Java, he's uploaded some files that's going to be helpful for you with the assignment. So please take a look at it if you already haven't.