Next / Previous / Shipman's Home Sweet Homepage / Site map

The first computer program I ever ran (1966)

Going into my senior year at Hobbs (NM) High, 1965–66, I fully expected to major in physics. The school had recently adapted the accelerated PSSC Physics curriculum, and I did well in this course.

How I got into programming

A chance encounter in the Hobbs Public Library changed my course sharply. Basic Computer Programming, a 1962 text by Theodore G. Scott, was a Doubleday TutorText, an early example of “programmed instruction.” (The Wikipedia article on gamebooks has more on this interesting genre, books in which the reader chooses where to go next; nowadays there are still people writing coursework in this “choose your own adventure” style.)

This book taught programming for beginners, mostly assembly programming, with final chapters on FORTRAN, COBOL, and Algol. I ate it up. This was the most fun I'd ever had, and I wanted to explore more.

In 1965, the Hobbs school system owned exactly zero real computers. Somewhere there was rumored to be a mark-sense card reader. There was nowhere I could actually run a program, so I did a lot of programming on paper.

Impressed by the shiny ads in Scientific American for their big computers, I wrote to Control Data Corporation and asked them if they could recommend any books on programming. I was appalled that they sent me a book—and an invoice for eight bucks, which was a lot of money back then (I earned $3 a week stocking magazines at the Book Nook).

The title of this 1964 book was The teacher-student approach to computer programming concepts, and the author was given as Control Data Corporation. The dialect was FORTRAN II for the CDC 160A.

I still remember the first metaphor they used for program execution: Archy the janitor. Archy worked for a motel, but he had very limited intelligence and could only do one thing at a time. So the motel trained Archy to look in a little message box in the office every morning when he showed up for work. In this box would be a room number. If it said 103, Archy would go to room 103. Every room also had a little message box in it. If room 103's box had a slip of paper with “clean” on it, Archy would clean room 103 and then move on to 104 and look in the box there to see what to do next. If room 104's message box had a slip in it reading “218”, he would go to room 218, and so on.

This model allowed the authors to explain sequential execution and branching. They even gave an example of an infinite loop, and stressed that Archy didn't even have enough intelligence to realize he was going in circles. In all, a fine metaphor for teaching programming fundamentals.

I worked every assignment in the book and checked it against the answers in the back. I found several errors in their solutions. (Years later when I started doing a lot of tech writing, I learned the hard way that writers must always run their examples to make sure they work!)

Still, after a few months of this, somewhere around early 1966, I still had never run a program on an actual computer. Fortunately, Joe Floyd, our physics teacher, had arranged for the Physics Club (or some similar club) to take a bus to the huge metropolis of Lubbock, Texas, to attend the Science and Engineering Fair at Texas Tech.

I think there might have been a dozen or so students on our bus. They scattered to tour the exhibits, but I went straight to the computer center, hoping that they might let me run a little FORTRAN program I had written.

Genesis of my first program

The purpose of this program was to address an argument that came out of a discussion in class. In a senior's typical year, one time slot was divided into four pieces: driver's ed, health (including the notorious VD film and Death on the Highway), American Government, and Anti-Communism (for which the text was J. Edgar Hoover's Masters of Deceit, which taught us all about front groups and the cell system).

I can't remember if this was in the American Government class or the Anti-Communism unit, but we were discussing the theory of revolutionary struggle. Years later I realized that we were getting some watered-down Hegel. Our teacher said that in a political conflict, when there are two theories of how to run a society, the Thesis and the Antithesis, the conflict tends to produce a Synthesis, which is somewhere in the middle. Then the Synthesis becomes a new Thesis, which produces a new Antithesis, and the cycle goes around again.

So, I asked, where does it all end? Does it converge exactly halfway between the original Thesis and Antithesis?

This led to a pointless rumination about a mathematical model for the process. Let's suppose that the Left (Godless Communism) is 0.0, and the Right (Good old American John Birch Freedom) is 1.0, so the first synthesis is 0.5. (I campaigned for Goldwater in 1964 as a Teenage Republican. The Bircher viewpoint was not all that uncommon in Hobbs. Funny—now my heroes are people like Noam Chomsky and Gore Vidal.)

At that point one extreme or the other becomes the new antithesis. Since both extremes are equidistant from 0.5, we flip a coin and say 1.0 is the antithesis, so the second synthesis is 0.75. But now we're too far to the right, so the left is the new antithesis, so the new synthesis is 0.375.

Where does this sequence converge? I ran a few cycles on paper but it wasn't clear where it went. With the Science and Engineering Fair approaching, I wrote a little FORTRAN II program to run the simulation for thirty cycles or so.

Theory, meet practice

At Texas Tech, I found a sympathetic staff member who said I could run my program. I was in ecstasy.

They had two computers then. One was an IBM 1620 with add-on core memory (persistent storage—a luxury of the day!) and a Flexowriter terminal. However, such was not for mere mortals, but I would be welcome to run it on their IBM 7044, the older and not so shiny system.

The first obstacle was learning how to use an IBM 026 keypunch. What a miserable excuse for a human-computer interface! Communicating with computers by punching holes in a piece of cardstock! If you made a mistake, you had to throw away the entire card and start over: once you punch a hole, you can't unpunch it.

Moreover, FORTRAN required parentheses, and the 026 did not have keys for those characters. You had to multi-punch them. First you hold down the MULT PCH key at the top left, then press three other keys to put three specific holes in that column, then release MULT PCH to advance to the next column.

My program was probably under 20 cards or so with comments. I think it probably took me an hour to learn the keypunch, prepare my deck, proof it, and correct it.

When I told my new friend it was ready to run, we went into the big room with the 7044. This was an early transistorized machine, a re-implementation of the vacuum-tube 704. The room was at least the size of a basketball court, mostly filled with cabinets.

He threw the deck into the card reader. It ran so quickly, it seemed to me that it had printed the answer before it finished reading my deck.

I was horribly disappointed that the program did not produce correct output on the first try. Every line of output it printed was missing the first character. I didn't realize one of the important differences of FORTRAN IV was that the first character of each output is used as a carriage control character: a blank means single-spacing, zero means double-space, and one means go to the next page.

The program did run on the second try.

After 46 years I hope you, dear reader, will forgive me for not having a listing of this program. However, I have just recreated it for FORTRAN 77 running on our Linux boxen. Here is the source, minus the large initial block comment that retells the story related here.

c hegel.f:  An attempt to recreate my first 1966 program
      program hegel
      thesis = 0.0
      antith = 1.0
      synth = (thesis + antith) / 2.0
      do 10, i = 1, 30
         write(6, 900) i, synth
 900     format(i4, f9.6)
         if (synth .le. 0.5) then
           synth = (synth+1.0)/2.0
           synth = synth/2.0
 10      continue

I just ran this, and here are the last six lines of output:

  25 0.333333
  26 0.666667
  27 0.333333
  28 0.666667
  29 0.333333
  30 0.666667

I hope no one attempts to draw any inference about real political processes from this. I was sixteen years old, and had never encountered any political viewpoint to the left of Attila the Hun. In college, Ross Lomanitz, a physics professor, was the first person ever to show me an issue of Ramparts, the beginning of my long slide into political perdition.

But what about my promising career in physics?

By the end of my senior year I had set school records for the high scores on two of the standard 35-question PSSC Physics exams. Joe Floyd was pestering me to major in physics.

Unfortunately, I hit New Mexico Tech just after they decided that the text for freshman physics was Feynman's Lectures on Physics. This course resembled in no way the things I'd learned in high school. He said right in the introduction that this book was only for the future Feynmans, and he was sorry that a lot of okay students would not be ready for it.

This was also before Tech and other enlightened universities started coordinating the math and science curricula. The calculus courses I had were all theory; rarely did they present practical applications, and there was no attempt to insure that physics students had the right math around the right time to cement it by applying it.

Given that I had been accepted to the Co-Op program at Tech, and had convinced the director of their new computer center to let me work there, it was hard for me to come up with the kind of energy and focus that would have been necessary to do at all well in freshman physics. I never took another physics course, and I barely survived those.

See also: Life in Hobbs, NM, 1956-1966
Site map
John W. Shipman,
Last updated: 2012/01/16 00:04:28