Tuesday, December 28, 2004

More Mouse Pointer Madness

Back in October I was having problems under Fedora Core 2 and my KVM with the mouse pointer. Adding psmouse.proto=imps was the previous fix. Well after upgrading to Core 3 that parameter is no longer needed.

Saturday, December 11, 2004

OpenVPN

The company I work for has needed some changes to the VPN solution we have been using for our "road warrior" and remote users. After experimenting with a few different packages we have adopted OpenVPN.
Its simple to setup (once you have wrestled iptables into submission) and can be configured to authenticate via x509 certificates. I was particularly impressed that under Linux 2.6.x it needs no kernel modules/modifications which we found painful with freeswan as every kernel release meant a new compile cycle.

Friday, September 24, 2004

Converting a stream to a local mp3

If you ever need to get a copy of an audio stream broadcast (real etc) as a local file to time delay when you listen to it - say hypothetically that the BBC had just put a radio series online ;)

mplayer rtsp://some.host.name/astream.ra -ao pcm -aofile myfile.wav

this produces a very large wav file (about 300Mb per half hour) that can be compressed easily into an mp3 with lame via

lame myfile.wav

this will produce a much smaller (27Mb in my case) perfectly formed mp3 file for you to enjoy.

Wednesday, September 22, 2004

More On Cruisecontrol and Display with yDoc

In a previous entry I showed a configuration entry to allow the use of headless graphics generation on unix machines.

I have been evaluating yDoc which is a nice tool for generating jpg/svg UML object/class diagrams into the Javadoc process of a build phase. Its a great tool and I will be buying a copy.

The issue I had is that the ant javadoc tag doesn't seem to honor the cruise headless command detailed earlier. After a little more searching through the javadocs for doclets I have found that you can achieve the same thing with the following tag entry :

<javadoc destdir="${javadoc.base.dir}"
author="true"
maxmemory="256M"
classpath="${my.classpath}"
additionalparam="-J-Djava.awt.headless=true -breakiterator"
>

this passes the headless flag onto the running javadoc process.

Sunday, August 29, 2004

Mouse Pointer Madness

Due to a "thermal issue*" I had to upgrade my core Linux box today. I ended up with an AMD3000 and nForce2 motherboard from Maplin as that was the current bundle on sale.
Linux did a magnificent job of just getting on with the new hardware on the reboot (in contrast to the XP partition which ended up in a re-install), the only issue was that once the new nvidia drivers had launched the mouse developed a personality all of its own. Whilst under my control for much of the time, it would occasionally have a moment where it decided to go and do its own thing. Random clicks and a preference for either the top right or bottom left of the screen can really spoil your day.

It turns out that this little gem is a combination of running a KVM switch (mine is a Belkin) and a faster processor. Adding the kernel boot param of

psmouse.proto=imps

on the end of the kernel line in /boot/grub/grub.conf is the solution.

*"thermal issue" - defn - allowing an internal cable to foul the processor fan overnight, don't try it bad things happen!

Sunday, August 01, 2004

Fedora Core 2 - Oracle Upgrade Fun

After waiting for a while, I finally upgraded my Fedora Core 1 box to Core 2. In general fairly painless and I've noticed some general increases in performance - the GUI is snappier and my Java applications are benchmarking 10-18% quicker.

My only real problem was that my original 9i instance will not start up under Core 2 whatever I do. I jumped through every hoop I could find on google for looking at how to deal with the dreaded shared memory issues, but nothing worked for me.

In the end I gave up and installed 10g instead, the normal install issues apply like -IGNORESYSPREREQS to get around the distribution name. The install worked for me aside from the default database generation, this trick fixed that issue for me eventually.

It also imported my dumps from 9i seamlessly and the new enterprise manager web console is very cute.

Tuesday, July 13, 2004

Hibernate: A Developer's Notebook (Hibernate and Xdoclet)

For the last month or so I've been writing a new production system for one of our new customers using JBoss, Hibernate and Xdoclet.
The application needs to run on several different database backends (Oracle, SQL-Server etc.) and these tools have saved me hours and hours of work. I've been very impressed by :

Cover

which offers a short technical guide to using hibernate.


Thursday, July 08, 2004

Cruisecontrol Display Issues On Unix

Our coverage reports use clover as part of our cruisecontrol build. We have had some fun over time with X11 display issues when cruise calls the parts of the ant script which launches the clover graphing tool.

On a normal build you would just add -Djava.awt.headless=true on a jdk 1.4+ machine, but we struggled to get this passed to ant. Environmental variables like ANT_OPTS do not seem to be passed by cruise.

However salvation is now at hand, it is possible to pass these kinds of flags to the ant task as part of the control.xml file.

eg.
<ant buildfile="myproject/etc/build.xml" target="cruise-build" multiple="1" useLogger="false" >
<jvmarg arg="-Djava.awt.headless=true"/>
</ant>

Sunday, May 09, 2004

FindBugs

I've been using a tool called FindBugs for the last few months. Its a great little tool, it finds common coding errors like failing to close ResultSets etc. There is even an Eclipse plugin - so there really is no excuse not to use it.

Tuesday, May 04, 2004

MyEclipseIDE

The folks over at MyEclipse are doing a good job. I subscribed about 10weeks ago and have been very impressed. You can probably find equivalents to most of the plugins they provide for free, but the fact they are all provided on one easy to manage bundle is well worth the yearly fee.
They are really good at keeping up with Eclipse releases/milestones and the xml/struts support is making my life much easier at the moment.

Sunday, April 25, 2004

Faith In OpenSource

As discussed earlier I've been flat out with many things over the last few months. A combination of that and the team I work with having moved to Eclipse has meant that I've not kept my Sourceforge project nbCheckstyle up to date.

However a couple of days ago I got a series of patches sent to me from Shawn Bisgrove which upgraded my old (and really shameful) code to run under Netbeans 3.6 using the latest version of Checkstyle. So what was a previously dead project has been brought back to life - thanks Shawn.

Saturday, April 24, 2004

Time Savers

It has been quite a while since I've posted, mainly for good reasons as things are flat out with my company at the moment.

One of the things that I've been up to is learning to use a few tools which are now saving me bags of time.
I had previously used xdoclet to generate EJB interfaces etc through ant..
Over the last few months several of the new projects have been struts based, again xdoclet has come to the rescue and allowed me to forget about swathes of configuration files. Highly recommended.

I've also started experimenting with hibernate as an alternate data persistence layer for us on a new project. The project in question has two or three differing target databases for deployment (Oracle, SQL Server and another under discussion), this means that I really ought to be able to test how well the differing mappings work. Of course xdoclet has again come into play to create the mappings files.