Capt. Horatio T.P. Webb

Last Updated 8AM 2/25/2015


The Structure Theorem (1966)

by Corrado Bohm and Giuseppe Jacopini. All algorithms are constructed using only three constructs:

  1. Executing one subprogram, and then another subprogram (sequence)[SEQUENTIALS]
  2. Executing one of two subprograms according to the value of a boolean expression (selection) [IF-THEN-ELSE]
  3. Executing a subprogram until a boolean expression is true (iteration) {LOOPS]

Nassi Schneiderman Diagrams (1972)

by Isaac Nassi and Ben Shneiderman (graduate students in computer science at SUNY - Stoney Brook)

See this wikipedia article

or this by Schneiderman

Examples of everyday Algorithms (Lists-Of-Things-To-Do -- LOTTD)

Chunking (modularization)

Once an algorithm is complete and is expressed as (a) a list of verbs (instructions) or (b) drawn with a Nassi-Schneiderman diagram (a stack of boxes), the entire algorithm represents a "procedure to perform some action". If we think about the list in its entirety it can be called:

All of these "chunks" or lists of instructions are purposeful -- i.e., they do "something". If we were to devise a "name" for what the actions of performing the chunks accomplishes, the name should ALWAYS be a verb. This indicates that if we do what the list (module, procedure, program, function, method or routine) says, doing it is a verb not a noun. Performing the items on the list represents some action -- a verb.

For example, the name for the biscuit recipe above could be "make_biscuits" or "bake_biscuits" NOT biscuits. Biscuits (the noun) is what we get when we are finished performing the verbs on the list for "making_biscuits" or "baking_biscuits".

You will notice that any button or switch that we interact with in the real world always has a label on it which is a "verb":

It is the same with programming ideas. Each "chunk of code" performs some action (a verb), thus its name should be a verb.

What would you think would happen if you pressed a button that had labels that are nouns:

One might wonder what would happen if you pressed such buttons.

Our purpose here might seem to be just one of clarity. That is true. But more importantly, the "chunking" of instructions is the ONLY way we can deal with complexity.