Classic Computer Magazine Archive COMPUTE! ISSUE 60 / MAY 1985 / PAGE 73

Computers And Society

David D. Thornburg, Associate Editor

Visual Computing

Part 2

Last month we discussed the power of a highly visual computing environment, such as that provided by the Macintosh. I argued that many people who are not primarily analytical in nature may balk at the use of purely text-based computer languages, but that these same people may benefit greatly from highly visual programming environments such as those provided in Pinball Construction Set, Lode Runner, Multiplan, etc.

One argument against program construction sets is that many of them are very limited in their domain of applicability. You would have a hard time, for example, constructing a pinball game with Multiplan, or balancing a checkbook with Lode Runner. This limited domain of applicability means that a person with programming needs in many areas will have to master many types of construction sets.

In fact, it is the limited domain of applicability that allows these construction sets to be so easy to learn. The visual vocabulary with which you communicate with the system is limited to "words" that are relevant to the task at hand. It is, however, appropriate to ask whether all visual programming environments must be restricted to a limited domain of applicability.

Is it possible to create a general-purpose visual programming language? There seems to be ample evidence that it is possible. One program that points strongly in this direction is Helix for the Macintosh (from Odesta).

David Thornburg is a strong proponent of visual programming environments and has written 12 books, including The KoalaPad Book, published by Addison-Wesley, and 101 Ways to Use a Macintosh, published by Random House. Some material for this column has been excerpted from his forthcoming book Mindtools.

An Electronic Abacus

Helix is a database system built around a general-purpose visual programming language. To get some picture of Helix's power, we will explore its use to create a document that checks for a taxpayer's ability to benefit from Schedule G of the IRS tax forms.

With Helix, you create a database as a collection of objects. These objects include fields representing different types of data to be provided by the user, abaci containing the computational tasks to be performed on the data, templates defining the forms for data entry, selections through which forms can be entered and examined, indexes specifying the order of a search, and queries defining the search criteria. Of these, probably the most exciting object is the abacus.

I draw special attention to the abacus because it is the tool through which you program the computer, and because the manner in which you construct programs is purely visual.

To illustrate Helix, we will start by creating a new database called Tax Forms. By selecting the field icon and carrying copies of it to the main window, we can define the various input fields we want in our report—name, Social Security number, etc. Each field can represent one type of information, either text, number, date, or a logical flag (True/False, Yes/No, etc.).

You have control over the format of all nontext data types. The income data we have chosen is needed to determine whether the taxpayer is eligible for the benefits of Schedule G.

The BASIC Alternative

The following BASIC program performs the same task as the Helix program we will create:

10 REM BASIC PROGRAM FOR SCHEDULE G
20 PRINT "ENTER NAME";
30 INPUT N$
40 PRINT "ENTER SOCIAL SECURITY NUMBER";
50 INPUT SS$
60 PRINT "ENTER 1981 INCOME";
70 INPUT Y1
80 PRINT "ENTER 1982 INCOME";
90 INPUT Y2
100 PRINT "ENTER 1983 INCOME";
110 INPUT Y3
120 PRINT "ENTER 1984 INCOME";
130 INPUT Y4
140 SUM = Y1 + Y2 + Y3
150 SUM = SUM/3
160 SUM = SUM * 1.4
170 IF(Y4-SUM)>3000 THEN 200
180 PRINT N$;"DOES NOT QUALIFY FOR INCOME AVERAGING"
190 END
200 PRINT N$;"DOES QUALIFY FOR INCOME AVERAGING"
210 END

In Helix, you define a special object called an abacus to contain the computational part of this program—except the program is created by building a flowchart, not by typing in many lines of instructions. This program is constructed from tiles that represent the math operators (plus, minus, times, etc.), text operators, logic operators, branching operators (IF-THEN-ELSE), and so on. Because Helix can use such a wide range of data types, it lets you construct very open-ended types of programs. Some of these tiles are visible in the figure—an abacus that corresponds to the Schedule G flowchart.

The arrows show the flow of calculation. The unconnected arrow at the end of the screen shows that the result of this abacus (YES or NO) is to be passed to the outside world. Each region of a tile (the large boxes) can be filled with a field, an abacus, the result of another tile, or constant information of any appropriate form. You can control the type and format of the constant information as well as the format of the overall result.

Creating The Form

Once this abacus is created, the form can be built. This form contains both constant and variable information. The variable regions can be filled with input fields or abaci.

Once a form is created, it can be filled in. As soon as any abacus in the form has enough data to perform its task, it does so and prints the result in the appropriate place.

How difficult is it to learn to use a tool like Helix? I learned the basics of this programming environment in less than 30 minutes. Anyone who already knows a procedural language like Logo, LISP, or Forth should be able to master Helix in that time. Programmers whose knowledge is limited to BASIC may have to spend up to an hour getting used to the fact that a collection of abaci represents many independent programs, all of which coexist in the system at the same time.

An Abacus For Computational Tasks

But I would expect that people with no prior exposure to computer programming whatsoever should be able to master Helix in a few hours. With the single exception of PILOT, I know of no text-based language for which this statement can be made.

Helix is one of the first construction sets that comes close to being a visual programming language. Given the overwhelming popularity of construction sets, it won't be the last.