Classic Computer Magazine Archive CREATIVE COMPUTING VOL. 9, NO. 7 / JULY 1983 / PAGE 87

The transparent sort. (evaluation) David H. Ahl.

The Transparent Sort is an on-screen demonstration of the Shell/Metzner sort, and especially efficient sorting routine.

If you have read any of the articles in Creative Computing about sorting techniques, the Shell/Metzner sort has probably caught your eye as being fast and efficient. It is, but it is not all that easy to understand exactly how the speed and efficiency are achieved. The Transparent Sort will help.

The 26 letters of the alphabet are shown across the bottom of the screen in one of five orders which you choose from a menu (in order, reversed, scrambled, random, or select your own order). Two lists appear above the alphabet; the one on the left shows the value of each variable in the program, while the other shows running statistics (statements executed, number of comparisons, etc.). Also shown is the current line of the program being executed and an explanation of the line.

When you start the program, two arrows, which point to the two values (letters) which the program is currently comparing, appear below the alphabet. A third "progress pointer" shows how far into the list the sort has progressed.

The program can be run at any of nine speeds by pressing a number key. Slow speeds are useful at first when you want to read the explanation of each statement, but the faster speeds are useful to demonstrate vividly how the list is progressively being brought into the sorted order.

For the most part, the 16-page manual is excellent, except for one exceptionally nasty mistake. In particular, the most important statement of the flowchart (the comparison of the two current values) has the "yes" and "no" reversed on the output arrows. A minor nit is that the authors use a rectangle symbol for a comparison, whereas a diamond is correct.

Given that the TRS-80 Model I is no longer on the market, we think that TRS-80 disk software packages should boot up on both the Models I and III. This one doesn't; to run it on a Model III, it must be converted. This is not a horribly onerous job, except that after conversion the on-screen arrows become right and left brackets which destroys some of the visual effect.

The program has a non-transparent mode of operation to demonstrate the speed of the Shell/Metzner sort. Unfortunately, the fact that it will sort a mixed up alphabet in 8.3 seconds is a bit meaningless without another figure with which to compare it.

We think the authors should have included a common bubble sort program on the disk or in the manual to better make the point on speed.

Despite our criticisms, we feel The Transparent Sort is an excellent introduction to a fast, efficient sorting technique. We hope that it will encourage more people to use the Shell/Metzner approach in their programs.

Products: Pulse Software The Transparent Sort (computer program)