Tutorial: Getting started with Netbeans and JUnit plus Cobertura (Part 1)

25 09 2009

I believe strongly in testing. I saw companies and products without any automatic test frameworks and the slightest change to the codebase (often in the urgent ‘we-need-to-fix-it-now-and-give-to-the-customer-in-1hr’ mode) made parts of the product or modules prone to crashes because no one could test the changes against the complete application. In my current endevour to create a new product we embrace testing, though we dont practice TDD (test-driven-development), but at least we maximize the amount of automatic testing with tools/frameworks like Netbeans, Hudson, Cobertura and others. If you dont practice TDD, how can you judge how much of your codebase is really tested, even you assume all you business testcases are covered ?

The other day Code Coverage crossed my way (Thanks Chris!). Eager to find out how to “do it” or to “use it” I found a few tools suitable for the Netbeans environment. It actually drilled down to only one tool: Cobertura. It fits exactly into our landscape using Netbeans and Hudson and it is opensource.
To get started with Cobertura you should be familiar (a bit) with Netbeans, JUnit and Ant. The Cobertura website offers sufficient reference for all functions and introduction to get you started. But what I missed is a tutorial the start from the scratch using Netbeans and Cobertura. I found 3 references (I will add them at the end,) which are not complete or just not working for me), so let me share the most basic getting-started steps with you.
Please note: This is how I get started, it might not be complete, foolproof or even correct in all details. Please feel free to comment, correct or give other feedback !

Read the rest of this entry »





OSSPAC 2009 – Open Source in Singapore

18 02 2009

osspac_banner_250

OSSPAC 2009
– The first (of its kind in Singapore?) conference attracts developers, adopters and companies from Singapore and the neighboring countries to follow a diverse string of sessions, talks and labs for 3 days this week.
From some very general talks and keynotes to very specific technical sessions and labs everyone should have found his cup of tea. I was surprised by the small number of participants, despite Singapore being a technology hub (not in terms of OS..) and attending the SUN TechDays (blog entry) some 2..3 weeks back with a overwhelming number of people (a commercial roadshow at the fraction of the price, I know).
The conference reflects the OSS landscape in Singapore: Small and not very vivid (yet) as in other countries and cities around the world. Still a way to go ! It lives by participation ! I try to add to it.

I like to compare OS communities a bit with the arts scene, it starts very small, usually by individuals or small groups without any professional or commercial backing, eventually it would pick up pace and more people join in and ultimately companies to sponsor or finance it. It (the initial spark) cannot be engaged, enforced or bought.
Joining last years OS conference in Sydney Australia (blog entry), I found a very vivid and colorful event, some of that spirit could be injected here.

I really welcome the organizers effort to get this conference started, hoping this will be a regular event in the OSS community of Singapore. So far it was worth attending, some very good speakers and  I get to know some new people, companies and products.

Feedback:

  • A simpler conference location could bring down the price and allow more individuals to join.
  • Try to inject more interaction. (QA for keynotes)
  • Maybe you need a moderator for the individual tracks.
  • Where are the lightning talks ?
  • OSS conferences are not a place to wear ties.
  • The light (and sometimes the sound) setup was crap. But thats a general conference problem.

Conclusion (for me):

  • I will join again. OS is based on community and particpation.
  • Gonna hava mor detailed look at Jaspersoft BI and Ingres DB.
  • Signed up for Suse studio !




Application Framework

9 02 2009

Looking around for a nice browser based application framework I stumbled upon 3 opensource products that are somehow integrated into the Netbeans and Glassfish world.

  • Icefaces (Woodstock migrated here) | link
  • ZK direct RIA | link
  • JMaki / Dojo | link | link

I will evaluate these 3 and report about the results here. While Icefaces and ZK are clearly enterprise enabled frameworks, JMaki is a rather consumer application orientated framework. I might be wrong with this statement, but this is my first tast bitting on it. ZK seems closer to Spring and Tomcat than Netbeans and Glassfish.





Installing OpenSolaris 2008.11

24 01 2009

I downloaded the LiveCD already a while ago, but only after the last SUN TechDays here I was inspired to finally install it.

Requirements: OpenSolaris LiveCD and any Mac or PC.

Before starting: Dont waste your time and bandwidth downloading the CD image. FIRST check if your hardware gonna work with OpenSolaris ! SUN offers a smart Java tool (link here) to check your hardware and available driver.

Get Started: Fairly easy Get the ISO file (link here), create a CD and start on any desktop or notebook up. It is a LiveCD, so it starts up from CD and you can play around with it until you decide to install it (there is a desktop shortcut!) or trash it. Note that all application need to be loadd from CD, so this does not refelct the real performance of an installed system.

Out of 2 desktops and 2 notebooks only 1 works fine, or better all drivers were available:
Notebook Dell Vostro 1500 with Intel 8400, 4GB, NVDIA 8600,..

On 2 desktops there was no lan driver available.

On a Notebook Compaq CQ40 during starting from CD the loudspeaker creates a extreme loud squeeching noise which you cant switch of, after hearing this for 1 minute you wont go further.

Extra Software I installed so far:

  • Virtualbox
  • JDK 1.6_11
  • Netbeans 6.5 with Python addon
  • OpenOffice 3.0
  • MySQL

Problems so far (with my hardware!):
Switching on all desktop special effects and flipping between desktops makes desktop freeze und you only can close windows that are already open.

The next release will hit the road in April 2009.





JavaFX 1.0 released

19 12 2008

The battle of RIA platforms goes on and SUN finally released (4th Dec 2008) the first version 1.0 after announcing and previewing it first time at JavaONE in May 2007. FX is the JAVA way of doing thing you are used to see in Adobe Flash/Flex and Microsoft Silverlight targeting integration of video, images, sound and 2D graphics (3D supposed to be in the roadmap). One of the main difference to competitors: Key elements of JavaFX are open source.

I find this an exciting step and it dont force me walk to far away from my JAVA platform environment to create more exciting frontends than standard Swing look-and-feel. It is integrated into Netbeans !

The programming language is JavaFX Script, some mixture of Javascript and Java (spiced with some python look-alike features).

It is not supporting all OS yet (only Windows and MAC OS X) and there is no need to install another plugin (unlike Silverlight), Java JRE just needs to be updated to unleash its power in and outside the browser !

The JavaFX website (link)
SUN one page summary (link)
OpenJFX on dev.java.net (link)
JavaFX Blog (link)
JavaFX Script Tutorial (link)

JavaFX platform

JavaFX platform (image from http://www.sun.com/software/javafx/index.jsp)





Virtualbox 2.1.0 released

18 12 2008

Another major update of the Open Source virtualization software after introducing 2.0 in September earlier this year. This tool is my first choice for clean-box testing of various tools, browsers and so on.

Check the changelog (link)
Download here (link)





OpenSolaris 2008.11 released

12 12 2008

2 days ago the latest OS version was released under the CDDL (free software license by SUN). Currently downloading the iso image I will have a look at its features. With my need to run several boxes for testing and development it is another option besides the various Linux distributions. Interesting enough, some hardware vendors (Toshiba,..) will start to ship notebooks with OpenSolaris preloaded.

Download the Live CD from www.opensolaris.com (link)





OSDC 2008

4 12 2008

Half way through the conference (link),inclusive of one day Google Hackathon. A developer conference like this one offers a wide variety of characters and looks, some of them confirming the usual bias stereotype picture that non-techy people have of geeks, prgrammers and techies with long hairs and T-Shirts with some kind of IT related statement though. There are no ties and suits but lots of passionate guys (and few gals) following the various techy tracks. Amazing enough, I never saw so many people typing aways on some sort of shells and terminals on Linux or MAC Notebooks (Windoos?) during the session
and occasionally looking up and asking questions. There is also the usual religious discussions, views and jokes about the various OS and programming languages and specifically about open source against propietary software or companies supporting it or not.

On the first day, during the Google Hackathon, I get my hands dirty on Googles Social API, Google Maps and the Apps Engine. For the rest of the time there are at almost any time at least 3 different talks, sessions or presentations going on and to choose from. Some rather generic topics, some so narrow and focused on a certain feature, that you wont carry away a lot if you are not into it.
Among the highlight of this years conference so far were they keynotes by Larry Wall (the brain behind Perl, see Wikipedia link) and Chirs DiBona from Google California (handling some opensource related licensing stuff).
So bias we are occasionally towards developer and geeks, so much I enjoyed some of the very entertaining and teaching sessions, not to talk about the Lightning Talks which are an experience of a kind !





My Office Toolbox

19 11 2008

In previous company I used usually (was asked to use) Microsoft Office, MS Visio and MS Project. In my current company I endeavor to use opensourece or free applications as far as possible.

Here the list of alternative products:

  • MS Visio turns into DIA (link)
  • MS Project turns into OpenWorkbench (link)
  • MS Office turns into OpenOffice (link)
  • Nothing turns into FreeMind (link)

I am not into the religious war of Microsoft is evil and dislike everything that comes from Redmond. NO, I use the products as well (and even have 1(!) proper license for MS Office and Visual Studio 2008), but I prefere to stay clean in terms of licenses and I need the above applications on a range of notebooks and desktop PC’s.





On SourceForge.net (Part 2)

8 11 2008

I just released the latest version of my UUID Generator. Now as 0.3Beta, moving away from Alpha status. Not to sure what is the proper distinction between software in Alpha and Beta Stage. Despite the very limited amount of functionality my tool offers, it is still a good exercise to understand the logic of SF Open Source projects. I created feature requests, one of them is in the new release. Still observe the ranking, interesting enough in the second week it shot up to rank 998 then after a couple of days inactivity down to 2268. Now with the new release up to 1924. Guess it is the same like with blogs, you dont write, no visitors. With new entries visitors come back. Thanks ;-)

I am browsing around SourceForge.net and check out other projects. Not sure how many projects are there in total, but there are many dead ones, also test rubbish with big title and ambitious description but no activity at all for months (years). I also notice that only serious projects do bugtracking and have a active forum. Almost no project offers documentation. Reflects a bit the real world though.

UUID Generator 0.3B

UUID Generator 0.3B

Project site at SF.net (link)