Code generation and the Developer Job

Yesterday, July 20th, @hallo twittered:

He received many response, this was mine, and another  one:

We were doing code generation every day for decades. The tool is named: compiler. Do you remember the old days? Setting relays in the ENIAC? Or using the front panel to setup the first Altair microcomputer? The compiler generates code from a higher lever model: programming language.

But for the last three decades, we didn’t raise the level of abstraction. Exceptions: SQL language, or Visual Basic form designer (a graphic model that relieved us of pages and pages of Petzoldoid Windows code).

Code generation from a model (as I promote from my personal project AjGenesis), is the way to get a new “language”: a domain specific language, or a domain specific model, or whatever you want to create.

Today we have so many technologies, with bunch of details and configurations. I think on combining Spring Framework, Hibernate, Struts 2, JavaServer Faces, ASP.NET MVC, Web Services, Windows Communication Foundation, etc… We are wiser on software developer, but current apps are polluted of tons of details and technicalities. Most of these details could be derived from a model.

It’s the same that saying: “a=fact(4)” is the model, and machine registers, stack manipulation, memory allocation, and so, are the details.

More answers:

Yes, manipulating processor registers could be cool the first time, but after hours and hours, it becomes boring (and troublesome). That was the motivation for assemblers, macro assembles, high level languages and compilers.

In my above tweet, I mentioned artificial intelligence. Well, I must admit it’s only an idea, but I think code generation is an appropiate field to apply "artificial intelligence” approaches (yes, AI is broad term these days).

Another question:

Well, it’s hard in the short and medium term. First: there are lot of technologies, and every year we have a new kid of the block (Scala, Clojure, Rest, Cloud Computing, Sharding database, Mobile apps… etc). So, there is no single way of doing software. But in each of such niche, there are a lot of place to nurture abstraction, and to hide boring details.

I agree. But we could dream: applications creating applications… Could we have this kind of apps? In Star Trek future? 🙂

Code generation: sky is the limit (AjGenesis motto… 🙂

Angel “Java” Lopez

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s