Code Generation 2011: a personal review

Once again, back home after the most exciting till date edition of the Code Generation conference in the latest years. The co-allocation of the Language Workbenches Competition has been a great incentive to attract all of us to join and present alternatives to a great challenge in the domain of modeling and code generation.

In this long post, I want to share my personal view about these days, and for sure, take note it could be partial and subjective. So, be kind to review also the comments as seen by others like Johan den Haan, Markus Völter, Angelo Hulshout, Marco Bambrilla, or Mariot Chauvin to cite a few and more expected to come. Find the majority of the pointers at the http://modeldrivensoftware.net

In this edition, the conference has been deeply covered via twitter using #cg2011 and #lwc11

As expected, I will be only be able to comment about the sessions I personally have attended. Running three tracks in parallel always force us to choose one and miss two other great sessions.

Day 0. The Language Workbenches Competition

Ten tools were presented in a marathonian session exactly allocating 40 minutes per tool. The Angelo’s egg-timer was implacable: Whenever it rang reaching the agreed time, the speakers suddenly stopped talking unable to end a simple phrase.

The challenge was a competition without a winner or loser, mainly because there was no prize to win (may be next year a generous sponsor could change that). The main objective is to compare how different tools are able to complete a common problem facing modeling, model transformations and code generation to multiple platforms.

Johan den Haan has prepared a detailed report of the tools presented. Take a look on it.

From my side, I have created a feature matrix for comparing the different approaches stressing what I see as different in each tool. It is not complete: some information is missing and some other not yet contrasted so take it as a beta version to be improved.

With respect to my beloved tool Essential, I have to say that I received a very nice feedback from the audience. See a sample of the twitted comments:

kthoms: @pmolinam Has a high voltage notebook – projector crashed on plugging in. Now let’s see how he could improvise the situation #lwc11

stevekmcc:  @pmolinam Showing #Essential: major theme is separation of concerns, so opposite to Rascal #lwc11

stevekmcc: #Essential looks very clean compared to other text or text-projection workbenches #lwc11

delphinocons: RT @stevekmcc: #Essential looks very clean compared to other text or text-projection workbenches #lwc11 <== I agree. Relaxing to the eyes.

delphinocons: #lwc11 The Essential metamodel is smaller than EMFs, and a little larger than MetaEdit+’s

meinte37: @pmolinam is the first to finish before the egg timer at #lwc11. That’s because he cuts down to the Essential-s ;)

JohanDenHaan: @pmolinam nice presentation and demo, good mix of slides and demo. Great timing!

 

Day 1. Code Generation 2011 starts

I started the day giving an initial talk about Introduction to Model Driven Software Development.

Later on, Obeo guys (Mariot Chauvin & Stéphane Begaudeau) presented how to use Obeo Designer to create sensible graphical DSL tools on the top of the Eclipse framework. Obeo uses model interpretation over the EMF models to create in runtime GMF based editors.

Panel: Build or Buy – who should develop and own your DSLs and generators?

We played a nice game with the following roles:

  • Juha-Pekka Tolvanen (MetaCase), the moderator
  • Jos Warmer (Independent) , the homegrow tool maker
  • Pedro J. Molina (Capgemini) , the consultant
  • Johan den Haan (Mendix), the tool vendor

More soon than later, Andrew Watson and Markus Völter join with the rest of the audience in the discussion. Of course, there is not an easy answer to that question and depends a lot of the particular context and requiring thinking about, but not only on:

  • the experience of the in-house developers with MDD
  • the level of criticality of the process for the business to be automated (core or non -core to business)
  • the existence of tools able to provide the requested features
  • the need to split the business process from the current technology

 

Type Systems for DSLs.

Markus Völter presented a nice library he has been creating to help with the type checking in expressions of DSLs. After a gentle introduction to type checking, he introduced three different approaches to the problem:

  • recursive type-checkers,
  • union based (a la MPS) and
  • table driven (a declarative way of the first one).

 

Day 2. Getting speed

Terrence Parr Keynote was one of the more awaited talks in the conference. Many of us use their tools on a daily basis like ANTLR and StringTemplate. So having him here is quite special. In his keynote titled “Why program by hand in five days what you can spend five years of your life automating?” he let us some pearls like the following ones highly twitteable:

  • “XML is not for humans beings, just for machines.” (Donald Knuth, the father of TeX support this, and I am not going the one to contradict this)
  • “Programmers are lazy.” Yes, we are. We don’t like repetition of tasks, trivial or not, because we get bored, so we always try to automate things. And this is our main driver and source of fun.
  • “Automate the things more prone to human errors”. Automate the tedious work!
  • Running a test does not increase the quality of the code.

MetaEdit+ Hands On

MetaCase MetaEdit+ was of my pending tools to try from previous editions of CG. I had the tool, I had the chances but not the inline tutor to allow me to get advantage of the tool. Risto, Steven and Juha-Pekka did a great work in the “hands on” session been able to not to left away any of the practitioners. They have did this lots of time and they are good teaching it.

Definitely, the learning curve of MetaEdit is not big, but for sure, you need the initial proper training to get the grasp of the tool to start creating your own graphical DSLs. Been a tool implemented in Smalltalk and using a repository, MetaEdit provided an edition experience quite different to the ones more used to edit traditional files.

Generating Graphical DSLs

Marko Boger, one of the fathers of the Poseidon tool, presented his work about applying DSLs to describe graphical DSLs. The idea was well received, and later on in the local pub called The Castle Inn an informal Birds of a Feather session was settled to create the Spray project to join forces and create a common core DSLs to help in generating graphical DSLs.

Modeling the UI

To end the day I gave a talk about how we take in account to model the User Interface of a business application. The topic is important because the IU is not always pondered as it should be. The UI is the only aspect the user will see from any system we build. Approaches to modeling and code generation based in a pattern based approach were presented with the help of briefs live demos using Essential and Io tools.

Day 3. Closing a great edition

Ed Merks Keynote

Ed is the leader of the Eclipse Modeling Framework based in Montreal and now working also for Itemis. In his keynote he remarked some of the prejudices people use to have against code generation and (UML) modeling, leaving also some great quotes:

  • “Resistance is futile: Best practices will be assimilated by code generators.”
  • “XMI sucks because XML sucks. XMI sucks for transitivity.”

Ed talks reinforces my idea that, talking about software, Europeans are usually more instructed in the university in formal methods and theories where Americans uses to be quite more practical and take a more empirical approach to software engineering or computer science.

It is interesting to see that mostly all the participants in the LWC with the exception of Intentional are Europeans. Well, Charles Simony (the owner) and Mats Helander (the presenter) both from Intentional are also Europeans. So, there is no interest in Language Workbenches in other continents apart from Europe?

Goldfish Bowl: “Code Generation as a normal programming practice”

Jos Warmer lead this session were all the interested participants shared thoughts about how to integrate code generation with traditional styles of development.

How to create a good template: Go to your best developers and tell them: “write this DAO code file as it were the last time in your life you are going to write it”. Then abstract it and you got it. If the further in time found a bug, they can always came back and fix the template also.

Final panel: “Models, DSLs, Transformations: The Next 5 years”

In the closing plenary session, future directions and incoming challenges were addresses by the panelist and the audience.

  • Andrew Watson focused on resolving business problems instead of technological problems.
  • Jos Warmer encourages us to build better tools and better languages.
  • Johan den Haan pinpointed some incoming trends: Mobile, cloud, social, multi-core and poliglot languages.
  • Wim Bast commented about the need for parallelization and the best way to achieve it is to move to a more declarative DSLs allowing us to exploit the intrinsic parallelization in the execution of such algorithms. Wim pointed out also about the difficulty of making prediction about the future.

So, I put my two cents remembering the genial quote of Alan Kay: “The best way to predict the future is to invent it”.

My position is that we have the tools, we have the knowledge… so, we should put all our efforts in improving the tools. Good tools will make MDD mainstream soon or later. So, I want to see it happening: let’s improve our tools now better sooner than later.

Conclusions

The LWC has been a great idea made real. Having the opportunity to compare solutions and styles of tools has been quite productive for all of us. All the participants were happy with the idea of repeating next year and the next edition is looking for the next challenge.

Twitter this years has expanded the real-time conference far away that the walls of the College. Colleagues like Rui Curado, Xavier Seignard, Jordi Cabot, Angel J. Lopez or the AltNet Hispano group to cite a few I am aware were tracking the conference and taking part via twitter. This enriches the experience and makes it more participative.

Some tools, highly integrated with the Eclipse environment were suffering during the conference live demo failures. This is not an exception, but a warning signal that some task that should be easy are getting complex and complex when the number of dependencies to run a simple task is out of control. The friction level of these environments is definitely something to keep as low as possible. Model interpretation versus traditional code generation can be helpful also to reduce startup times and opening another instance of the same environment.

The new born project Spray (as reported by Karsten) can be quite helpful as a neutral DSL definition for describing graphical DSL in an technological agnostic way. The risk however is if it is too close to a certain technology stack like GMF or Graphiti it will only be used in such context. To my understanding, a Spray definition should be implementable also in Microsoft DSL Tools  to put a extreme counterpart.

If a contest for the novel tool of the year will have ever existed in CG, IMHO this year had been awarded to The Whole Plaftorm by Riccardo Solmi and Enrico Persiani. They have a nice and cool looking projectional tool that was deeply unknown to all of us. So, welcomed to the club!

XML is definitely not for humans (Terrence Parr) and XMI sucks for XML transitivity (Ed Merks).

Finally Mark Dalgarno and his team were superb organizing all the logistics to make all of this possible. Thanks to everyone and see you there next year.

10 comments.

  1. Very good post Pedro! Thanks. Also, a very good survey on User Interfaces. I’d like to keep a copy of the presentation to myself. Will you make it available?

    “Twitter this years has expanded the real-time conference far away that the walls of the College. Colleagues like Rui Curado, [...] were tracking the conference and taking part via twitter.”

    True. I had the #cg2011 realtime search on twitter open all day!

  2. Thank you Rui.
    Yes: The CG2011 website will publish PDFs versions of the slides. In the incomming weeks, the “Modeling the User Interface” video-recording will be published also.

    Nice to heard also that our tweets where interesting to someone! :)

  3. Thanks a lot for this write-up, Pedro! From the reports I have seen, it was indeed an exciting conference.

    Have you seen any reports by practitioners (that don’t build tools)?

    Cheers,

    Rafael

  4. Thank you Rafael. It was really exciting, indeed!

    I didn’t found yet a non tool-builder blogging about his CG2011 experience. We will tweet such URLs as soon as they appear.

  5. [...] more information, several attendees have posted their personal summaries of the event. In this page , Pedro links to most of [...]

  6. [...] Code Generation 2011: a personal review [...]

  7. Thanks Pedro for this great review!
    UI modeling is an exiting thing! I’m starting a project on that subject.
    It would be great to joint efforts from interested parts!

    And thanks for mentioning me! (minus the typo in my name ;) )

    Regards,

    Xavier

  8. Ops Xavier, sorry for that! Typo fixed.
    Indeed, it could be great if we do something to share visions about UI modeling.

  9. [...] The Metalevel — Code Generation 2011: a personal review http://pjmolina.com/metalevel/2011/05/code-generation-2011-a-personal-review/ [...]

  10. […] Review of the conference and the preceding LWC 2011 by Pedro J. Molina […]

Post a comment.