As part of an upcoming exam I’ve got to write sections of code in the language we were taught. We’ve had to do this kind of thing before, at school, and I’ve been fine with it. This as a method to access ones programming ability just seems to me to be so fundamentally flawed.
If you’ve ever written any kind of program you’ll know that it’s rare to get it spot on first time - perhaps never on the first time. We’re taught this is fine, even good. We’re taught how to test programs and rollback to prior versions to fix errors - mistakes are a given and it’s our job to fix them.
This may be different if you were to only write in one language at any time but for students, like me, you’re often learning more than one new language and it’s easy to mix up the different syntaxes. New languages are designed similarly to older ones to make them easily picked up but because of this it can get rather confusing.
These kind of problems though are easily sorted at a computer though, a reminder is nearly always just a quick Google search away. In exams though you don’t have a computer, it’s just you and your paper.
This brings in many different biases and creates a rather inadequate assessment in my opinion.
First off, you don’t have access to the tools that are always present when you’re working in the real world - no auto-complete, no reference - basically no help. This means that you have to write perfectly executable code, on paper with no aids. Like taking a language writing exam with no dictionary.
That’s not the only problem, the lack of help I can live with but the inability to check your solution’s correctness is just far too false. When you write a solution you’re always running it, reading the exceptions and making adjustments - it’s all part of the skill. I would even argue that the ability to fix errors is of greater value than memorising syntax. It’s more than knowledge, it’s a way of thinking about a problem where exceptions are like clues to the mystery. It also transfers well between environments which only makes it all the more valuable.
To be able to pass the programming questions with top marks you basically need a photographic memory because it must be executable. This means that even if you have all the ‘steps’ (even all the lines) included you can still loose marks for the wrong kind of parentheses! In a French test for example you should loose marks for wrong words as it makes it less understandable. Here though, answers with mistakes that would be fixed by auto correction or easily spotted after a trial run should still be able to claim full marks.
I personally think that the only way to test programming ability is by judging a completed project. There is nothing to be gained from blocking internet access or preventing discussion - plagiarism is always obvious too. In recruitment candidates can be asked to write code at the interview - how often do you think this is done in a silent exam hall with pen and paper?