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!