Pseudocode for Computer Science GCSE and A Level
Pseudocode for Computer Science GCSE and A Level is supposed to provide a way of describing algorithms which is simple, clear, unambiguous and language-agnostic.
However, we have a language which meets 3 of these criteria already – Python!!
As for the fourth, Python syntax is so clear that the intent of an algorithm written using it is generally obvious. And here’s the thing – it’s usually much clearer than the same algorithm expressed in exam-board pseudocode! In my view, the pseudocode required for all the Computer Science GCSE and A Level exam boards is a hindrance rather than a help to students learning to program and to write and understand algorithms.
Not to pick on any exam board particularly but seriously:
SEND ‘Have a good day.’ TO DISPLAY
print("Have a good day")
RECEIVE Name FROM (STRING) KEYBOARD
name = input() # str
What is the benefit?
Or how about this from CIE GCSE?
HighestMidday ← -999 FOR Count ← 1 TO 7 IF MiddayTemperature [Count] > HighestMidday THEN HighestMidday ← MiddayTemperature[Count] MiddayMonthDay/MiddayWeekday ← Count ENDIF NEXT Count PRINT 'The highest midday temperature was ',HighestMidday, ' on day ', Count
(Mark scheme indentation.)
Does it really meet the requirements for clarity and simplicity?
There is an historic reason for the horribleness of exam-board pseudocode: Visual Basic. Many, if not all, of the exam boards use a form of pseudocode which dates back to Visual Basic syntax.
It’s a bit like the argument about learning Latin vs learning Spanish, which is an immensely more useful language for most purposes, yet is much easier and has similar vocabulary, hence paving the way for those who wish to study Latin later on. Except for one thing – exam board pseudocode doesn’t have any use beyond the introductory level at which is is supposed to be used.
So why oh why do they insist on making students learn a more difficult and convoluted way to express algorithms than that offered by an incredibly popular and highly regarded existing language which they are already learning anyway???
An example of Useful Pseudocode
Now having said that, pseudocode CAN very useful. It just needs to be done at a level where is is actually worth doing, and in a syntax that is relevant to modern programming languages.
Take this example:
from My Code School.
If there were a fully supported and recognised qualification for students that focused on actual programming/software development, then I believe the effective use of pseudocode could be valuably included.
So what to do? Well, I think exam boards should remove pseudocode from the Computer Science GCSE and A Level syllabuses.
While the exam boards insist on students learning pseudocode, I recommend the following approach: just get good at programming and then memorise the syntax for your particular exam board’s pseudocode and practice translating you code into that.
There are some great things about GCSE Computer Science and A Level Computer Science, but pseudocode is not one of them in my opinion.
Here’s a couple of pseudocode guides for reference:
Let me know in the comments how you feel about exam-board pseudocode for Computer Science GCSE and A Level.