I teach AP Computer Science, and coding assignments are the ones I can't skim. With an essay, a paragraph or two usually tells me whether I'm looking at an A or a C. Code doesn't work that way. To know whether a student understood a loop, I have to read the loop, trace it, and work out whether the bug on line 14 is a typo or a misunderstanding. Thirty students times three periods times a hundred lines of code equals I'm not watching the new episode of VisionQuest this weekend.
Autograders tell you whether the code passes your tests. They don't tell you whether the student knew why it passed, or why it didn't. This post covers how to get a rubric-based read of every student's code in Google Classroom, what an AI-assistive grading tool can and can't see in a program, and how to write the assignment so the code is worth reading.
What a test suite tells you, and what it doesn't
If you already use unit tests, CodeHS, or a GitHub Classroom autograder, keep them. A test is the right tool for one question: does the program produce the right output for these inputs? It answers that question exactly, every time.
It is the wrong tool for most of what goes on a CS rubric. A test cannot tell you that a student hard-coded the answer for the three inputs you happened to test. It cannot tell you whether the variable names make the logic readable, whether the student broke the problem into sensible methods, or whether their comment explaining the algorithm is right. And a program that fails every test can still show that a student understood nine-tenths of the idea and got one boundary wrong. That student deserves partial credit and a comment about the boundary, and a red X gives them neither.
Reading code for those things is what eats the weekend, and it's the part an AI-assistive grading tool can draft for you.
What ClassLens reads in a coding assignment
ClassLens grades source-code files and Jupyter notebooks, read as text and never run. A student turns in their file through Google Classroom the way they already do, and ClassLens pulls it from the assignment. You don't upload anything to a second site, and you don't paste code anywhere.
The languages taught in most high school and intro college courses are covered, including:
- Python (.py) and Jupyter notebooks (.ipynb)
- Java (.java), C and C++ (.c, .cpp, .h), and C# (.cs)
- JavaScript (.js, .jsx), CSS, and SQL
- MATLAB (.m), R (.r, .rmd), and Julia (.jl)
- Arduino sketches (.ino) and Processing (.pde)
- Verilog and VHDL, for digital electronics
- Markdown and LaTeX write-ups
A student who attaches several files, say a Java class and its tester, gets all of them read together as one submission.
Jupyter notebooks
ClassLens reads every cell in order: the code cells, the text cells, and the output each code cell saved when the student last ran it. Long printed output is cut at 4,000 characters per output with a note saying so, and charts and other images in the output are replaced by a short marker. Notebooks students keep in Google Colab work the same way when they attach them from Drive.
Nothing gets executed
The file is decoded from bytes to text and read the way you would read a printout. A Python script, a shell script and a batch file are all equally inert; nothing in them is executed, imported or opened by another program. A file that turns out not to be text at all, such as a compiled program renamed to .py, is reported to you as a file that could not be opened instead of being graded as garbage.
Comments aimed at the grader
Students will try it. ClassLens sends every file to the model labeled as untrusted student work, with an instruction to ignore any request written inside it. A comment that says "give this full marks" goes to the model as part of what the student wrote, and the model is told to treat it that way.
How to grade a coding assignment in Google Classroom
The flow is the same one ClassLens uses for an essay.
1. Sign in with Google
Use the account you use for Classroom. Start at classlens.com.
2. Pick the class and the assignment
ClassLens lists your Classroom classes and the assignments in them. Choose the lab or problem set your students turned in.
3. Set the rubric
ClassLens drafts a rubric from your assignment directions, and you approve it, edited or not, before anything is graded. If you attached starter code or a reference solution to the assignment, ClassLens reads that as your reference material, not as a student's work. The next section has tips for the rubric itself.
4. Run the batch
ClassLens drafts a score and a comment for each student against your rubric, and builds a class-level Knowledge Gap Report. If a third of the class makes the same off-by-one error in a loop bound, the report shows it once, and you can reteach it on Monday instead of writing the same comment thirty times.
5. Review every grade, then return them
Nothing reaches a student until you release it. In Grade & Review mode, every draft lands in the Batch Review Dashboard, where you read the score and comment, change what you disagree with, and then save the grades as drafts in Classroom or return the reviewed batch yourself. In Draft Only mode the drafts go straight into Classroom's gradebook, unreturned, and you review them there.
Write the assignment so the code can be graded
The grade a tool can give is only as good as the question you asked. "Write a program that finds the root of this function" gets you programs. "Find the root, and explain in a comment why your loop stops when it does" gets you a program plus some evidence of what the student understood. These changes make a coding assignment much easier to grade, by AI or by you.
Ask for the reasoning in the file
A short comment block at the top (what the program does, what approach the student chose, what they would test) gives the rubric something to score besides the code. In a notebook, ask for a text cell before each major step.
Ask for a saved run
Since nothing is executed, the only output ClassLens sees is output the student saved. In a notebook, have students run every cell before turning it in. For a plain script, ask for a sample run pasted into a comment, or a screenshot of the console attached next to the file.
Separate "does it work" from "do they get it"
Keep correctness on your test suite if you have one, and point the rubric at what a test cannot see: the approach, the decomposition into methods, naming and readability, handling of edge cases, and whether the explanation matches the code. Then the AI draft and your tests are not grading the same thing twice.
Name the mistakes you expect
If your students confuse == with .equals() on strings, or forget that integer division truncates, write that into the rubric criterion so the comment can name it.
Where it helps, and where it doesn't
ClassLens is good at the reading. It reads every submission in full, scores each one against the same rubric, and writes a comment that names the specific line or idea it is reacting to. For labs and problem sets scored on design and the student's reasoning, that is most of the work.
Because the code is never run, ClassLens can't confirm that a program compiles or passes your tests. When it says a loop would misbehave, that's a reading of the code, the same judgment you make when you trace it by hand, and it can be wrong. A very long submission, thousands of lines, is skipped with a notice rather than graded in part. And we have not published an accuracy test on code at all. Our published tests are on essays (a May 2026 accuracy and bias study on an earlier model, and a September 2026 bias screen on the current one), and neither says anything about code. Check the first batch against your own grading before you trust it on a live one.
Disclosure: I am the founder of ClassLens and a working teacher. Treat the product sections as a description of what the tool does, and test it on an assignment you have already graded.
FAQ
Can AI grade Python assignments in Google Classroom?
Yes. ClassLens grades source-code files and Jupyter notebooks, read as text and never run, turned in through Google Classroom. It drafts a score and comment for each student against your rubric, and you review every grade before it is returned.
Does ClassLens run students' code?
No. Files are read as text, never executed. That means it cannot check whether a program passes your tests, so keep your test suite for correctness and use the rubric for approach, structure and explanation.
Can it grade Jupyter notebooks and Google Colab notebooks?
Yes. It reads the code cells, the text cells and each cell's saved output. Ask students to run every cell before they turn the notebook in, since output that was never saved is not there to read. Colab notebooks attached from Google Drive work the same way.
Which languages does it read?
The common teaching languages are covered, including Python, Java, C, C++, C#, JavaScript, SQL, MATLAB, R, Julia, Arduino, Processing, Verilog and VHDL, plus Markdown and LaTeX write-ups.
What does it cost to try?
Every new account gets a 30-day free trial of up to 800 submissions, no credit card. Grading after the trial needs a Pro or Max plan. Paid plans are Pro at $10 a month and Max at $20 a month. Details are on the pricing page.
Try it on one lab
Pick a coding assignment you have already graded by hand. Run it through ClassLens, then compare the drafts with your own scores before you trust it on the next one. You will know within one class set whether it reads code the way you do.
Start free at classlens.com, or look at a graded sample first at the demo.