Once upon a time, we PPC'ers actually enjoyed reading programs, not just writing and running them. Perhaps the best example of The Joy of Reading Other People's Programs was given in the following 1978 article. We all got a huge laugh from reading each of the little programs and the "type of programmer" that Bill said each one represents. The article drew a ton of replies from all over the globe... even from HP employees!
Enjoy this glimpse into The Way Things Were... 20 years ago!
WHAT KIND OF PROGRAMMER ARE YOU?
Bill Kolb (265)
"PPC Journal," September/October 1978
Volume 5, Number 8, Page 31
This is a quick test that will help you evaluate yourself as a PPC programmer. It is based on a similar test by Norman Grabowsky in DATAMATION Magazine (Mar. 1977). The problem is this: the X-register [stack level 1] contains either a one or a two. Write a program that leaves one in the X-register if it previously contained a two, and vice versa.
AFTER you have written a program, compare your answer with the ones given below. Select the one that most closely resembles your program to determine which category you belong to. Look up the meaning of the category further down in the article.
[Note: This was written in the HP-67 era, so the commands might look a little strange if you never programmed the old HP PPC's. I took the liberty of reformatting the programs from vertical listings into the more HP48-like horizontal listings. If you need to, pretend that there are « » around each line! -jkh-]
[See descriptions of each category below. -jkh-]
NOW SEE WHAT KIND OF PROGRAMMER YOU ARE:
Category 1: JOB SECURITY MINDED. This is a true work of art. It is also incomprehensible to anyone else.
Category 2: ENGINEER. This type insists on making the problem more complicated than it really is. Engineers hang onto an idea tenaciously until they find a way to make it work.
Category 3: MATHEMATICIAN. This is a concise algorithmic solution to the problem that completely avoids any tests.
Category 4: SURVEYOR. Surveyors begin every problem by first converting to a bearing or azimuth. The worst part is that even a mathematician can't understand their documentation.
Category 5: COMPUTER SCIENTIST. These are likely to be the most sophisticated solutions to the problem. One can only hope that the documentation will be good enough to follow what he's doing.
Category 6: SYSTEMS PROGRAMMER. This is actually a very good program. Every conceivable error trap has been included in case the user makes a mistake. This type will probably end up selling his calculator.
Category 7: PROGRAMMING INSTRUCTOR. You will notice a number of key points demonstrated by this program. Unfortunately it doesn't always work. Chances are he's never produced a working program of any importance.
Category 8: HP APPLICATIONS ENGINEER. These people really give us some good programs but somehow they always seem to fall a little short of the ideal.
Category 9: OLD-LINE HP-65 PROGRAMMER. This type still needs two steps after every test. Odds are that he bought the HP-67 because he needed more steps and found out that 224 wasn't enough either.
Category 10: HP-25 OWNER. This is a very short and efficient routine. Most HP-25 owners can reduce a problem to its simplest terms.
Category 11: BEGINNER. This type knows a little about programming but doesn't make any distinction between "equals" and "not equals". He hasn't yet figured out why HP put so many different comparisons on its calculators.
Category 12: RECENT FOUR-FUNCTION CONVERT. It's apparent that this programmer is about halfway through the owner's manual and has a good grasp of the basics. He still spends most of his waking hours trying to find uses for his calculator.
Category 13: NORMALLY USES A TI CALCULATOR. His own calculator is in Lubbock, Texas, for the third time. Notice the steadfast refusal to use the stack.
A number of 'programmers' at HP also took the test... and as luck would have it, one produced number 13! Another HP programmer's solution was a three-step goodie listed below (a). The "best" has to be Mike Richter's program in (b) below. It is the shortest (will someone come up with a two-step program?), doesn't use any compares, labels, flags, registers, or even the stack! [Note: this was very important on 4-level stack machines! -jkh-]
This only proves once again that no matter how "good" a given program is, most likely someone else can improve it or provide some insight that facilitates an improvement. It is the exchange of programming technique that PPC strives to provide.