Wednesday, July 22, 2009

DSLs - 'faith no more' reloaded

braindead-closeup.jpg Some month ago I was skeptical about lightheartedly jumping into DSL-creation, and I was wondering if I had lost my faith.

Then I realized that I was not the only one: Other people have lost their faith...

Now I realize this was all a spiritual tempest in a teacup. The wisdom was always there, you only had to listen to the right preachers:


There are more external DSLs out there than most people realize and more often than not, I see companies trying to get rid of them.

This is an interesting post by Michael Feather.
I did not know that Erlang was dropped by Ericsson (aka. open-sourced) because thy were concerned with their ability to hire and train developers.

The thing to remember about DSLs is that they are a commitment and the commitment doesn’t end when the initial implementation is done.


Monday, July 20, 2009

Java: living in a revolutionary time

guillotine.gifIt's just funny how there seems to be an accumulation of revolutions lately:
  • Adam Bien: Java EE 5 and 6 are a revolution and not just an evolution
  • Kent Beck about ordinary and revolutionary software design.
  • My humble self: JPA2 - the potential to revolutionize Java development?

  • Is the storm coming?

    Thursday, July 16, 2009

    OS X: fink messes with your java classpath

    Recently I spent half of a night correcting the consequences of a stupid decision:
    I thought it would be a good idea to install Ant with Fink...

    Generally I am a big fan of the OSX package managers Fink and MacPorts. They have saved me a lot of work before.

    But after last night I am very skeptical if it is really a good idea to install a java application via Fink.

    I just typed fink install ant ...

    ...and after the installation finished, my java classpath was quite borked!
    Fink added tons of jars to my classpath (specifically everything listed in /sw/share/java/classpath).

    This had the effect, that Canoo Web Test was not working any more!
    Reason: Fink has put an incompatible version of Rhino on my classpath ...

    My first error was probably, that I installed the ant package and not ant-base package. Because ant comes with a lot of java dependencies ...

    Nevertheless I don't think people usually want fink to mess with their java classpath ... this has such a potential to break things ...

    After finding out the reason, I spent some time with fink purge -r to get rid of all those packages that polluted my classpath... It turns out that installing stuff with fink is a lot easier than getting rid of it again ...

    Tuesday, July 7, 2009

    Visual modeling: Is it worth it? An example...

    PlasticSurgery2.jpg The following link points to an interesting article (in German):

    Groovy-DSLs mit Eclipse-GMF visualisieren

    The article perfectly shows some of the issues I have with the current state of visual modeling and MDSD.

    The first part of the article is about implementing a domain concept. This is directly connected to the business problem which should be solved by the software at hand.

    The second part of the article is about making the solution of the first part accessible for visual modeling.

    I did quite easily understand the first part. The second part however seems a lot like rocket science to me (or some secret ancient ritual). There are a lot of steps and different concepts involved (code, configuration, libraries, guis, wizards, repetitive reflection of the actual domain concept, mapping ...).

    While I feel confident, that I learned something from the first part (creating a simple textual DSL with Groovy Builder), I do not have the feeling that I learned something useful from the second part, except that it is very complicated to use GMF...

    In my opinion, as long as setting up (and maintaining) visual modeling for a certain concept is so much more complicated than the underlying concept itself, visual modeling hardly pays off!

    5-popular-plastic-surgery-procedures-250x150.jpgYou really have to evaluate costs versus benefits. And in my experience this is almost never done properly.
    In the given article: What is the real benefit of visually modeling the process-chain?
    Who is the target? Who will be using the visual modeling capabilities?
    Are stake holders really able and willing to grasp the visual models? Or are you still going to communicate with them by Visio and Word?
    If it is not for the stakeholders, do developers really like to work with the visual models, or is the simple textual DSL much more preferred by them (easier handling with current tools (refactoring, diffing, versioning ...))?

    If you think about these questions, is the effort put into the infrastructure really worth it? The article says itself:
    Indeed the learning curve [of GMF] is very steep. [...] To gain a better understanding there is often no other way than explore the GMF-Code with the help of a debugger.

    This quote alone would rise a big questionmark if I were the project leader of a project that is actually supposed to provide business value...

    In my opinion visual modeling is vastly overrated, and especially in the current state is hardly worth the effort.

    In my experience any large-scale modeling efforts often turn very fast into a completely disconnected reality-loop. People are wasting a lot of effort just to conquer the accidental complexity that is introduced by the modeling requirement. The actual business requirement then comes only at second priority.

    strong_current_sign.jpg The metaphor that comes to my mind is this:
    At the beginning you have a business goal, that is like the requirement to cross a river. But once you jumped into the river, you notice, that you vastly underestimated the current.
    From now on you are fully occupied to keep your head over the water. Reaching the other side (not to mention at the specified spot) is of no priority at all any more.

    Monday, July 6, 2009

    Some developers have good taste ;-)

    From a unit-test of OpenEJB:
    movies.addMovie(new Movie("Quentin Tarantino", "Reservoir Dogs", 1992));
    movies.addMovie(new Movie("Joel Coen", "Fargo", 1996));
    movies.addMovie(new Movie("Joel Coen", "The Big Lebowski", 1998));
    

    I think I could find some common interests with this developer :-)

    Wednesday, July 1, 2009

    NetBeans Showstopper: Running Tests

    Update 2009-07-02: Adam Bien has some related info here, but this still does not solve my issues (easily running single test methods, failing JUnit tests in maven projects, crappy TestNG integration in maven projects)


    netbeans-logo.pngBasically I like NetBeans. I have been successfully prototyping applications in NetBeans, and especially the Glassfish integration is superb.

    Unfortunately all the commercial projects I have been working on had been using Eclipse. Compared to Eclipse, I think NetBeans is much more intuitive to use and better organized.

    Another advantage of NetBeans, is the native Maven integration, which seems still to be a major kludge in Eclipse.

    Recently NetBeans 6.7 was released. This motivated me to toy around a bit.
    But soon I encountered a major showstopper: the infrastructure to run tests is really poor!

    It seems not to be possible to run single test methods!
    For me this is just not acceptable. To do micro-iterations and test-driven development, I have to be able to run single tests.

    NetBeans only offers to run all Tests of the whole Project or the tests in a given File. That is just not good enough!
    Both Eclipse and IntelliJ can run Tests on any granularity level (method, class, package, project), and I am heavily using this feature.

    According to this bug-report, it should be possible to run single test methods for Ruby development in NetBeans, but I did not verify this.

    Also the TestNG plugin seems to provide this functionality for projects using TestNG.


    When I tried to run tests in a Maven project the situation got even worse! Basically I was only able to run all tests of the whole project.

    With JUnit, while running the tests for the whole project (or from maven on the commandline) succeded, running the Tests from a single file failed (the project was a simple example from OpenEJB).
    Both Eclipse and IntelliJ had no problems running the single tests of exactly the same project...

    Running TestNG tests in a Maven project (I tried Hibernate Envers) was possible, but the IDE always delegated to Maven to run the test goal, which resulted in all tests beeing executed... slooooow... it did not matter if I chose to run a single test method or the tests in a file.
    Again, both Eclipse and IntelliJ had no problems running the single tests of exactly the same project ...

    RoadClosed.jpg Unfortunately I have to come to the conclusion that NetBeans is unusable for me, and I think for any project, that sets a focus on developer testing ...

    Maybe I am overlooking something, then please enlighten me ...

    Googling showed that also others had the same issue: here, here and here ...

    Related Posts Plugin for WordPress, Blogger...