# Grading source code in an online environment

In the past students have submitted hardcopy of the programs and output for grading (electronic version was also supplied if I wanted to run the programs).

I always annotated and graded the source listing and associated output on the paper copies that I then returned to students in class. Now with COVID-19 and teaching all online, I will only have Canvas submissions, and I am able/willing to print them as needed, but no way to get feedback/hardcopy easily back to students. This is particularly important for my CS I students.

What are you all doing with regard to this? Annotating paper is the most time efficient way for me to do this. I had one colleague last spring who took images of all the grading and then uploaded a set of .jpgs for each student - a ridiculously time consuming process that she gave up on soon.

Scribbling on source code, circling sections etc is what I'd like to do.

Any suggestions?

Please note that this is mostly for my CS 1 course - many of these students will not have had any programming experience. They will struggle enough with the basics of Eclipse and Java - so I don't necessarily want to burden them with extra technical demands.

• Note that pdf's can be annotated and returned. You can make the original from their source if needed. – Buffy Aug 17 at 19:43
• On a Mac, Preview lets you add a (typed) note anywhere. That's all I've done, but I'm sure there are other solutions. – Buffy Aug 17 at 20:11
• Xournal let's you import a pdf and scribble on it in various colors. I guess circling with a standard mouse is doable. Writing is not!! – Rusi Aug 18 at 0:55
• @Rusi Xournal also allows to type text. In fact for people with my handwriting this might be the preferred method, even in presence of a stylus. – mlk Aug 18 at 11:08
• ... Xournal (as @Rusi suggests) used to have trouble exporting marked-up PDFs for reading in other software but I think it's better now – Chris H Aug 19 at 9:26

I would suggest you use a code review tool. This is something they will likely need to be using when working in industry. So worth upskill them on it now.

You can use githubs one for free. (You are teaching version control so that should be easy enough)

Get your students to create a pull request and review that.

You can highlite specific lines and put comments against them etc.

• Thanks, that's a good suggestion .. I may give that a try in my upper level classes, but for my CS I class they are already cognitively fully loaded with new concepts, so I don't want to toss this in on top. – Levon Aug 18 at 13:01
• @Levon could you give them a script to run that commits the code and opens the PR for them? I recall installing WordPress in my undergrad via step by step instructions in a lab once. No idea of what the commands I was running actually were doing. – Sandy Chapman Aug 19 at 0:06
• @Levon FWIW the github desktop GUI tool makes working with git very easy. You could probably get your students set up in a single lab session. – DarcyThomas Aug 19 at 1:34
• I agree with this suggestion, but consider data privacy issues and university regulations when asking students to use some tool. – Carsten S Aug 19 at 13:12
• GitHub Classroom is an effective way to distribute assignments to students, and it has a feature whereby it will automatically create a PR on the students repo for you to provide feedback. You can add comments to specific lines in the code or provide general feedback. I'll be using this in the upcoming semester, and it aligns very closely with industry code review processes. Beyond using Git there's no additional technical overhead for the students in using GitHub Classroom, it's really a teacher's tool. Repos can be private too which can help with privacy issues. – john french Aug 19 at 14:04

It has never occurred to me to use printouts of code, even though I have an older colleague who does this. To me, it seems a little odd as an approach and inefficient.

That said, if you wish to have a similar workflow digitally, you might want to consider using a tablet computer with a pen, Microsoft OneNote, and then saving the final output as a PDF. This will allow you to draw, scribble, and write freely on their submitted code. As a side benefit, you'll also be able to put in links, pictures, or other diagrams, assorted and sundry as you find useful.

Typically, I provide feedback either in bullet points or side-by-side in person ("in person" in this context means using screen share in Zoom).

• Well, I'm no spring chicken, so perhaps that's why :) Not sure about the meaning of "have a solar workflow"? Also curious, how do you provide feedback to the students for programming assignments. Happy to consider as many alternatives as I can. (don't have a tablet computer unfortunately) – Levon Aug 17 at 19:30
• @Levon "Solar" lol -- sorry, I was using text to speech on my phone and didn't notice! I meant "similar". – Ben I. Aug 17 at 21:21
• I used printouts of code in college in the early 1990s, but the reason was that I wanted to be able to read more than 80 columns and 24 rows at a time! The terminals of the day were rarely able to do more. Old habits die hard, as they say, but these days I almost always read code on screen as well. I switched as soon as PC graphics got sufficient screen resolution for it. I think around 1024x768. Though at some point I also bought a large and heavy CRT monitor that did 1600x1200... Once in a blue moon I may still print some code to look at it offline, though that hasn't happened in years. – Michael Hampton Aug 19 at 0:32

If you can create PDF files (as you indicated in comments) you can use Adobe Acrobat Reader (the free one) to add comments from a keyboard into the code and save it. This is what I use for most student work, listings, dissertations and so on. You can save it and re-upload to the VLE or whatever feedback mechanism being used.

Of course, if you have a tablet device or even a sketching pad attached to a desktop you can add more freehand annotations in the old style.

However, I have moved from annotating code for a more test-based development mechanism for giving coding feedback. The students now have to run the test scripts I write and upload the results rather than the code at intermediate stages for formative feedback. I only feedback on the code at the summative stage. I find that, with >250 students, I need to let the computer do more of the work whilst still trying to give some form of helpful information to the students.

There are, of course, pricier tools specifically designed for scribbling that others may mention.

Another way of doing things is to interact with the students' actual code base and not a listing, using something like Visual Studio Live Code Share. This give feedback at the actual point where they start to deviate from common sense. Some colleagues are doing this technique.

• Thanks, I appreciate the post .. I have thought about the testing suite approach, but esp for these novice programmers, I find it particularly necessary to provide some guidance on coding style etc, so functionality is not the only criteria. The CS 1 students are all using Eclipse, so I'm not sure if it has any of the features you refer to with re VS Live Code Share (haven't used it myself I am not that familiar with it) – Levon Aug 18 at 17:02

Note this answer does assume a batch scanner is available.

If you insist on working with printed pages, you could prevent doing (much) manual work returning the files if you either:

1. Keep track of the order of the printed files, correct them, put them in a batch scanner and automatically return the corrected files. Though I could imagine this is not an option due to risk of mixing files due to scanner/printing glitches.
2. Another option could be to print a qr code on the page,print the pages, correct the pages put the corrected papers back into a batch scanner, and process the images using a qr decoder to allocate the files accordingly, this way you are (almost, depending on how good the qr scanner is) certain that the correct corrected papers are returned to the right students. You could also get a notification on the papers that were not scanned correctly since you know how many you printed and hence should scan.
3. If you don't want to be searching for a place to put the qr code in their paper, you could give the students a latex template, or convert their code into a latex template with a qr code belonging to their study number.

In my experience pyzbar can be a bit tedious to set up but I found it to practically work identifying qr codes in printed- and scanned pages. Not claiming this is the best solution, I think there would be easier solutions and like DarcyThomas answer better.

You can try PDF Viewer Pro by PSPDFKit, saw it in the top list on iOS App Store a few days back, looks like it does what you need. I say iPad because I think it allows you easier to create circles and lines than using a mouse on a notebook.