<p>Like the OP, I teach CS at a community college, and I've seen this behavior a number of times in the past few years. It's almost surely cheating with some internet-connected device. Another possibility is if test questions are recycled, almost-memorizing a solution by rote beforehand. The student will copy by sight a received solution, not get the details right, and not even be aware of the need to compile or test a solution.</p>
<p>Related behaviors (in a proctored test) will include:</p>
<ul>
<li>Staring at the test, motionless and without any activity, until the last few minutes when the almost-perfect solution is suddenly written in a flurry.</li>
<li>Fiddling with one's watch repetitively, when there's a clock on both the desktop and the wall directly in front of the student (again, without doing any work, and then suddenly receiving a nearly-perfect answer).</li>
<li>Vocally expressing shock if some recognizable pattern of test forms in a semester is unexpectedly broken, and being unable to write any code for that particular test.</li>
<li>A student on a final exam today (as I write this) downloaded a prior assignment, but didn't dare do more than briefly glance at it for most of the test. In the last 20 minutes they got desperate enough to leave it onscreen for a closer inspection, at which point I caught them. If I hadn't been watching very closely it might have ended in the same outcome.</li>
</ul>
<p>Among the responses I've had to implement in my in-class testing is to shut off and remove any kind of technology device (phones, earbuds, watches, calculators, etc.), monitor and record the screens of all the testing lab computers, to scramble content of test forms randomly, and be ready to relocate and closely watch students within the testing space.</p>
<p>Personally I tend not to be generous about grading such submissions. Given the IDE is available, (a) they should know to use the tool, (b) awareness of the need to compile and test is essential and fundamental, and (c) the likelihood of cheating warrants a strict assessment.</p>

CC BY-SA 4.0
2024-12-06T07:34:00.763Z
2024-12-10T00:25:10.893Z
2024-12-10T00:25:10.893Z
Daniel R. Collins
<p>I gave my students a timed open-book, open-notes coding exam.</p>
<p>One of the submissions had several syntax errors - very obvious ones and easy to fix - missing semicolons and misspelled type names.</p>
<p>I added the missing semicolons and fixed all the misspelling, and now the code is almost perfect. All the calculations are correct, all the input validation is correct...</p>
<p>How is that possible?</p>
<p>The problem was complex enough that I can't imagine it's possible for an intro student to write correct solution without ever running it.</p>
<p>This is an intro course, so syntax errors don't mean automatic 0. I was going to give the student credit for those functions they implemented correctly.</p>

CC BY-SA 4.0
2024-11-18T11:24:18.320Z
Does the student have neurological issues; something like dyslexia? There are some that affect motor actions, not just reading.
Buffy
CC BY-SA 4.0
2024-11-18T15:47:11.387Z
Is it possible that the code was written (and run) in a language variant that automatically inferred semicolons and had slightly different type names?
gidds
CC BY-SA 4.0
2024-11-19T00:57:40.147Z
Did the students have access to a compiler (or IDE) or were they just entering answer as text? If they were used to an IDE that may completed syntax/fixed small errors, that might explain their lack of attention if they were just just writing in an editor.
Fritz Sieker
CC BY-SA 4.0
2024-11-24T18:03:25.490Z
Students used IDE. Language is C++, misspelling "dooble" instead of "double" doesn't work anywhere..
Community College Teacher
CC BY-SA 4.0
2024-11-25T00:20:40.323Z
I would strongly suspect cheating.
user58697
CC BY-SA 4.0
2024-11-30T12:33:00.003Z
@Buffy even with neurological problems, the compiler will have generated error messages, so they must have known that there were problems.  I often see signs of code written without understanding (in open book limited time programming exercises with large numbers of students - bound to have students with dyslexia etc.) but very few of them submit code with obvious syntax errors that would be picked up by an IDE.
Dikran Marsupial
CC BY-SA 4.0
2024-11-30T12:59:04.800Z
It could be a very good student that wrote it without testing it as a "flex" (possibly knowing that it would be enough to get a satisfactory mark from their perspective)?
Dikran Marsupial
CC BY-SA 4.0
2024-12-07T07:04:49.447Z
Possibly relevant article on why low grades can be valid for almost-correct solutions: [A Tablespoon of Salt](https://welcometotheoryland.wordpress.com/2017/10/20/a-tablespoon-of-salt/)... assuming no cheating, which is plausible here but hard to say for sure.
ggorlen
<programming><exams><cheating>
How is this possible - code submission with multiple syntax errors, but otherwise works?
# How is this possible - code submission with multiple syntax errors, but otherwise works?

(Asked by: username_0 on 2024-11-18)

I gave my students a timed open-book, open-notes coding exam.

One of the submissions had several syntax errors - very obvious ones and easy to fix - missing semicolons and misspelled type names.

I added the missing semicolons and fixed all the misspelling, and now the code is almost perfect. All the calculations are correct, all the input validation is correct...

How is that possible?

The problem was complex enough that I can't imagine it's possible for an intro student to write correct solution without ever running it.

This is an intro course, so syntax errors don't mean automatic 0. I was going to give the student credit for those functions they implemented correctly.

**Tags:** programming, exams, cheating

> **Comments:**
> **username_1**: Does the student have neurological issues; something like dyslexia? There are some that affect motor actions, not just reading.  
> **username_2**: Is it possible that the code was written (and run) in a language variant that automatically inferred semicolons and had slightly different type names?  
> **username_3**: Did the students have access to a compiler (or IDE) or were they just entering answer as text? If they were used to an IDE that may completed syntax/fixed small errors, that might explain their lack of attention if they were just just writing in an editor.  
> **username_0**: Students used IDE. Language is C++, misspelling "dooble" instead of "double" doesn't work anywhere..  
> **username_4**: I would strongly suspect cheating.  
> **username_5**: @username_1 even with neurological problems, the compiler will have generated error messages, so they must have known that there were problems.  I often see signs of code written without understanding (in open book limited time programming exercises with large numbers of students - bound to have students with dyslexia etc.) but very few of them submit code with obvious syntax errors that would be picked up by an IDE.  
> **username_5**: It could be a very good student that wrote it without testing it as a "flex" (possibly knowing that it would be enough to get a satisfactory mark from their perspective)?  
> **username_6**: Possibly relevant article on why low grades can be valid for almost-correct solutions: [A Tablespoon of Salt](https://welcometotheoryland.wordpress.com/2017/10/20/a-tablespoon-of-salt/)... assuming no cheating, which is plausible here but hard to say for sure.  

---

## 1 answers

### Answer by username_7 on 2024-12-06. Score: 1

Like the OP, I teach CS at a community college, and I've seen this behavior a number of times in the past few years. It's almost surely cheating with some internet-connected device. Another possibility is if test questions are recycled, almost-memorizing a solution by rote beforehand. The student will copy by sight a received solution, not get the details right, and not even be aware of the need to compile or test a solution.

Related behaviors (in a proctored test) will include:

* Staring at the test, motionless and without any activity, until the last few minutes when the almost-perfect solution is suddenly written in a flurry.
* Fiddling with one's watch repetitively, when there's a clock on both the desktop and the wall directly in front of the student (again, without doing any work, and then suddenly receiving a nearly-perfect answer).
* Vocally expressing shock if some recognizable pattern of test forms in a semester is unexpectedly broken, and being unable to write any code for that particular test.
* A student on a final exam today (as I write this) downloaded a prior assignment, but didn't dare do more than briefly glance at it for most of the test. In the last 20 minutes they got desperate enough to leave it onscreen for a closer inspection, at which point I caught them. If I hadn't been watching very closely it might have ended in the same outcome.

Among the responses I've had to implement in my in-class testing is to shut off and remove any kind of technology device (phones, earbuds, watches, calculators, etc.), monitor and record the screens of all the testing lab computers, to scramble content of test forms randomly, and be ready to relocate and closely watch students within the testing space.

Personally I tend not to be generous about grading such submissions. Given the IDE is available, (a) they should know to use the tool, (b) awareness of the need to compile and test is essential and fundamental, and (c) the likelihood of cheating warrants a strict assessment.


---

