Answers.Body: <p>While I think that it is correct that a professional programmer does not need pseudo code (as other high level languages are available), and that management should not encourage programmers to design in pseudo code. I do think that there is value in education.</p>
  <h1>Some exam bodies views</h1>
  <h2>AQA</h2>
  <p>“Questions in the written examination that involve code will use this pseudo code for clarity and consistency. However, students may answer these
  questions in any valid format.” — <a href="http://filestore.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF" rel="nofollow noreferrer">http://filestore.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF</a></p>
  <p>AQA have also stated that they have tested there pseudo code, by building a compiler. And that they compile and test all code that is used in questions.</p>
  <h2>OCR</h2>
  <p>“The following guide shows the format pseudocode will appear in the examined components. It is provided to enable teachers to provide learners with familiarity before the exam. Learners are
  not expected to memorise the syntax of this pseudocode and when asked may provide answers in any style of pseudocode they choose providing its meaning could be reasonably inferred by a
  competent programmer.” — <a href="http://www.ocr.org.uk/Images/260952-pseudocode-guide-teacher-guide.pdf" rel="nofollow noreferrer">http://www.ocr.org.uk/Images/260952-pseudocode-guide-teacher-guide.pdf</a></p>
  <h2>WJEC</h2>
  <p>“Is there an agreed convention for writing pseudo code in this course?
  There is no agreed convention, and appropriate pseudocode is rewarded with
  marks.” — (Can't find link)</p>
  <h2>Summary</h2>
  <p>Therefore these exam boards do not insist that students write in pseudo code, an answer in python can receive the same marks. Pseudo code is just the exam boards way of having one language for all in questions, and of being lenient on syntax of answers. AQA's (and may be the others) pseudo code, as used in questions, is a real high level language, nothing pseudo about it.</p>
  <h1>A learning perspective.</h1>
  <p>Just as pseudo code was useful in the past, before compilable high-level languages existed. It is of equal value today when learning your first language. For a learner, they have no compilable high-level languages available, as this is what they are learning. Therefore it can be useful to be able to express themselves in pseudo code.</p>
  <p>When I was learning to program, I would first write it in pseudo code, then convert it into comments, and then one line at a time translate it into the language that I was learning. This translation phase, involved a lot of looking stuff up in a book. I still sometimes, but infrequently, do this.</p>
  <p>It is important though to note, there is no point in formally learning a pseudo code. This results in the boot-strap problem (we learn a to help us learn b, but first we have to learn a, but a is no easier to learn than b).
  The pseudo code that the student uses will evolve, to become more and more like the language that they are learning, and will become less and less used.</p>
  
Answers.ContentLicense: CC BY-SA 4.0
Answers.CreationDate: 2019-12-24T10:56:06.340Z
Answers.Text: In the now OCR spec, they have changed most references to pseudo code to (some thing like) reference language.
Answers.UserDisplayName: ctrl-alt-delor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T12:50:26.970Z
Answers.LastActivityDate: 2017-10-03T09:58:33.727Z
Answers.LastEditDate: 2020-06-18T08:36:57.023Z
Answers.UserDisplayName: ctrl-alt-delor
Answers.Body: <p>Yes, definitely. There is a need, while developing an algorithm, for a language (or diagramming technique) that is less precise and requires less detail than a formal programming language. This is to let the developer expand his/her thoughts from an overall view to one that is more and more refined. This is true even for high-level languages, though the language itself may be useful for that given a test-first design methodology and good tools. </p>
  
  <p>A pseudo-code is also useful for presenting algorithms in a language neutral way so that implementers may build to suit a need in the language of their choice. </p>
  
  <p>I note, especially, that <a href="https://rads.stackoverflow.com/amzn/click/038790641X" rel="noreferrer"><em>The Science of Programming</em></a> by David Gries uses such a pseudo code throughout. The code is defined in the book and fairly precise, though leaves out many details needed for implementation. It is the same language, in fact, that Edsger Dijkstra used in his papers. I used several variations on it as the basis of a compiler course for many years. The Gries book should be on the bookshelf (and in the mind) of every serious computer scientist, and most programmers. </p>
  
  <hr>
  
  <p>Programming involves several tasks at different levels of abstraction. A good pseudocode lets a programmer focus first on the overall, high level, concepts, without having to change focus, or get distracted by, the lower level details needed for implementation. Even if you use "misspelled java" as your pseudocode you have gained this separation of concerns as long as your development environment doesn't complain too visibly or loudly as you go. </p>
  
  <p>Teaching this separation of concerns to students, via some formal or informal pseudocode, is a way to get them to develop algorithms from the outside-in rather from the top-down (i.e. top of page to bottom of page). That is to say, from the general to the specific, rather from the first statement to the last. Some students seem to want to work in that way initially. The sooner they develop better habits, the sooner they can progress. </p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T13:12:15.543Z
Answers.Text: Yes, when reading this, is realised that as a professional developer I have **sometimes** invented a Domain Specific Language, and used that to help me design a program. Because I had not written a compiler for it, it was a pseudo-code.
Answers.UserDisplayName: ctrl-alt-delor
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-10-01T21:18:54.333Z
Answers.Text: Sometimes, I have wondered if pseudocode is actually more useful to students who have learned basic programming rather than complete beginners. To be able to write good pseudocode, the programmer needs to be able to pinpoint the appropriate level of abstraction which is something beginners have a hard time doing.
Answers.UserDisplayName: fnurl
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T13:07:27.867Z
Answers.LastActivityDate: 2017-09-28T14:26:12.303Z
Answers.LastEditDate: 2017-09-28T14:26:12.303Z
Answers.UserDisplayName: Buffy
Answers.Body: <p>Pseudo-code allows expressing that an algorithm to solve some problem is not the same as the syntax (formatting, punctuation abuse, etc.) required to make any particular compiler or interpreter happy.  </p>
  
  <p>Pseudo-code is also suitable for algorithms using data types that are not directly expressible in a standard programming language, such as real physical objects with the kids in the room acting as the operators and sequencers, etc.</p>
  
  <p>It also requires less writing (characters, punctuation) on a chalkboard/whiteboard.</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2017-09-28T16:40:38.077Z
Answers.LastActivityDate: 2017-09-28T16:40:38.077Z
Answers.UserDisplayName: hotpaw2
Body: <p>Before becoming a teacher, I believed that pseudo code was a relic from the past (see also <a href="https://cseducators.stackexchange.com/q/3696/204">my question on goto and flowcharts</a>):</p>
  
  <p>When all you have is assembler language, Fortran, and Cobol, and no one has invented a compiler for a structured languages, then you need to write pseudo code. That is write in a high-level language, and compile it by hand. Now we can write it in a high-level language and get the machine to compile it, so is there a need for pseudo code?</p>
  
  <hr>
  
  <p>Note I have now changed my view, somewhat, on pseudo code, but not on flowcharts and goto see my answer below. Please add your own answer, if you have I different perspective.</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-09-28T14:50:19.767Z
Comments.Text: I feel this question is lacking a clear definition... Is your Pseudo-Code just a weakly structured language with implicit gap filling? The Arm Architecture defines a formalised Pseudo-Code which is used to completely describe the architecture...
Comments.UserDisplayName: Sean Houlihane
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2017-10-03T10:00:23.830Z
Comments.Text: sudo code: “The command you type to get the computer to do a task as admin?” — One pupil of mine.
Comments.UserDisplayName: ctrl-alt-delor
Tags: <pseudo-code>
Title: Is there any value in teaching pseudo code?
ThreadText: # Is there any value in teaching pseudo code?
  
  (Asked by: username_0 on 2017-09-28)
  
  Before becoming a teacher, I believed that pseudo code was a relic from the past (see also [my question on goto and flowcharts](https://cseducators.stackexchange.com/q/3696/204)):
  
  When all you have is assembler language, Fortran, and Cobol, and no one has invented a compiler for a structured languages, then you need to write pseudo code. That is write in a high-level language, and compile it by hand. Now we can write it in a high-level language and get the machine to compile it, so is there a need for pseudo code?
  
  ---
  
  Note I have now changed my view, somewhat, on pseudo code, but not on flowcharts and goto see my answer below. Please add your own answer, if you have I different perspective.
  
  **Tags:** pseudo-code
  
  > **Comments:**
  > **username_1**: I feel this question is lacking a clear definition... Is your Pseudo-Code just a weakly structured language with implicit gap filling? The Arm Architecture defines a formalised Pseudo-Code which is used to completely describe the architecture...  
  > **username_0**: sudo code: “The command you type to get the computer to do a task as admin?” — One pupil of mine.  
  
  ---
  
  ## 3 answers
  
  ### Answer by username_2 on 2017-09-28. Score: 7 | Accepted answer
  
  Yes, definitely. There is a need, while developing an algorithm, for a language (or diagramming technique) that is less precise and requires less detail than a formal programming language. This is to let the developer expand his/her thoughts from an overall view to one that is more and more refined. This is true even for high-level languages, though the language itself may be useful for that given a test-first design methodology and good tools.
  
  A pseudo-code is also useful for presenting algorithms in a language neutral way so that implementers may build to suit a need in the language of their choice.
  
  I note, especially, that [*The Science of Programming*](https://rads.stackoverflow.com/amzn/click/038790641X) by David Gries uses such a pseudo code throughout. The code is defined in the book and fairly precise, though leaves out many details needed for implementation. It is the same language, in fact, that Edsger Dijkstra used in his papers. I used several variations on it as the basis of a compiler course for many years. The Gries book should be on the bookshelf (and in the mind) of every serious computer scientist, and most programmers.
  
  ---
  
  Programming involves several tasks at different levels of abstraction. A good pseudocode lets a programmer focus first on the overall, high level, concepts, without having to change focus, or get distracted by, the lower level details needed for implementation. Even if you use "misspelled java" as your pseudocode you have gained this separation of concerns as long as your development environment doesn't complain too visibly or loudly as you go.
  
  Teaching this separation of concerns to students, via some formal or informal pseudocode, is a way to get them to develop algorithms from the outside-in rather from the top-down (i.e. top of page to bottom of page). That is to say, from the general to the specific, rather from the first statement to the last. Some students seem to want to work in that way initially. The sooner they develop better habits, the sooner they can progress.
  
  > **Comments:**
  > **username_0**: Yes, when reading this, is realised that as a professional developer I have **sometimes** invented a Domain Specific Language, and used that to help me design a program. Because I had not written a compiler for it, it was a pseudo-code.  
  > **username_3**: Sometimes, I have wondered if pseudocode is actually more useful to students who have learned basic programming rather than complete beginners. To be able to write good pseudocode, the programmer needs to be able to pinpoint the appropriate level of abstraction which is something beginners have a hard time doing.  
  
  ---
  
  ### Answer by username_4 on 2017-09-28. Score: 4
  
  Pseudo-code allows expressing that an algorithm to solve some problem is not the same as the syntax (formatting, punctuation abuse, etc.) required to make any particular compiler or interpreter happy.
  
  Pseudo-code is also suitable for algorithms using data types that are not directly expressible in a standard programming language, such as real physical objects with the kids in the room acting as the operators and sequencers, etc.
  
  It also requires less writing (characters, punctuation) on a chalkboard/whiteboard.
  
  
  ---
  
  ### Answer by username_0 on 2017-09-28. Score: 1
  
  While I think that it is correct that a professional programmer does not need pseudo code (as other high level languages are available), and that management should not encourage programmers to design in pseudo code. I do think that there is value in education.
  
  # Some exam bodies views
  
  ## AQA
  
  “Questions in the written examination that involve code will use this pseudo code for clarity and consistency. However, students may answer these
  questions in any valid format.” — <http://filestore.aqa.org.uk/subjects/AQA-GCSE-COMPSCI-W-TRB-PSEU.PDF>
  
  AQA have also stated that they have tested there pseudo code, by building a compiler. And that they compile and test all code that is used in questions.
  
  ## OCR
  
  “The following guide shows the format pseudocode will appear in the examined components. It is provided to enable teachers to provide learners with familiarity before the exam. Learners are
  not expected to memorise the syntax of this pseudocode and when asked may provide answers in any style of pseudocode they choose providing its meaning could be reasonably inferred by a
  competent programmer.” — <http://www.ocr.org.uk/Images/260952-pseudocode-guide-teacher-guide.pdf>
  
  ## WJEC
  
  “Is there an agreed convention for writing pseudo code in this course?
  There is no agreed convention, and appropriate pseudocode is rewarded with
  marks.” — (Can't find link)
  
  ## Summary
  
  Therefore these exam boards do not insist that students write in pseudo code, an answer in python can receive the same marks. Pseudo code is just the exam boards way of having one language for all in questions, and of being lenient on syntax of answers. AQA's (and may be the others) pseudo code, as used in questions, is a real high level language, nothing pseudo about it.
  
  # A learning perspective.
  
  Just as pseudo code was useful in the past, before compilable high-level languages existed. It is of equal value today when learning your first language. For a learner, they have no compilable high-level languages available, as this is what they are learning. Therefore it can be useful to be able to express themselves in pseudo code.
  
  When I was learning to program, I would first write it in pseudo code, then convert it into comments, and then one line at a time translate it into the language that I was learning. This translation phase, involved a lot of looking stuff up in a book. I still sometimes, but infrequently, do this.
  
  It is important though to note, there is no point in formally learning a pseudo code. This results in the boot-strap problem (we learn a to help us learn b, but first we have to learn a, but a is no easier to learn than b).
  The pseudo code that the student uses will evolve, to become more and more like the language that they are learning, and will become less and less used.
  
  > **Comments:**
  > **username_0**: In the now OCR spec, they have changed most references to pseudo code to (some thing like) reference language.  
  
  ---
  
  