As the calendar clicks around, I’m reminded of an odd anniversary. Roughly 40 years ago – maybe late 1968, perhaps early 1969 – I wrote my first serious piece of software: a real application, used by real people, and constructed as part of my paid employment. I thought it might be worth revisiting that event.
The first thing you have to understand is that I’d had no computer-related education at all. The closest I came at the Royal Grammar School, High Wycombe, was an after-school seminar in the School Library, when somebody delivered a talk on computers. I’ve forgotten the content of the presentation completely; I only remember that the speaker passed around a core memory module for us to look at. (Hands up those who don’t know what “core memory” is, or how it works.) In the spring of 1968 I applied to Essex University to read Economics, and that summer I took GCE A Levels in Economics, Maths (A+S), and Physics. However I had already decided that it would be useful to spend what is now termed a “gap year” before going to university, in order to get some experience of the real world. Fortune (or nepotism) was in my favor, and I was accepted at the UKAEA Harwell to spend a year as a “Mathematics Assistant”.
I started in September 1968, and lived in a hostel (a barracks, really) in Abingdon. I was working for the Programmes Anaysis Unit (PAU), a group that was trying to understand the economic impact of government-sponsored research and development initiatives. We were interested in how quickly innovation spread through a marketplace, and what the return on investment looked like. I was the only assistant in a team of a couple of dozen eminent scientists and economists. They understood the policy issues, and most understood the mathematics. The challenge was gathering the data and interpreting it.
I started out on issues related to ROI. The models typically involved calculating the year-by-year impact of an investment, with each annual contribution discounted due to monetary deflation and substitution. I worked up a family of models of increasing complexity; for each one, I planned to accumulate the discounted annual contributions until the marginal return was less than some epsilon. But how to run them?
I was put in charge of the department’s Wang Programmable Calculator. The programming model was similar to more recent programmable calculators from TI and HP. The program memory essentially stored keystrokes, which were executed just as if you’d pressed them. Keystroke steps were numbered, and there were conditional and unconditional branch operations. For the Wang, the “program memory” was a pre-scored card, from which “chads” were punched out with a stylus; the card was then “read” in a device that looked like a small toaster. The output display used Nixie tubes…
I programmed up my first model. It ran to completion in 5 minutes. My “second order” model took 30 minutes to finish. The “third order” model ran for four hours. When the “fourth order” model had not converged after an overnight run, I knew that I needed some better technology. My team leader, a physicist who had never recovered from the fleshpots of Cairo during the 8th Army campaign of 1942, directed me to the computing centre. There a rather startled young man with a huge red beard thrust a copy of “McCracken on Fortran” into my hand, created an account for me on the IBM 360/65, and showed me where the card punches were. Two days later, I’d completed all of the ROI calculations, and I was hooked.
In those first programs I used the 360 as a glorified version of the Wang calculator. I didn’t have to manage data sets, or design complex algorithms, or do anything for output beyond printing a single number. But the next job was different. Several PAU teams were interested in how technologies were taken up by a marketplace, and then (as now) it was assumed that adoption tended to follow an S-curve. Today, curve-fitting is a standard feature of every maths library, but in 1968 we were making it up as we went along. Furthermore we weren’t simply throwing a best-fit curve through a bunch of points: we had a number of exogenous constraints that we had to respect.
One of my colleagues came up with a nice set of linear transformations for the primary equations (Sigmoid and Gompertz), which meant that I could vary one parameter (usually the asymptote, which was constrained anyway) and use a linear fit to generate the other values. I demonstrated experimentally that graphing the residual errors against the asymptotes had a single minimum, so I was able to use a simple bisection approach to find the best fit. Some of the data sets were too big to fit in memory, so I added a buffered input reader to stream the data from the disk (or was it a drum?).
My first version of the program simply output the parameters of the S curve and the residual errors. This was OK for the mathematicians, but unsatisfactory for the policy wonks. I made friends with the red-bearded guy in the computer centre (who would later be my lecturer at Essex University!), and discovered that the IBM 360/65 was equipped for COM, or Computer Output on Microfilm. I cut-and-pasted some code from the COM system documentation, and augmented my application with full graphical output, showing the original data points (or bucketed samples thereof) and the various s-curves that corresponded to the different constraints.
By this point, I was more or less lost to the PAU. While I kept doing minor tasks for them, I spent 80% of my time in the computer centre, and by the time I left in June, 1969, I was helping teams from all over Harwell with their applications. I’d also moved on from punched cards to a teletype-based RJE system, which was only one step away from being a real interactive system. (For that, I had to wait until I encountered the PDP-10 in 1970.)
Meanwhile my application was used for a number of years. When I returned to a different branch of Harwell in the summer of 1971, I was asked by my old team to make several small enhancements. Naturally, I looked at the code I had written, and was mortified at how primitive it was. But it was my first, and self-taught to boot, so I cut myself some slack and fixed it.