I don’t know who can claim to be the first ever code generator (strictly speaking we could argue this award belongs to the first assembly language compiler) but for sure “The Last One” is among the first code-generators (as we understand them).
The Last One was a program generator for BASIC . Programs were generated by the user selecting options from menus. In this edition of Popular Science we can read that:
The Last One presents you with a series of menus – a logical list of things you’d like done – and asks you to choose one of the items in the list … The process continues until you’ve provided all information to make your program work. The final step: Push a button and The Last One writes your program using standard BASIC terms
Interestingly you could also ask at any time for a kind of textual flow chart describing how far you had one in your program specification.
At the time, The Last One was marketed as the end of programming (see this cover from the Personal Computer magazine). Sounds familiar right? Almost any modeling/CASE/Code-generator tool since then has made the same claims forcing developers to go through the technology hype cycle again and again to the point that they should not believe a single word of what we say anymore (but luckily they will, hope never dies).
I’m a firm believer in the importance of knowing history (those who cannot learn from history are doomed to repeat it), and this includes teaching history of programming languages and history of modeling languages.
By the way, I’d like to know about other old code-generators. If you knew (or used) any, please leave a reference in the comments!
FNR Pearl Chair. Head of the Software Engineering RDI Unit at LIST. Affiliate Professor at University of Luxembourg. More about me.
TELON COBOL Code Generator (which was written in TELON aka self-hosting/recursively). Still exists, owned by Computer Associates
UCSD Pascal and the p-system were code generators (1978). E.g. Compilation of complex Pascal constructs were bootstrapped via generation of simpler Pascal constructs.
I used ‘The Last One’ a grand total of 3 times(!). Doing my degree in Comp Sci at the time. The problem? If the produces code didn’t work you were left wading through hundreds of lines of BASIC trying to figure out what was wrong (as TLO wasn’t smart enough to help). As anyone who has used a code generator knows, that code is not elegant – the time taken to debug soon outweighs any possible benefit. I quickly dropped it and went back to writing my own code!