To solve task MF1, you switch to directory
mf1 and start programming. In this case, you are supposed to edit the file
mf.cc; everything else is already there. Once you have implemented it, you can compile it with:
If it compiles fine, you can run some simple tests with:
You can also run some benchmarks to get a better idea of the performance:
But of course you can always develop your own unit tests, your own benchmark tools, etc. For example,
./grading benchmark simply runs the program
mf-benchmark with suitable parameters. You can read its source code and you can run it directly as well.
You are also encouraged to try out e.g. the program
pngmf to actually do some median filtering for you own PNG files. If something goes wrong, isolate the problem, find out precisely which test fails, start debugging it in isolation, etc. See this web page for more help with debugging.
Once you are happy with your code and its performance, you can try to submit it for grading. You can simply run the following command in directory
It will run a bunch of tests, do some benchmarking, and, if all goes well, it will create the file
where WEEK is the current week number (1–6). The submission file contains the running time of your code, and this determines your preliminary score. Use
./grading show to see your current points and
./grading info to see the point thresholds for each week.
You can safely run the grading tool any number of times, for any number of tasks, during any course week. If you have already got a submission file for the same week, it will be automatically updated if your latest performance is better.
Once you are happy, add all relevant files to your personal Git repository, commit, and push. For example:
git add mf.cc submission-1.txt git commit git push
Please note that you must commit and push both your solution (e.g.,
mf.cc for task MF1) and the submission file (e.g.,
submission-1.txt for the first week) to your Git repository on GitHub. If you are new to Git, or just feel a bit unsure, go to github.com with your web browser and see that you really see both of the files there.
Also please note that you must do all this before the weekly deadline. It does not matter when you run the grading script. What matters is when you successfully push everything to GitHub. Everything also has to be in the master branch of your repository; we will ignore all other branches and you can freely use them for your own purposes if needed.
After each week, the teaching assistants will review your submission, grade it, and give feedback.
Let us assume that you have submitted the following files during week 1:
Your teaching assistant will study your code and then create the following file in your repository:
The file will start with an adjustment to your score. Usually, it is simply “0”, meaning that everything is fine, and your preliminary score is also your final score. If needed, there may be negative adjustments (e.g., your submission seems to run fast but it violates some rules) or a positive adjustment (e.g., personal deadline extensions in the case of illness). But all of these will be hopefully rare.
After that, there will be greetings from your teaching assistant: for example, explanations of the grading, and feedback on your implementation. Read it!
You will receive feedback files by simply pulling the latest changes from GitHub:
Once you have feedback there, you can also use the grading tool to see your final scores, for example:
./grading show mf1 ./grading show all
You will implement
mf1/mf.cc. You will commit and push it to your Git repository.
The grading tool creates
mf1/submission-1.txt. You will commit and push it to your Git repository.
The teaching assistant creates
mf1/feedback-1.txt. You will pull it and read it.
Now the grading tool can show your final score for week 1, for task MF1.