Describing how an algorithm should work. Pseudocode can illustrate where a particular construct, mechanism, or technique could or must appear in a program. Explaining a computing process to less-technical users. Computers need a very strict input syntax to run a program, but humans (especially non-programmers) may find it easier to understand a more fluid, subjective language that clearly states the purpose of each line of code. Designing code in a group setting. High-level software architects will often include pseudocode in their design process to help solve a complex problem they see their programmers running into. If you are developing a program with other coders, you may find that pseudocode helps make your intentions clear.

If you are working with others on a project—whether they are your peers, junior programmers, or non-technical collaborators—it is important to use at least some standard structures so that everyone else can easily understand your intent. If you are enrolled in a programming course at a university, a coding camp, or a company, you will likely be tested against a taught pseudocode “standard”. This standard often varies between institutions and teachers.

You can use pen and paper to write your pseudocode! Try different formats to find what works best for your creative programming process.

For example, a section of pseudocode that discusses entering a number should all be in the same “block”, while the next section (e. g. , the section that discusses the output) should be in a different block.

For example, if you use “if” and “then” commands in your pseudocode, you might want to change them to read “IF” and “THEN” (e. g. , “IF THEN”).

This will make writing the actual code easier, since your code will run top-down.

if CONDITION then INSTRUCTION — This means that a given instruction will only be conducted if a given condition is true. “Instruction”, in this case, means a step that the program will perform, while “condition” means that the data must meet a certain set of criteria before the program takes action. [3] X Research source while CONDITION do INSTRUCTION — This means that the instruction should be repeated again and again until the condition is no longer true. [4] X Research source do INSTRUCTION while CONDITION — This is very similar to “while CONDITION do INSTRUCTION”. In the first case, the condition is checked before the instruction is conducted, but in the second case the instruction will be conducted first; thus, in the second case, INSTRUCTION will be conducted at least one time. function NAME (ARGUMENTS): INSTRUCTION — This means that every time a certain name is used in the code, it is an abbreviation for a certain instruction. “Arguments” are lists of variables that you can use to clarify the instruction.

Brackets—both square [code] and curly {code}—can help contain long segments of pseudocode. When coding, you can add comments by typing “//” on the left side of the comment (e. g. , //This is a temporary step. ). You can use this same method when writing pseudocode to leave notes that don’t fit into the coding text.

Would this pseudocode be understood by someone who isn’t familiar with the process? Is the pseudocode written in such a way that it will be easy to translate it into a computing language? Does the pseudocode describe the complete process without leaving anything out? Is every object name used in the pseudocode clearly understood by the target audience? If you find that a section of pseudocode needs elaboration or it doesn’t explicitly outline a step that someone else might forget, go back and add the necessary information.