d3.js getting started

I love visualization of data. It is fantastic what and how you can visualize data and make it accessible and understandable. Specifically I like tree, radial trees and graphs . While the tools some years back were rather restricted to thick clients and Flash applications, we can transport great visualizations with the means of a simple (recent) browser.I recommend this book ‘Beautiful Visualization’ by Julie Steele, Noah Iliinsky (link)

For a while I worked wth prefuse and flare (2 nice but more or less defunc projects), now I start to implement some real life applications with d3.js (link). The features are awesome but the documentation is still rather short, the API doc is complete, but not much hello world stuff to get started with, other than dissecting some of the sample in the download.

What do we need to get started ?

  • A browser and a web server (for Linux users: there is one build in your machine, just start python -m SimpleHTTPServer 8888 and the current path becomes ‘server’)
  • Download d3.js (comes with plenty of samples, some of them will NOT run when you open the html files as file, use the webserver instead!)
  • Text editor (Kate, vi,..)

What is the most simple visualization sourcecode ?

  • Create a html file and place the d3.js in the same or lib folder.
  • Lets draw a circle (I took this from one of the get-started blogs by Christophe Viau, link)
    <!DOCTYPE html>
        <title>Hello, data!</title>
        <script type="text/javascript" src="lib/d3.js"></script>
        <div id="viz"></div>
        <script type="text/javascript">
        var sampleSVG = d3.select("#viz")
            .attr("width", 100)
            .attr("height", 100);
            .style("stroke", "black")
            .style("fill", "white")
            .attr("r", 40)
            .attr("cx", 50)
            .attr("cy", 50)
  • Open the browser

    Most simple d3.js sample

I hope I find the time to share more with you once I get the grip on this tool.

Kenai.com alternatives ?

Kenai.com (link) is dead (shot by the Sheriff, but he didn’t shoot no deputy, ooh, ooh,..) and by April 30th you better backup your belongings, otherwise they go /dev/null. (The domain will be removed as well). Unfortunately it was well integrated with Netbeans and this level of collaboration you wouldn’t achieve with another OS code repositories. No choice, so here a comparison of services on wikipedia (link).
My personal choice: I will select one with a public API, potentially could create a plugin (if it is not available yet). Maybe Launchpad or Github.

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

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 !

Continue reading

OSSPAC 2009 – Open Source in Singapore


– 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.


  • 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

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

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

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)