in reply to Programs that write programs
It's certainly possible, though I've not written exactly that. One thing I do every once in a while is to write a program that will read a spreadsheet (that define simple requirements) and use it to generate a program. For example, on a previous job I was asked to create a parser for a horribly complicated ASCII report and convert it into a set of flat files suitable to import into a database.
I told them "OK, if you give me an Excel spreadsheet describing exactly what you want in the format I specify, I'll give you a program that will do what you want." The spreadsheet was pretty simple: the first page described the input file & fields, the second page described the output file & fields, and the third page specified how to map and transform the input fields into the output fields. Perl wasn't installed on the destination machine, so my program wrote a C++ program that did the work. I also gave them the perl program so if they wanted simple changes, they could do it themselves.
That program was very useful, as it saved me a great deal of trouble on that project (in fact, they used it for several other projects too, so it saved me a *lot* of headaches). For years afterwards, I would get requests to add another feature (transformation type) to the perl program. For example, they wanted to generate flat files to send to the mainframe, so they asked for a TO_EBCDIC transformation so they could output COMP-3 fields to the mainframe.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
|
---|