By Peter Bell

Books on Code Generation and Application Generation

The other day, Dan Wilson asked what books I read on code/application generation. Here is a quick summary of the relevant books I've read over the last year or so. Anyone want to suggest any others?

Code Generation in Action - Jack Herrington - This is probably the best overall low level introduction to code generation covering generating everything from documentation to DAOs, from unit tests to user interfaces. It isn't wildly insightful, but it is a must read to have a feel for the tactical landscape. I disagree with many of the suggestions but am glad I read through the book.

Code Generation in Microsoft .NET - Kathleen Dollard - This was a disappointment. All it really doe it tell you to use templates rather than concatenation and then give you a bunch of workmanlike examples. If you're doing code gen in .NET it might be worth it, otherwise I wouldn't bother.

Generative Programming - Krzysztof Czarnecki - If you just want to generate your DAO's, give this a miss. If you want to see the future of software development, it is a must read. I found this the most ground breaking and enlightening book on the subject of generating entire applications automatically. Particularly impressive given that the book is over 6 years old. This is also the book most referenced by the whole application generation world.

Software Product Lines: Practices and Patterns - Paul Clements - This has a number of nice ideas and case studies and if you are serious about generating software product line is well worth reading.

Software Factories: Assembling Applications with Patterns, Models, Frameworks, and Tools - Jack Greenfield - This is the Microsoft approach to software product lines (they call them software factories). Worth reading for another perspective, but I couldn't get over how well they understood the problem space and how badly they managed to maul the solution space.

If you like the whole UML/MDA approach, there are plenty of books on that subject and it is definitely another approach. I find MDA to be completely inappropriate for my use cases as it doesn't deskill the process of specification sufficiently or allow for industrial levels of reuse, but I'm sure it has a space in improving the efficiency of larger projects and if anyone knows of one great book on the subject I'd go get a copy and add it to this list.

An honorable mention goes to The Pragmatic Programmer which mentions code generation in passing but is so full of other pearls of wisdom it should be on the bookshelf of any programmer who wants to understand and master their craft.

I've also been pretty influenced by Eric Raymonds The Art of Unix Programming, Ken Pugh (Interfaces and Prefactoring - both well worth reading) plus the usual design patterns book (GoF and Head First). I'm working through Rapid Development and Code Complete, and love pretty much anything from the Pragmatic Press (I'm learning Ruby just because I like their books so much!). I read Refactoring to Patterns (still haven't read Fowlers original Refactoring), I have Scott Amblers interesting Agile Database Techniques waiting for me at the office, I need to catch up on a bunch of test driven development and xp books, and I thoroughly enjoyed Brooks' The Mythical Man Month. Incidental books like Peopleware are also well worth reading for technical managers.

The least obvious book choice? Simple Heuristics that Make us Smart. If you develop a software product line you need to automate specification as well as production. To do that you need to understand how people make decisions so you can create decision support tools that help with the process.

Comments
Peter,

Thanks for the book list. I just got "Generative Programming" in the mail today. Looks like a good read and just what I was looking for.

I have some others on the way...

Thanks again for the list. This will either answer my questions or generate ( pun intended ) a whole lot more!

Dan
# Posted By Dan Wilson | 10/19/06 7:52 PM
Hi Dan,

Glad it helped. Yep. Generative Programming is just the best. It is six years ol but it still captures the mindset better than anything else out there. Some of the others are good, but with GP you're 60% of the way there and the rest is just details.

Best Wishes,
Peter
# Posted By Peter Bell | 10/19/06 8:43 PM
BlogCFC was created by Raymond Camden. This blog is running version 5.005.