Um ... Rob, I write programs all the time that generate other programs. They aren't intelligent at all. It turns out that for some kinds of problems - particularly when there are things that could change or things that are unspecified, it's a lot easier to do this than to write a program that encompasses all the possibilities.

Random thoughts:
There's also a fun angle to this. There used to be a game called core wars that used a language called red code. You could write programs that would copy themselves all over the place (well, that was one strategy). When I taught computer science, I'd have my students write simple red code compilers (in assembler and in pl/i). Another thing fun thing is the old, "program that outputs a copy of itself":

My solution in C is at http://geocities.com/elbillaf/repeat.html

But there are better versions available that are ascii/ebcdic - independent.

I'm not aware of many other people who do this (programs that write programs) where I work, but I've been doing it for ages - and I've met a number of other people who have used similar approaches over the years.

BTW, most modern chips are designed - and to an extent - tested and debugged in software. Computers are being used to help create more and better computers. A question is to what extent that process is able to be automated.