Posts Tagged ‘opensource’
  • Give back to the community (please?)

    Last week, I was ticked off by the behavior of a colleague: he complained the duplicated code panel in Sonar was not explicite enough. When I remarked he could give feedback to the Sonar team, he replied he had other things to do!

    As for me, I use OpenSource projects since a while back: Struts was my first, but now there are the whole Apache frameworks (Log4J, CXF and Commons just to name a few), Spring, Hibernate, Vaadin of course but also tools like Maven, Hudson/Jenkins, Sonar and the list goes on! All these projects are not only open sourced, they are free - as a beer! Even better, all of them have detailled documentation and a user base that equivalent commercial products sometimes lack.

    Of course, companies publishing these frameworks aren’t there for the glory, they have to earn money. And yet, I can use them “as-is” and have the framework behave just like for a regular enteprise paying user. I don’t think there are many industries in the world where the production bricks are available at no cost as is the case in the software industries.

    However, using these frameworks/tools without paying is a one-way deal. Yet, we can provide editors with a much valued thing: feedback. Commercial editors use time and money to conduct surveys that will direct their development effort. But just as we are provided with free products, we can provide OpenSource software editors with a costly resource, our own opinion.

    That’s why it’s very important to take only 10 minutes to fill an issue or an enhancement request. Besides, it will benefit all of us in the next product version. So please provide your favorite editor with feedback!

    Note: since the initial complaint was not fully unjustified, I’ve filled a Jira describing the request

    Categories: Technical Tags: opensource
  • Shark! Shark! in the IT business

    Shark! Shark! screenshot

    Do you remember the classic Atari ST game where you, as a fish, eat other fishes while getting bigger and avoiding bigger fishes to eat you? It seems the last 4 years has seen its share of fishes eat and being eaten in the IT business.

    Oh, it began innocently enough. JBoss just hired the Hibernate team. It was in November 2005. Less than 6 months later, JBoss was bought by Red Hat. I thought: “Wow, now Red Hat can provide a whole stack from Operating System to Middleware!”

    January 2008: Oracle finally buys BEA Systems, the only serious commercial concurrent of IBM in the application server market. It already tried the buyout in October 2007. I then thought: “Oracle can provide the last 2 tier of any JEE application, Middleware and Database (please don’t raise the issue of Oracle Application Server). That’s interesting!”

    About the same time, Sun has got the same idea the other way around when it buys MySQL. I thought: “They have both invested in OpenSource, that’s good strategy!”

    When SpringSource bought Hyperion, my sense of wonder began to dry.

    Now that Oracle has bought Sun and VMWare has bought SpringSource, I’m finally more concerned than ecstatic. Concurrent products that competed against one another are now in the same provider’s portfolio. No business has interest in having the same redundant softwares in its catalog. And lacking competition means no evolution, like Darwin theorized.

    I always complained about Microsoft’s choices being more marketing oriented than technically sound. It could do that until it was the major player in its field. Java and Google put an end to that (ok, not entirely, this is open to discussion but let me make my point). In turn, and although Java was meant to stay a loooong time in version 1.4, Sun made it evolve because of the progress made by the .Net framework. From my humble point of view, that’s a vertuous circle in IT darwinism.

    One may rightfully think the circle is now broken, when one looks at the following points:

    • Oracle Application Server and WebLogic are now owned by Oracle. Whereas stopping the development of OC4J may not be a bad thing in itself, I can't be so sure about the whole stack surrounding both.
    • Even worse, why would Oracle need to put money in Glassfish development, now that it has WebLogic? I'm not an ardent Glassfish defender but it plays its role in the JEE ecosystem.
    • I can't even think about Oracle database and MySQL, now that Oracle distributes Oracle Lite for free. That goes without saying but it is for development purposes only and without an OpenSource license of course.
    • What about JDeveloper and NetBeans? I fear only very bad things since if NetBeans development is stopped, it will mean IBM will do as it pleases with Eclipse (yes, I know about the Eclipse Foundation, but it still smells).
    • And poor JRockit?
    • And so on, ad nauseam.

    The present concentration trend raises concerns, at least from me, because it may well end when there’s only one single player left standing. Remember the Atari game I talked about at the beginning? It was aptly named “Shark! Shark!” because regardless of the size you were, you could always be eaten by the shark. Whoever will end up being the shark, I can only guess, but if this doesn’t stop soon, we are all about to get eaten!

  • Manage the quality of your projects with Sonar

    Sonar is a free OpenSource product that provides you with a general dashboard displaying information about the codebase of each configured project, such as:

    • Number of failed tests,
    • % of code coverage,
    • % of rules compliance (more later),
    • % of duplicated lines,
    • and much more.

    Then you get an additional graphical information showing:

    • a square for the size of your project's codebase relative to the entire codebase's size,
    • a color (from red to green) for the % of rules compliance.

    Sonar Dashboard screenshot

    Yet, what are considered rules compliance? These are rules defined by products you (may) already know:

    Sonar provides you with the means to configure these rules in 3 categories: mandatory (error), optional (warning) or inactive. Some rules can even be configured with parameters, i.e: the maximum number of lines of a method. In this case, you can override the default value.

    Sonar uses two modules:

    • a Maven plugin that does the real analysis,
    • a web application for configuring rules and displaying information.

    Analysis results are saved in a database. This enables to you to display the trend of your projects. In Sonar, it is called the Time Machine: if codebase’size stays the same, are there more violations? Or if the codebase’s size increases, does the number of violations increases too?

    Sonar Dashboard screenshot

    By default, Sonar uses a Derby (sorry, JavaDB) database but it can easily be configured with a 3rd party database such as Sun MySQL.

    Sonar is very simple to use. Just type this line on your Maven2 project directory to do the analysis:

    mvn clean install org.codehaus.sonar:sonar-maven-plugin:1.5.1:sonar

    The web application must be separately installed but the install process is on par with the analysis. You can have a running Sonar instance in less than 2 minutes (I did it, so anyone can do!).

    Since Sonar is a Maven plugin, it should be a breeze to integrate the analysis on a Continuous Integration platform.

    All in all, Sonar is a nice easy-to-use product intended for quality managers, project managers and architects alike. Some features, such as the Time Machine, are not provided by any other OpenSource projects that I know of. If you already use one of Checkstyle / PMD / Findbugs, I can’t recommend enough taking a very thorough look at Sonar, you won’t regret it.

    Categories: Java Tags: open sourceopensourcequalitysonar