What are the graders looking for in assignment solutions?
In the "real" world of programming, good code has many diverse qualities that combine to make it accurate, efficient and easy to maintain. When the TAs grade your code and write-ups, they will be looking for these same qualities.
- The single most important quality of good code is good testing. TAs expect EVERY function you write to be tested thoroughly (including every edge case) and rigorously (at least with a couple different inputs). Good testing will ensure your code works as expected and will help the code scale in the future (not too important to cs019 projects, but applicable to life!).
- Secondly, TAs are looking for well-commmented code. We've introduced the idea of contracts and comments at the headers of functions for a reason. Use them. They help us figure how your code works and more easily identify where there are bugs if we stumble upon them. Furthermore, if you work writing software with code shared with anyone but yourself, it's always important to make your code easy to read so they can work on it more efficiently and with less confusion.
- The way code is organized is also important. It is much easier to read through code where functions that are closely related are defined adjacent to each other and the code logically flows like the program does. Organizing can provide many of the same benefits as commenting code.
- Complete functionality is also important, though this is obvious and should fall out of your program naturally if you do all the above things.
I am stuck. There is only one hour left before the due date. I probably will not finish the assignment. What can I do to maximize my grade?
Do not panic. Most of the TAs were at this point on some assignment last year. The best thing you can do is clean up your code with comments and better organization and test everything you have. Doing these things will at least make the code stylistically sound. At the top of the file, include a bug report of known issues and maybe describe what you would have done if you had more time (though that may not be helpful if you are just plain stuck), TAs will be very happy to not have to figure out what is wrong with your code and look through the mess that can emerge in a last minute rush. Everything will be fine and TAs can ensure if you do this, it'll be extra easy to find ways to give you more points if they exist.