The lost delights and challenges of type-in programs

I was reminded of the delights and challenges of type-in programs from decades past - listings printed in books and magazines for the reader to type in at home - which I suppose could be considered an ultra-low-bandwidth, high-error-rate method of software transmission via the printed page, eyeballs, and fingers - by this tweet about old computer magazines: https://twitter.com/cyb3rops/status/1476122483308875778

“Nephew asks: How did you get the source code from these old magazines, when there were no link under the article to download it? Github isn’t that old, is it?

Me: We read it and typed it.

He: big eyes

Me: Yes, all of it.”

My introduction to programming in the early 1980s was through Usborne’s collection of computer books. My first, introducing me to the concepts of coding, was Introduction to Computer Programming (“No Computer Needed!"). But I also had a collection of type-in games, Computer Battlegames (I can’t remember what tipped the balance at the bookshop between that and its companion volume, Computer Spacegames) - pictured below, although the games were naturally slower and the graphics blockier than the exciting cover art suggested. The listings had explanations alongside of how the programs worked, and, to accommodate the variety of home computers on the market at the time, were also adorned with icons to flag the amendments needed for each micro’s own dialect of BASIC (covering the VIC-20 and Commodore 64, BBC and Acorn Electron, TRS-80, Apple, ZX Spectrum, and ZX81).

Cover of Computer Battlegames

When I upgraded to a BBC Master, I used to type programs from The Micro User, eventually getting my hands on the back issue with the checksum program to help readers check their typing and save hours typo-spotting. But I eventually splashed out on a subscription with the 5.25” floppy disk and (if it made it through the Royal Mail without flopping too much) a reprieve from the keyboard.

Example of checksums from Micro User, Feb 1988:

Example of checksums

In the spring of 1988, The Micro User had a (mercifully short) program to allow the reader to just type the checksums instead of the whole program. Aged 12 I had more optimism than I had knowledge of the mathematics of information theory and the limits of data compression - so instead of realising the impossibility of the goal, I duly typed in the listing - and got the deserved APRIL FOOL message.

Cover of The Micro User, April 1988

(The 8-Bit Software library has a trove of information about the BBC family of microcomputers, including an archive of The Micro User at http://8bs.com/tmucovers.htm, for those with an interest in the technology and micrcomputing culture of the time. And for the curious - the “low cost” - obviously black-and-white - laser printer mentioned on the cover is the Epson GQ3500, at a discounted price of £1498.80 + VAT - around £4000 in 2020 prices.)

The Micro User also broadcast some of their type-in software via the BBC’s Teletext-based telesoftware service. In the humorous series of letters from “Bob” to “Trev” at the back of the magazine on the challenges of life as a BBC Micro owner, they once suggested this was to refute the claim that they couldn’t even give their programs away..

Only the dedicated would want to type in the whole code of the Pretty Good Privacy (PGP) encryption software developed by Phil Zimmerman. But in the 1990s, US export regulations treated strong encryption as munitions requiring a licence for export - and the Wikipedia article on PGP explains how Zimmerman looked for a way to legally distribute his software:

Zimmermann challenged these regulations in an imaginative way. He published the entire source code of PGP in a hardback book, via MIT Press, which was distributed and sold widely. Anybody wishing to build their own copy of PGP could cut off the covers, separate the pages, and scan them using an OCR program (or conceivably enter it as a type-in program if OCR software was not available), creating a set of source code text files. One could then build the application using the freely available GNU Compiler Collection. PGP would thus be available anywhere in the world. The claimed principle was simple: export of munitions — guns, bombs, planes, and software — was (and remains) restricted; but the export of books is protected by the First Amendment. The question was never tested in court with respect to PGP. In cases addressing other encryption software, however, two federal appeals courts have established the rule that cryptographic software source code is speech protected by the First Amendment (the Ninth Circuit Court of Appeals in the Bernstein case and the Sixth Circuit Court of Appeals in the Junger case).

Cover of PGP: Source Code and Internals

More recently, following a December 2021 article in Jeff Atwood’s Coding Horror blog, I learned of David Ahl’s books of type-in software, BASIC Computer Games and More BASIC Computer Games, from the 1970s. I don’t know if I was a couple of years too late, or if it was a UK/US difference, or just pseudorandom chance, but I hadn’t heard of (or at least hadn’t appreciated the significance of) these apparently classic books - despite the fact that, as Jeff notes “At one point, there were more copies of this book in print than there were personal computers, period!”

Cover of “BASIC Computer Games” and “More BASIC Computer Games”

And in that article, Jeff announces that he has launched a project on Github to update the programs in BASIC Computer Games to modern languages and approaches. There’s an interesting question about how far you might go in doing that - Jeff writes “Please DO update for modern coding conventions. Support uppercase and lowercase. Use structured programming. Use subroutines. Try to be an example of good, modern coding practices!” - but when converting to Python, does that extend to architecting it the code as idiomatic object-oriented code? My answer would be a dull “It depends” - to be more precise, on whether an object-oriented approach enhances the clarity and extensibility of the code, or whether it introduces unnecessary and unhelpful complexity. But that is another topic, perhaps for another day.


Comment on this article on Twitter:


Sign up to the newsletter: If you would like to be notified of new posts on this blog, please sign up to the Eclectic Stacks email newsletter.

See also