Thursday, February 4, 2010

Doo-Wop Loop

Computer languages all share three essential characteristics; they execute some set of commands through sequence (one after another to the end, then stop), selection (if something is true, do this, otherwise do that), and iteration (do these commands until the cows come home). In Java, one of the languages I’m learning, iteration comes in three flavors:
- a for loop, where the computer is told to iterate a specific number of times;
- a while loop which first tests to see if the loop should be entered in the first place, then if it is, to iterate until some condition is true, such as freezing temperatures in some nether region;
- and a do while loop which is very similar to the while loop except it always iterates at least once.
Now, there is speculation in some circles, or so I’ve heard, that there is (or was) a fourth kind of loop that is similar to the do while loop and tends to be used only on specialized SATB computers (and its variants, such as SAB or SSATB). Here is an example:

doo {

} wop (soloText.compareTo(“friends”) == 0);

The SATB type computers are actually clusters of several computers, sometimes as few as four or five, sometimes as many as 20 or 30. One of the computers is designated the controller and will execute commands of considerable variety and complexity (not shown in the example above) while the other computers run the commands shown, over and over in a doo-wop loop.

No comments: