Browse Tag



I have become a bit obsessed with the java community lately more in a consuming fashion than a participatory fashion, reading Java Desktop and listening to the Java Posse and it just keeps coming up how much everyone loves Netbeans and that everyone should be using it for Java development.

Features such as Mattise look to be very good and a great reason to use the IDE. However as an Eclipse user there are just too many features that I miss to change IDE for now.

  1. Per project settings including templates and code style
  2. Macro for YEAR for code templates
  3. Incremental compiler.
    On a small project of only one file takes a good 3 seconds just to launch even if it is built. Like really do you need to build a jar always when executing projects? As good as running everything through ant sounds it is just too slow when compared to what you get for free with eclipse.
  4. Editor support.
    Supposibly the java editor is greatly improved for version 6, however in the test build I used M9 it is still slow, non intuitive and just painful give me eclipses Ctrl-1 quick fix any day.

Completion in the IDE space is good but for my everyday java development it is still impossible for me to switch.

gstreamer port to Java

It has long been discussed in the java community about the lack of a good multimedia framework for the platform. After reading Chris Adamson’s wrap up of his JavaONE BoF I felt here is a cause I could really get behind.

I starting thinking yes wouldn’t it be great if gstreamer was ported to java. I started doing some research and grabbed a copy of the gstreamer cvs. But just as I was getting my hopes up I read that sun was going to do something about multimedia. But by the time I got to the end of the blog entry I realized that it is a smaller project of giving a common java wrapper for the platform services ie Qucktime on OSX, DirectShow on Windows and I guess gstreamer on Linux.

As the days went on and the comments on Chris Adamson’s blog kept commoning many people believe that a full stack is needed but no one is willing as far as I can tell willing to have a go at it. One even goes as far as to say that it is too hard because gstreamer usually just wraps other binaries such as ffmpeg and would just be too hard.

There is also the Cortado sub project of flumotion which is a very simple applet for viewing ogg theora videos. At it’s core there is a partial port of gstreamer that is undocumented and is very C-style coding.

So for fun I want to start trying a full port, so I have read the gstreamer application development manual and the plugin writers guide and now feel I have a fairly good understanding of what is under the hood and how much work this is going to be. I think alot more than I even realize right now.

A few design features I am thinking of going with now are:

  • Full java stack as far as possible only pure hardware plugins such as video4linux etc would call native code.
  • Rewrite all previous java implementations ie, jorbis.
  • Elements as POJO’s and use introspection for properties rather than a map.
  • Java SE 6 only.
  • Heavy use of java.util.concurrent.
  • Core released as GPL plus classpath exception and plugins most likely GPL.

Now I know it will be a lot of work and knowing me it will probably never be released but if you think this is a good idea and want to put you 2c’s in then please leave a comment.

Update: 16 Jan 2009

Well with the release of JavaFX and the fact that I never have any time to code outside of work I guess this idea will never actually come to fruition.

Asserting SwingWorker

I have had a chance to play around with some java code recently for a change of pace and I was excited to use the new SwingWorker class in JSE6. However I also am in the habit of programming with asserts which I found out to be a problem if one triggers while running in a SwingWorker thread.

If you look at the base class of SwingWorker, FurtureTask, in the inner class Sync, which is where the actual task is run there is this method:

boolean innerRunAndReset() {
    if (!compareAndSetState(0, RUNNING))
        return false;
    try {
        runner = Thread.currentThread();
        if (getState() == RUNNING)
  ; // don't set result
        runner = null;
        return compareAndSetState(RUNNING, 0);
    } catch (Throwable ex) {
        return false;

The observant reader will notice that this code will catch all Throwables, which is the base class of Exception and Error, and an assert in java will throw a AssertError so your code will bomb out silently without notification if any Throwable is thrown.

try {
    // do threadded work here
} catch (AssertionError e) {
        "Assertion while processing: {0}\n{1}",
        new Object[] { e.getMessage(),
        e.getStackTrace()[0] });
} catch (Exception e) {
        "Exception throw during processing {0}\n{1}",
        new Object[] { e.getClass().getName(),
        e.getMessage() });
    throw e;
} catch (Error e) {
        "Error throw during processing {0}\n{1}",
        new Object[] { e.getClass().getName(),
        e.getMessage() });
    throw e;

I use the a statically defined Logger, logger, to print output from the Exceptions and Errors.

This allows the thread to throw asserts but keep going and if it does bomb out on any other Error or Exception you get notified in your log making debugging a SwingWorker a bit easier.

A Podcast for the Few

I have been listening to the software engineering radio podcast for a few months now it covers a number of topics on current software engineering trends and has interviews with different developers.

I enjoyed the recent episode on dynamic languages for static minds, which applies so well to me, although I still haven’t been converted to a dynamic language developer it has got me to re think my ideas on them.

Since I finished University over a year ago now I was missing the new ideas and methodologies that gets taught there but programs like this enable me to learn new ideas while working, ahh listening to music/podcasts while you work.

I recommend subscribing to this program which releases a new episode about every 10 days for all you SE’s out there.

Ready Set Rant

Well are you all ready for yet another rant about people and their cars? Well I certainly am.

Last Friday I was pulling out of a car park and I noticed as I was pulling back that the person directly behind me had their reversing lights on also but as a I was already going and they were just starting I thought, “Hey I’m right here just keep going and they will wait”. Well how wrong I was! grrr.

So I got halfway out just about to put my car into 1st gear and I see this person pulling out I thought “Oh no!” so I hit the horn…. But to no avail this looser just kept coming all I could do was sit there hand on horn and wait for the inevitable… Once they realized what happened they quickly pulled back in and I get out to assess the damage.

Thankfully they didn’t cause any damage. But they didn’t even get out of their car; this stupid looking Kia Carnaval thing. I couldn’t believe it they just sat their. But as there was no damage it was Friday evening and I had my dinner in the car going cold I just couldn’t be bothered with it all. So I left….

Now I guess they couldn’t see my little Excel in their giant blind spot maybe but to not stop while there is a horn going for like 3 seconds behind you is just plain stupid… Grrr.

Enough of that now I’m getting red blooded just thinking about it. I checked broken code into source control last week, a first for me. We are in the middle of a giant refactor of our codebase so it’s only natural that I can’t do it alone but checking in code that leaves the copy under source control unable to compile just feels dirty…

Oh well until next time rant on brother/sister.

Interesting Java Proposal

In the java community there has been a long and heated debate about adding delegates to the language. There is a white paper on Suns website explaining there position on the debate. Which is in response to Microsoft’s implementation of them in J++ which in tern could be deemed as the turning point for Microsoft to then create the entire .NET architecture. Although it doesn’t have a date on it using the way back machine we can see that the paper has been around at least since the beginning of 1999.

I hadn’t read the paper until just last week and I agree with what it’s saying functors/delegates are a quite strange structure in c/c++/.NET and can be difficult to explain. On a side not I have also read that Java is a much more strongly OO architecture than .NET, which is more an easy wrapper over windows as always (grr I can’t stand MFC) anyway… I was looking at some new features for c# 3.0 and in particular extension methods which I am of the opinion are really syntactic sugar for the lazy VB programmers out there, ducks for cover.

But in my search I also found a new paper that is proposed for Java written by three prominent figures including James Gosling, the farther of Java, Closures for Java, there is a pdf but this is a verbatim copy on Neal Gafter’s blog.

Neal has 4 other posts about them and I recommend reading them all if your head can get around them, it took me 2 goes at it. I can see how these constructs could be very useful in getting rid of boiler plate code from a lot of Java programming, which is always a good thing, but I can also see it becoming a problem as well when used too much. Since it is a way of almost changing the language itself you could quickly start having the same headaches you get for heavily preprocessed c/c++ code.

I am still not sure as to whether they would be a good thing for the language if introduced it will be something that will probably not make it into begging programming courses. One of the things I have always liked about Java is that once you understand the OO principles of the language which can be picked up in a short amount of time virtually all api’s and constructs can be created by the programmer. If not very well designed used but use none the less.

I’ll keep tracking Neal’s blog for more insights into uses before I am really sure but it is none the less a very radical and interesting proposal none the less.

Big News

Well once again me like some of my friends find it hard to actually get to the content page and add new stuff to their blogs but I think the news of the last 2 weeks really deserves a blog post.

Well probably the biggest news is from this week, Merinda and I have bought a block of land! And get this it’s in Mernda, that will make for interesting conversations and lots of spelling names over the phone. And it only took us a week to go from looking at existing properties to buying land and looking at houses to build!

With stamp duty here in Victoria being so high it doesn’t really make much sense to buy a fairly expensive property that will be over 20 years old.

The other big news is that I received a employee recognition award which is always quite strange. It was for integrating one of Microsoft’s better technologies into our product, the ability to write mini-dumps in the event of crash. Which then allows us to see the stack and trace the line of code that the crash occurs on.

Finally I wish to say that mustang (or JDK6 as it is now known) ROCKS it makes programs such as jbidwatcher seem so much more polished. With true double buffering the windows no longer goes gray when repainting, and the new register allocator that I talked about a while ago makes every java application fly. It’s still in beta but when it releases for real it will be a great step forward and with the open sourcing of the platform to be complete by ruffly the end of 2007 I’m looking forward to more java technology into the future.

Undelivered Mail And Incredible Building

Well aren’t I the lazy boy I haven’t put up a post in ages….

Well this week has been a bit stressful in getting a build ready so hopefully I can be excused.

If you are a /. reader you may have heard about a small start up called blue security who had a novel concept of fighting spam by sending thousands of un-subscribe emails to the perpetrators of the spam. I signed up for this free service and started fighting my spam.

However one of the leading spammers in the world didn’t like this idea much and started a campaign to stop the company. Bringing down websites such as tucows and typepad in the process. And eventually Blue Security threw up their hands and called it a day.

This has left me without a spam fighting technique and now with my email address well and trully in their address books. To the point now that I am receiving 2-5 emails a day saying that mail was undelivered so these quite insidious people are now using my address as a return address for the spam they send out. How Great!!!

On a note of the more professional nature we are trialling Xoreax Incredibuild, a distributed C++ build system for Visual Studio and it is going well. Nothing quite like your colleagues cpu idle cycles working for you instead of against.

Well I guess that is enough angst for one day.

Laptop Support From Where?

I would like to say that I am completely disgusted with the support some vendors provide for their hardware. I have been trying to get sound working under Linux now for my BenQ S52-v54 for a long time now, it has now come to the point that I am trying to write a patch myself, yey for kernel hacking.

This is a documented bug in ALSA for my laptop as one of the notes said this is a CX20551 chipset from Conexant I event went to the trouble of filing for support:

The chipset on this laptop does not work under the Linux Alsa architecture and is a current bug request:

To develop a compatible driver for this chipset I wish to confirm that it is a CX20551. An exact number would be optimal.

Any support documentation and such as that available for the CX20468,,
would also be greatly appreciated.

Thank you

Quite civil I thought I was just asking for a confirmation and possibly some documentation on the chipset that I own in my laptop. Not too demanding I just want to know about something I own. I filed it as a Linux support issue because it was relating to Linux but the question is not necessarily about supporting Linux. I’m not asking for them to provide drivers etc. I received the following reply:

Keep Reading

Software Engineering

It’s been a long time since my last post, in that time I have moved house, done summer school and started full time work. And that goodness for that last point I am so sick of study. Only one more exam tomorrow to go yey.

Anyway today I came across such a great article that I just have to share it with the no readers I have here :P. Software Engineering, Not Computer Science it talks about how Software Development should really be thought as engineering and not a science or an art so much.

Lucky for me I am now a qualified Software Engineer however with the decline in numbers my Course at Swinburne will no longer be offered. And such a relevant course to do o well alot of maths isn’t for everyone.