Approach – Pseudocode vs. Reference Language

Summary of Approach

A standardised reference language is used in Scottish Computing Science exams. This language is a formal language with a clear structure.  It is essential for students sitting Scottish CS exams to be able to read and understand the Reference Language.  Although it looks very similar to pseudocode, the fact that the reference language is formal means that it is not pseudocode.

The primary purpose for introducing the SQA Reference Language (also known as ‘Haggis’) is not well-understood, and hence has caused much frustration amongst teachers.  Its original description by SQA as a “SQA Pseudocode” was a major problem, as there are two purposes for pseudocode: as an informal, semi-natural, planning language; and as a formally-defined, language independent, notation for describing algorithms such as might be found in a text-book.  Many teachers have believed they should be using the Reference Language in program planning – this is not the case.  The Reference Language does in fact underpin a key developmental step in learning programming – the ability to explain one’s understanding of how programming language code works – highlighted as crucial in a number of research results.


  • SQA courses require candidates to be able to explain code.
  • Code can be explained at two levels (think of the Block Model, described elsewhere on this site):
    • How the individual programming language constructs operate individually and in combination
    • How the various parts of a whole program work together to solve a particular problem
  • Research results indicate that being able to explain code at the first of these levels is a key stepping stone to being able to explain code at the second level, and also to solving problems.
  • SQA do not prescribe one programming language to be used by centres; however, examining code explaining skills at this first level does require a formally-defined programming language
  • The SQA Reference Language / ‘Haggis’ is a formally-defined language to be used for this kind of precise code explaining – a single notation shared across all centres, examiners and pupils.


Slides here.

Screencast to come…

Limitations and Benefits

  • (–)  The SQA Reference Language is required because SQA do not mandate a single programming language for use in their courses.  The code explaining skills required for the Reference Language are the same as those required for any other (formally-defined) programming language.  Hence the need for candidates to learn a second language is purely a result of the SQA’s decision not to specify particular programming languages.
  • (++)  Learning two programming languages can help a learner to develop a deeper understanding of the underlying concepts separate from the particular syntaxes used.  This will strengthen the learner’s ability to pick up new languages – a key skills in computing.
  • (++)  The whole Reference Language issue highlights key challenges in learning to program: that the underlying operation of the language constructs must be thoroughly understood; and also how those constructs are combined together to solve problems.

PLAN C Techniques

We have come across two main ways in which teachers have incorporated the Reference Language into their teaching

  1. Since the Reference Language was designed for assessing code understanding in SQA exams, some teachers don’t introduce it until just before the exam.  First teach code explaining, problem solving, etc. with your preferred programming language first, then only introducing the Reference Language once the core understandings are in place.  Make sure you show your pupils the link from the programming language they have learned across to the Reference Language.
  2. An alternative approach is to introduce each new programming concept using the Reference Language itself, then show it in the ‘real’ language. Since the Reference Language was specifically designed for readability, it may be easier to pick up the core purpose of the concept using it rather than using the minimalist syntax of a mainstream language.

Reasons for Recommendation


Teacher Experiences of Benefits

“I have tried both approaches of when to introduce the reference language to my pupils’.  I actually felt that there were no major differences in the final outcomes.”

Mr C Henderson, Arbroath Academy, Angus Council

Research References

Cutts, Q., Connor, R., Michaelson, G. and Donaldson, P. (2014) “Code or (not Code): Separating Formal and Natural Language in CS Education” in Proceedings of WIPSCE 14, the 9th Workshop in Primary and Secondary Computing Education, Berlin, Germany, Nov. 2014.


You may also like...

Leave a Reply

Your email address will not be published. Required fields are marked *