Everything2
Near Matches
Ignore Exact
Full Text
Everything2

Pseudocode

created by hsinclair

(thing) by hsinclair (?) (print)   ?   (I like it!) Sat Nov 13 1999 at 14:33:17

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.

(thing) by Codger (1.2 mon) (print)   ?   (I like it!) Sat Nov 13 1999 at 14:33:17

Sometimes called 'pidgin'.

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


(thing) by JeffMagnus (4.9 y) (print)   ?   (I like it!) Tue Feb 15 2000 at 17:45:09

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.

(thing) by The Narrator (3.6 y) (print)   ?   (I like it!) Wed Mar 21 2001 at 2:19:29

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.

printable version
chaos

pure How to say "else if" how to increase the size of an array baker's algorithm implementations
Donald Knuth Reversing a linked list Binary GCD algorithm no-wave
pidgin Treating registers as if they were variables C++: computing Fibonacci numbers at compile time The hidden evil in UPC bar codes
the use of = in online communication :(){:|:&};: Tetris pseudocode How your brain codes knowledge
function pointer MMIX Out-of-order execution kernel hacking
BASIC Dialects Barrett Reduction pervert How to tell when a journalist has no idea what they're talking about
Y'know, if you log in, you can write something here, or contact authors directly on the site. Create a New User if you don't already have an account.
  Epicenter
Login
Password

password reminder
register

Everything2 Help

Cool Staff Picks
What you are reading:
Henotheism in the Bible
Onion
Nothing new about Ancient Greece will be learned until the Vatican is plundered
The New Lady
United States 85, Lithuania 83
Mother Sauces
Metaphor is not disposable
Business Casual
Sealand
It is my nature to covet
Essence of Dad
Dvorak
A stitch in time saves nine
New Writeups
Glowing Fish
Tualatin River(place)
The Jacket
Words of Advice(idea)
John_Fox
Good Intentions Gone Wrong(person)
Cuckowski
Slavonic Princess(poetry)
Heitah
Posthumous Oscar(thing)
ignis_glaciesque
University of South Florida(place)
ignis_glaciesque
Flogstaskriket(idea)
liveforever
Caesar's last breath(idea)
dagnyswaggart
she wants to believe(personal)
antigravpussy
he doesn't know, but her eyes widen too far(thing)
dagnyswaggart
Wild tides guard her secrets(poetry)
Lord Brawl
Caesar's last breath(poetry)
locke baron
Forgotten things in space(fiction)
sitaraika
Colours(idea)
etouffee
Wild tides guard her secrets(poetry)
E2 is a by-product of the existence of The Everything Development Company