Posts

Maven: Compile to a RAM-drive

While preparing to do a backup recently, I realized that I had over 2GB in 110.000 files which was the result of either an Ant build or Maven target. It occured to me that with Maven especially, this is nothing more than garbage to keep around, since Maven will copy the artefacts to its /.m2 folder anyway! In a previous blog entry , I explained how to mount a RAM-drive on Ubuntu and use it as a development folder for much higher performance in the compile-test-run cycle. I have to admit, I don't use this for each and every project since it's a little complex and fragile. But there's an interesting compromise to be had here. It turns out it is possible to instruct Maven to build artefacts to a RAM-drive. That way you not only gain some performance but also some automatic "garbage collection" in that by the next boot, you will have no traces of these build steps laying around. It would also be a very healthy thing to do if you're running from of an SSD drive, wh...

The pain of request scoped JSF

While I like the idea of a component based web framework, JSF never really felt right to me. There are too many pitfalls and the whole programming model (even with the use of Facelets) feels cumbersome and more complex than necessary. I could probably write up a detailed list of reasons for why I think JSF is the least productive and fun web frameworks of those I know, but that is not the purpose of this blog post. Suffice to say this appears to be a shared sentiment . This post addresses only JSF's focus on server state and the associated overloaded POST aspect. The problem of state All programs that does anything remotely interesting, needs to keep some kind of state. In web applications, there are really only two places to put state and that is either on the server or on the client. Because HTTP itself is stateless, most frameworks stores state on the server in a session that is allocated the very first time a unique user visits. This is done either through an associated cookie ...

Confessions of an RC heli noob

Image
Ever since I was a boy, I've been impressed with two kinds of machines: Ferrari's and helicopters. I guess the two don't share much apart from the price tag and being primarily a male thing. Never the less, since treating myself a ride this summer in a Robinson R-44 over a Canadian national park, I've been moving slowly but surely into the realm of remote controlled helicopters. Off to a wrong start I always knew helicopters were among the most difficult things to control, yet I still wasn't prepared for exactly HOW difficult. Of course, I did not exactly make it easy for myself by starting out with a 400 series 6-channel 3D capable outdoor helicopter, like this Hughes 300: Since then, I had some fun with other models. For instance, just as a toy for my nephew I got the Silverlit TandemZ mini helicopter, a tiny 3-channel indoor model that actually flies pretty decently albeit terrible susceptible to drafts. This really is just a toy though, do not expect to be able ...

Java Enum relational modelling

As I have blogged about before, the Java Enum is almost perfect . I say almost because of the annoying restriction that its constructor cannot include a relation to itself, due to forward reference limitations when using the Sun compiler. The issue came up again recently when I wanted to model authority roles in Wicket , so I spent a bit more time with the issue and the following is what I've learned. First though, a recap of the original problem. Consider the following attempt at modeling states of a CD player: public class IlligalForwardReference {     enum Player{         PLAYING(Player.PAUSED, Player.STOPPED),         PAUSED(Player.PLAYING, Player.STOPPED),         STOPPED(Player.PLAYING);         private   final EnumSet<Player> transitionStates;         Player( final Play...

Jasper Reports and legacy formats

I'm not sure when exactly or between which versions, but at some point Jasper Report designs moved from being based on legacy DTD to the more modern XSD schema. It turns out that most tools today, i.e. the iReport plugin for NetBeans, are now overwriting the DTD information of legacy designs in favor of XSD information. This can cause problems if and when you are not able to change the Jasper engine itself that fills out the template designs. It also did not seem possible to simply plug-in another XML parser and I found it rather hard in general to find information about this and support forums to turn to. So I sought another solution. If you try to run an XSD based design against the Jasper engine that can only deal with DTD, you will get an error along the line of this: net.sf.jasperreports.engine.JRException: org.xml.sax.SAXParseException: Document root element "jasperReport", must match DOCTYPE root "null". By using a legacy designer which favors DTD's (...

Congratulations America!

Image
I think it's only in order to congratulate the USA for what has happened. While oddly 47% of Americans still haven't noticed, the last 8 years of an illiterate republican doctrine "if you're not with us, you're against us" has hurt their country incredibly much. As evident right from the beginning to most of us, Bush will go over in history as the worst president of all time - only elected for his second term I suppose due to that fuzzy term called "American patriotism". The only sad part will be missing someone to laugh at when watching Letterman, The Colbert Report or The Daily Show. Ah for a while at least, we'll always have Gucci Palin. ;) Best of luck Obama, you sure have your work cut out for you! The future just got a lot brighter in the prospect of regaining an America so many of us used to admire once! With a new dawn near and a fresh breeze blowing from the west, let the healing begin.

Groupwise 7 on Ubuntu 8.04

While web applications in browsers are continuing to improve, they still can't quite compete with desktop applications. One of the examples of this is the Novell Groupwise client. Running 64bit Ubuntu poses a bit of a challenge, since Novell only offer prepackaged rpm bundles for 32bit Red Hat and Suse systems. Note, some of this stuff is inspired by Scott's blog entry earlier this year, however I could never get his howto to work for me. Start by downloading the Groupwise client RPM onto a 32bit version of Ubuntu (I use a 32bit image in VirtualBox). I'm not sure from where I found mine, but it's out there if you search a little. You should end up having a file called something like novell-groupwise-gwclient-7.0.3-20080310.i386.rpm To convert this into a debian package, you are going to need alien. Get this by typing: sudo apt-get install alien With alien, you can convert the RPM into DEB by typing: sudo alien -c novell-groupwise-gwclient-7.0.3-20080310.i386.rpm Now yo...