Overview

DDC Style Guide: Pseudocode

Expressing algorithms in unambiguous, programming-language-agnostic terms.

A number of tasks in this bootcamp focus on reading or writing pseudocode. Pseudocode is a set of practices and notational conventions used to express computational processes in a non-programming-language-specific form, but usually with the aim of facilitating or documentating implementation in one or more programming languages.

Pseudocode shares its primary aim with flowcharting: expression of a procedure in a clear, unambigous form, built on a relatively small vocabulary of symbols that a reader may be assumed to know. Pseudocode differs from flowcharting primarily in the emphasis on a textual, rather than graphical, representation of the process or algorithm. Another difference is that while flowchart symbols are mostly standardized, there isn’t a formal or de facto standard syntax for pseudocode; instead, pseudocode typically employs a combination of natural language and mathematical notation.

The guidelines and rules below have been formulated with the following aims in mind:

Note that there are recognized experts in the fields of computer science and software engineering who advocate the use of programming language code over pseudocode. For example, Robert Sedgewick, the author or co-author of several influentual texts on algorithms, has recommended the Java language for expressing algorithms, even when the intended implementation is in other languages. Nonetheless, we find significant value in the practice of writing pseudocode, and the inclusion of pseudocode in technical documentation.

Section contents