Pseudocode
In short: An informal, language-independent notation for describing an algorithm’s flow, without sticking to the syntax of a specific programming language.
In more detail: Uses constructs like “if”, “while”, “for each element” in a mix of natural language and programming logic. Serves to plan or communicate a solution approach before translating it into real source code — especially useful for discussing logic independently of language details.
In Depth
FUNCTION isEven(number)
IF number MOD 2 = 0 THEN
RETURN true
ELSE
RETURN false
END IF
END FUNCTION
There’s no fixed, standardised syntax for pseudocode — everyone writes it in the form that’s clearest for the given purpose, often modelled on the structure of a familiar programming language, but without sticking to its exact rules (no mandatory semicolons, no strict bracketing, natural-language expressions allowed). What matters is only that the FLOW of the logic remains clearly traceable.
Pseudocode is typically used in two situations: during design, to think through a solution before wrestling with concrete language syntax, and in textbooks/algorithm descriptions, to explain a method independently of language (e.g. a sorting algorithm that can later be implemented in Java, Python or any other language). The transition from pseudocode to real source code then essentially consists of replacing the informal notation with the exact syntax of the target language.
Pseudocode in IHK exam preparation
In IT specialist training, pseudocode frequently appears in exam questions, because it allows testing algorithm understanding without committing to a particular programming language taught in class — a candidate who mainly learned Java, for example, should still be able to follow an algorithm described in pseudocode and translate it into their own words or their own code. What matters for the exam is less the exact notation than correctly understanding control structures (loops, branches) and their order.
Distinction from flowcharts
Closely related to, but not identical with, pseudocode are flowcharts (a graphical representation of an algorithm with boxes and arrows) — both serve the same purpose (describing an algorithm independently of a specific language); pseudocode is text-based and better suited for more complex logic with many variables, while flowcharts often visualise the basic control flow more intuitively, but quickly become cluttered with complex logic. In practice, both notation forms are used depending on purpose and personal preference, sometimes combined (a rough flowchart for the overall structure, pseudocode for the details of individual steps).
Typical notation conventions
Even though there’s no binding standard, some recurring conventions have become established: keywords like IF/THEN/ELSE, WHILE, FOR EACH are often written in capital letters, to visually set them apart from variable names, indentation shows nesting like in real code, and assignments are often written with ← instead of =, to clearly distinguish them from an equality comparison — a detail that sometimes causes confusion in real programming languages (where = often means assignment AND == comparison).
See also: Source Code, Algorithms