a "fake" programming language often used in the design phase of writing a program. Consists of (usually) English words in steps that should translate easily to real code. There are no formal rules for what pseudocode should look like.

Sometimes called 'pidgin'.

Informal 'rules' of Pseudocode, as I have seen in practice:

Writing in pseudocode is a good idea for beginning programmers, because it allows them to express an algorithm or other method in a combination of natural language and computer language; however, as the programmer becomes more experienced, it is easier for him or her (and in fact it makes more since to him or her) to express ideas in a programming language. This could lead to the problem of talking in code.

As already mentioned, pseudocode can be written in many ways. Often pseudocode is used by experienced programmers (at least those that I know) to express individual algorithms or ideas that will be used in a variety of languages. An example would be the traditional bubble sort (or sink sort as it should be called), which is a decent way of sorting items and will work in virtually all languages.

When a programmer designs their own algorithm, they may tend to remember it in pseudocode, especially if it was designed arbitrarily in their head, as opposed to on a computer. An example might be the pseudocode for a prime number finder:

begin function isprime(number)
   make counter var as longint
   make factorcount var as shortint
   begin loop from 1 to number
       check if modulus of number by counter is 0
            if so, add one to factor count
   end loop
   check if factor count is greater than 2
       if so, return false
   else return true
end function

The above is, of course, somewhat verbose. It could be abbreviated, which will often lead to it just being written in code. The above is extremely simple in C++ or Pascal and is not necessarily a good candidate for pseudocode description.

Log in or register to write something here or to contact authors.