Monday, 6 October 2014

A Floor Wax or a Dessert Topping?

For those as old as I am and as influenced by American culture as most Canadians certainly are, the question "Is it a floor wax or a dessert topping?" likely rings a bell. Unfortunately, because the internet aims to curb the exchange cultural media—I use the term "cultural media" loosely in this case—you likely can't watch the video via that Wikipedia link where you live, but there are alternatives, thanks to the wonders of Google search. How could modern society, and effective software developers, function without Google?  It makes a guy dizzy just to think about it!


I bring this floor wax verses dessert topping question up because EclipseCon is just around the corner.  Like a floor wax, it's a valuable utility, in this case for learning cool new things and for interacting with experts and other like-minded people. Yet like a dessert topping, it's fun, because of the social events, and fattening, because the food is so good. I'm certainly excited to attend yet another EclipseCon. Barring death or disease, I wouldn't miss it! I've been to every EclipseCon and Eclipse Summit, except one.

Eike and I will be presenting Oomph, which is like a floor wax—reducing hours of tedious work to several minutes of automation— and like a dessert topping—recording your preferences and propagating them to all your workspaces.  Perhaps the latter feature isn't even technically a dessert topping, not if you consider the top reasons why some people hate Eclipse. In particular, consider how many of those reasons relate to issues that are addressed by appropriate preferences. Of course that leads to an endless debate about what's the best default preference, i.e., surely no one wants to use Cp1252 as their default workspace encoding. We intend to address this issue with Oomph, so come to our talk and find out about the grand things that are in store.


The biggest problem with Oomph right now is documentation.  Which self-respecting developer wants to spend time on that?  Not only is it a motivation issue, authoring help-center documentation is beyond horrible. So, being tool smiths and OCD, we've worked on making that much easier.  The basic idea is that the documentation is authored as Javadoc, with numerous doclet extensions. It is processed to generate the help center HTML. The overall processing includes a preprocessor phase to produce model diagrams, screen captures, Java snippets, XML snippets, and even tree views complete with their associated properties view.  All this makes the author's life simpler and the end result is way beyond cool. In particular, have a look at the Setup Resources section; this link is likely to change in the coming days when we refactor the documentation using JDT.

Not only have I been busy with these Oomph-related things, Xcore has some dramatic performance improvements in the latest Luna service release thanks in large part to my itemis colleague, Stefan Oehme, a member of the world-renowned Xtext team. And of course there was the usual service and support work associated with EMF itself, but everyone takes that for granted. I also want to thank Jonas for revamping the embarrassingly outdated Modeling home page along with EMF's home page. It's hard to keep up with all these driving factors, but it's definitely better than being bored!

I hope to see you in Ludwigsburg at the end of the month.  Feel free to test my much-improved German skills!  Though be prepared to hear me complain about the complexities of German grammar. Sollte das ein das, ein die, oder ein der sein? Translated literally to the pointless question, should that a the, a the, or a the be?  Note the three gender articles and dangling verb. Don't expect to get the point of a German sentence until you get to the very end.

Friday, 14 February 2014

Shoes for the Shoemaker

We shoemakers are typically so busy making shoes for others that we and our children are often out and about in shoddy shoes if not barefoot. There is also a strong tendency in the wider Eclipse community to find fault without taking action, looking instead to others to magically fix problems while feeling entitled to "motivate" those actions with poisonous complaints. We should consider carefully what's wrong with this picture.

Consider for example the all-important Eclipse Platform project and the perennial concern about the limited contributions it receives.  Of course this same concern extends to all projectswe'd all love high-quality contributions associated with each and every Bugzilla reportbut let's just take the platform as a case in point.  Suppose you would like to provision an IDE for working with the platform SDK source so you can commit your bug fixes to Gerrit.  All you need to do to get started is follow a few simple steps.

That's right, in the modern age of integrated development environments, you're expected to act as an interpreter for converting human language scripts into machine operations.  Does that not strike you as completely anachronistic?  Of course you're likely already doing this each time you provision an IDE to work on your own project, and you likely don't keep up with the release train milestones because it's a royal pain to do all this work each time there's a new version.

This whole problem irritates me to the extreme, not so much the platform's specific problem, but the fact that I have the same problem for EMF and for every project I use and to which I wish to contribute.  Just so you don't think I'm throwing bricks at the platform, have a look into my glass house, in particular at the extremely lovely analog of the platform's wiki page for setting up EMF's source. Good luck getting that to work!  What that heck is CVS? 

Not only is it anachronistic to follow scripts manually, it's always the case that these scripts become dated and are in need of constant maintenance, which, as busy developers, we don't have time to do.   Compound that with the fact that the scripts are buggy, you should not be surprised that when you treat the community like monkeys, you end up mostly with a lot of hooting.

Oh well, so much for the whining, sniveling, and complaining part, this problem calls for action.  Eike and I, being inherently lazy, don't even want to follow these kinds of scripts ourselves so we've worked on an  alternative approach. Yes, there's still a script for bootstrap purposesyou can help improve itbut here's the synopsis:
  • just as you would any Eclipse package, download the appropriate version of the Eclipse Oomph installerwe need to do some brand marketing instead of just calling it the "Setup tool",
  • unzip it,
  • run it, 
  • select the project you wish to set up, 
  • go for coffee, 
  • and come back to enjoy your fully provisioned IDE along with that fresh cup of Java.
Here's how you'd provision an IDE for working with the platform's SDK:




Here's the end result:


Of course a workspace with the entire Eclipse SDK as source is a bit aggressive, but it's a great proof of concept that it can be done for the entire platform. Be patient though, Rome wasn't built in a day: the platform's code base is very large, so cloning it all takes time, for me more than an hour!  Try a simpler project, like the EMF Core SDK, if you want more immediate gratification, and keep in mind that this would not be any faster if you did it manually.  Note that Oomph was built with EMF.  Did I mention that we're inherently lazy?

It's quite easy to author an executable setup script for your own project.  Here's how the platform's setup script looks:


The platform's script is quite complex because the platform itself is complex. Not only that, there are gotchas to get the platform to build without errors, e.g., an inherent need to install several JREs, which I avoided by changing project-specific preferences to not treat an imperfect JRE match as an error. You can see there are tasks to set global preferences, a task to install additional tools, e.g., the EE profiles feature, tasks to clone the dozens of repos, a task to materialize the target platform, a task to populate reasonable dynamic working sets, and so on.  Unfortunately it's apparently very hard to build all the platform's Ant jars and there appears to be a platform bug that requires an IDE "Restart" followed by a "Build All" before everything builds without errors and with less than 17,000 warnings. Note that the provisioned target platform contains only bundles from Orbit and from Jetty; I have no idea how the Jetty folks provision an IDE to work with source.

Eike and I intend to maintain an index of all Eclipse project setup scripts so that our community of contributors can enjoy one-stop shopping.  In addition, there are already folks looking to maintain indices for other open source forges.

The script-authoring documentation is a work in progress, but of course you can look at all the working examples as a basis for creating your own; remember to turn on "Live Validation" in the editor to catch problems early.  Note that if you provision the CDO Release Engineering environment using Oomph, you'll have all of Oomph's source code and some example scripts at your fingertips.  Contributions to the project are welcome; your changes can be easily committed to Gerrit. If you have questions, please use the EMF newsgroup and prefix the subject line with "[Oomph]". If you find problems, please report a Bugzilla. And finally, if you're so inclined, come see our EclipseCon presentation!

As you might expect, we're not the only ones who recognize the need to solve this vexing problem nor the only ones with a solution for it.  If you need this same type of thing in an enterprise context, you'll want to have a look at the cool features of p3, e.g., carefully managed inside-the-firewall p2 repositories.

As a footnote, it's committer representative election time again.  How will you decide how best to cast your vote given the 4 available choices this year?  Of course you'll want people who actively represent your committer interests at Eclipse, so you might glance at commit stats to see who's actively committing to notice these lines-of-code-committed stats over the past 1, 3, 6, and 9 months:


As a caveat, keep in mind that modeling is a great productivity amplifier!  Not only that, code commits are not the only significant committer activity and are mostly certainly not a good measure of who will best represent your interests.  On that note, I can only promise that, if elected, I'll continue to do my best to make sure Eclipse is a great place to be.  You can definitely count on me to take action where action is needed.

Thursday, 25 April 2013

Modeling: Eclipse Daze at JAX 2013

Eike and I (well, mostly Eike because I'm faul) have organized this year's Eclipse Modeling Day at the JAX conference in Mainz. We hope to see you in Gutenbergsaal 2 on Friday, March 26th, at 9:00AM sharp. Eike will perform feats of magic to entertain you.


We think you'll really enjoy the mix of technology talks from Eclipse project leads and experienced industrial users.

Wednesday, 16 January 2013

Decorating with EMF

I recently added something totally cool to EMF.  It's so cool, you might want to use it even if you don't use EMF for anything else.  You're probably aware that JFace provides tool tip support for column viewers and of course, as a user of JDT, you've likely made extensive use of the Java editor's Javadoc hovers which display HTML-based information that even allows hyperlink navigation.  It's effectively a mini browser.  With the new feature I added, you can easily display HMTL-based hover information in any column viewer. You can see that in action with the sample I created; you'll need the latest build.  It's an RCP application that looks like this:

It displays a simple hand-written file system "model" where the files have links to other files. The hovers allow you to navigate those links within the tree. Note that EMF ships with many fine-grained features, so you need only depend on EMF's Common UI feature to exploit this, i.e., just two very small plug-ins, not the whole EMF runtime.

I used this basic feature to implement improved validation support. You can try this out by enabling Sample Ecore Editor → Live Validation.  With that enabled, whenever you change the model, the tree view will be decorated with validation results.  For example, when you create a new EClass, it won't have a name, and that's invalid.  The hover displays that as follows:

Note that the validation decorations propagate up the tree. The hovers at these higher levels display a composed result which contains links to allow you to navigate directly to any child object with a problem.

Also, the properties view itself is decorated, so a feature with a problematic value will be called out and selecting it provides details in the status line.

Pretty cool hey? And now for the best part: this has all been generated.  So if you'd like to see this type of thing in your own model, just set the GenModel's Editor Decoration property to Live, regenerate the editor, and enjoy the results. Have a look at the underlying infrastructure and let your imagination run wild with creative ideas of your own.

I'd like to thank itemis, the generous sponsor of cool things, for funding this year's "Christmas tree decoration" effort. The benefits will definitely outlast your decorated Christmas tree.

Wednesday, 9 January 2013

EMF Can Do What?

I've been very busy these past months implementing all kinds of cool new things. Of course I always intend to do some marketing for them, but once each problem is solved, it loses its glitter and I quickly focus on the next cool thing.  I know I really should take time to make the community aware of new capabilities, because it makes those things more valuable in reality, but I still prefer to focus on development.  Oh well, we all know where the road paved with good intentions typically ends.

As an example, I'll bet very few people are using using a ResourceSetImpl.ResourceLocator, something I added in EMF 2.8, because they don't know they can. You can see how it's used in the unit test, i.e., just create it and you're done.  What does it do? It allows ResourceSet.getResource to find the resource without searching the whole resource set.  If you look closely at how it's normally implemented, you can see it uses quite an expensive linear search that is made even more costly by the need to normalize each resource's URI to do proper comparison.  By adding a locator, the cost reduces to a fast mapped look-up where the performance is independent from the size of the resource set. Most importantly, the map is properly maintained, so no matter what you change, including changes to the URIConverter's URI mappings, you'll always find the right resource in constant time.  So if your application has a large number of resources, your should consider using it.

The most recent example of a cool new feature is support for reified types. You'll only notice this change if you use generics extensively and you regenerate your model, assuming I've not broken anything in the process, because then you might notice sooner!  Consider the following model:

Notice that in menu we know the children and selected element should be menu elements. With the latest build, the generator realizes that too, so it generates the following overrides in the menu's implementation class.


In other words, the generator will ensure fail-fast, type-safe behavior.  Not only that, the edit support is also enhanced.  That is, you can create any type of thing in a container.

But you can create only a menu element in a menu.


Similarly, you can select any type of element in a container.


But you can select only a menu element in a menu.


How cool is that?  You might ask yourself, who would model in this way?  Look closely, you'll find it right under your nose.  I have the good intention to blog about other cool things you probably didn't realize were available.

Tuesday, 13 November 2012

Germany: The Demo Camp Capital of the World

It's the fall demo camp season.  If you look at all the scheduled demo camps, you'll see that more than a third are in Germany!
  1. Hamburg
  2. Bonn
  3. Dresden
  4. Braunschweig
  5. Berlin
  6. Kassel
  7. Munich
If you plan to attend, I'm sure you'll hear something to perk-up your ears and learn something to squirrel away for later.


I hope to see you in the coming weeks.

Monday, 5 November 2012

A Penny Saved Can Be a Penny Wasted

There's an English saying, "A penny saved is a penny earned". The bean counters of the world who run companies large and small follow this religiously.  Carefully managed accounting books tally every bean; the more beans left over on the bottom line, the better the result. That bottom line is the difference between the earnings and the costs and because accountants have little control over  earnings, costs are the variable they carefully scrutinize and minimize. Of course earnings don't come without costs, so it's not merely a matter of minimizing costs but rather a matter of optimizing costs.  Therein lies the fundamental flaw with the old saying. It may well be the case that a penny saved is a penny twice lost.

Consider the money spent on marketing. It's clear that such money must be spent: without such  investment, earnings will drop due to reduced market demand.  So how much should be spent on marketing?  That's a tough question; intelligent people are likely to differ in their opinion though it's clear that making as much market impact as possible for as little money as possible is optimal. It's always the case that making a good impression requires investment.

In the topsy-turvy world of open source software, where money is spent on software that's given way for free, the bean counting formulas go into a tailspin. At best the open source effort can be saved by resorting to a marketing slant, that is, if we give this software away for free, we will grow the market and will increase demand, or save costs, for whatever we're producing for this market.  This is what justifies spending billions on Linux (spare the expensive Window's license associated with each computer sold) and hundreds of millions on Eclipse (ensure that the Java platform is competitive with the .NET platform).

I used to work for one of the largest organizations of the world, so I have a good understanding of the corporate mindset. One of my final lessons learned there is that managers really don't like it when you send notes to their managers: sending a well-intended, constructive note about how best to optimize open-source investment, i.e., essentially the content of the blog I wrote at the start of 2008, proved the old adage "No good deed goes unpunished". So now I work closely with itemis, essentially doing the same thing as I did before, i.e., ensuring that Eclipse modeling technologies thrive in a growing market. To digress for a moment, for me personally, the most exciting software technology this world has to offer in this space is Xtext, driven by the experts at itemis. I fundamentally believe that the integration of concise notations with well-established software platforms, is the optimal way to improve on a good thing.  Xtend is a great example of what I mean, i.e., it's simply a better Java that integrates seamlessly with Java, i.e., it's evolution rather than revolution, improving on what exists rather than replacing it. My own work on Xcore emulates that same approach.  Please come to the Eclipse Demo Camp in Bonn for a closer look.

In any case, back to the issue at hand: optimizing a company's bottom line beans. The problem in this regard at itemis is no different than anywhere else.  Fortunately itemis has an enlightened view, recognizing that the cost of open source investment pays off in the end.  One way that's the case is the money spent on services and that's why assembling the world's leading modeling experts into a cohesive organization has been one of their goals. A battle ground faced by all service companies is that other organizations often see a penny spent on services as a penny best saved; the cost of those savings are all too easily overlooked.

Consider an example back in my earlier days.  EMF is used by a lucrative web server platform as part of  their start-up configuration model.  EMF was one of their 's favorite scapegoats:  EMF slowed down start-up performance with its bloated byte code.  Of course when you have a bloated model, there's only so much you can do, but that argument goes nowhere fast.  Therefore, when I caught wind of this complaint, I pointed out that they could generate much less byte code by changing package creation to load each package from its serialized form and by using dynamic feature delegation for the implementation classes.  Sure, both of these generate slower code, but the important point is they generate less byte code, all of which needs to be loaded at startup, and then bloats the process when it's no longer needed after start-up. They changed these two options in the generator model, regenerated the code, and presto, sever start-up improved by more than 40% with less than a day of effort. Previous efforts to improve start-up involved man-decades of investment, yes decades.  In this case, my help didn't cost them a penny. Unfortunately neither the savings nor the improved sales were ever calculated, but I did get a huge thank you for my invaluable help.  Okay, that last part is just wishful thinking, I never got so much as a kind word. Oh well, it's good to help prevent fires.


In any case, my message to the enlightened developers of the world is to manage their bean counters more effectively.  Don't let them rule your organization. When you need expert help, demand that you get it.  Spend that extra penny and earn that extra dollar.  A team of unproductive developers producing inferior quality results is a cost that must be brought into focus. Demand that this be measured and that it be factored into the bean formulas.  The team of experienced exerts at itemis, including me, are always available for personalized help.  We do workshops too, like the one I'm doing after the Bonn Demp Camp. The Eclipse community as a whole is rife with expertise so for goodness sake, spend a penny, with the realization that in addition to your internal savings, much of that penny will go back into the development of the next generation of the free software that you know and love. It's an investment in the future, an investment in the commons, and an investment in a better way to build the word's software foundations.