Tuesday, August 31, 2004

SVG: Batik and <tspan>

Currently I need many drawings in PDF to be able to include them in documents produced by PDFLaTeX. With Batik, there is a tool to convert SVG to PDF.
The Idea to use SVG came as Together can write this as the only vector format. And when producing class diagrams etc. with Together, the PDF result is excellent. Unfortunately Together is no general purpose drawing tool.
After some investigation I found Sodipodi, which is a nice tool with some downsides. But ok, it can produce SVG. When doing some tests, the Fonts always looked ugly (the top line in this pdf). I did some testing around and found that Sodipodi does the following

<text ....>
<tspan>This is some text</tspan>

After removing the <tspan> elements, the text can no longer be moved around in the Sodipodi canvas, but looks like it should (bottom line in this pdf).
As <tspan> is pretty valid in SVG, this seems to be a problem in Batik or FOP, which is used by Batik to produce PDF. Especially as the conversion to PNG works as it should.

Saturday, August 28, 2004

The "I want it now" syndrome

Have you ever worked in an Open Source project?
Then you probably know the folks that report a bug with "ultra critical" and "I need it yesterday". The bug report sometimes says "xxx doesn't work". When you then ask what doesn't work -- silence. Nothing. Or even flaming that one could have answered earlier.

I understand, that not everybody is able to fix things themselves. And I also understand that if you use a tool that stops working, it is very important to get it fixed at that moment.

But most people that work on Open Souce earn their living by doing other things, perhaps even having a second job in the evening. So you cannot expect them sitting behind the trouble ticket system all day long just waiting for that very urgent problem coming in.

If a tool has such a big value for you and your production chain, then get a support contract upfront or try to pay someone to help you when the problem arises. Some call that risk-management.

Friday, August 27, 2004

Things the world doesn't need

Heise newsticker reports that Cherry now offers a Linux Keyboard (click here for a larger image)!

That keyboard has keys for page forward/backward, as if ALT-/ woudn't work. It also has cut / copy / paste keys.
Ok.. nice idea. But the bad think about all those keys is that they cannot be reached without moving the hand away from the ten-finger writing position.
But I am sure, it will be a success, as it has a penguin key.

P.S.: When do they offer keyboards with a BSD daemon or a steaming java cup printed on? :-)

Friday, August 20, 2004

Maven woes again

As Xdoclet uses Maven to produce the final documentation and web site, I thought I could enable the maven-statcvs-plugin to get to fancy line of code charts.
But instead:

[java] StatCvs-XML - CVS statistics generation
[java] java.lang.NullPointerException
[java] at net.sf.statcvs.Main.getModuleName(Main.java:193)

When looking at the documentation, I found out, that this plugin uses a cvs command found on the host, while the maven-changelog-plugin uses a built-in cvs client.
This explains why maven takes that much space *sigh*.

Even worse: both plugins get the change log from the cvs server. Instead of fetching it one time only and then processing it twice, the load on the server is doubled!

Friday, August 13, 2004

Java code analysis tools

Today I stumbled over some stupid errors and thought "why doesn't eclipse tell me about that?" so I remembered Findbugs and was first looking for a findbugs output xml to html stylesheet (there is one posted in the forum at sf.net). I also saw that there is an eclipse plugin. So I was trying to get findbugs with its plugin to work together with Eclipse 3.0, but did not have success because I misunderstood part of the the documentation.
While googling for help, I came across PMD and thought to give it a try.
The plugin works nicely and is easy to set up and run.
But after running it over my source file, I was disappointed, because it mostly was a different incarnation of checkstyle. It was telling me that some variable names were too short, others too long bla bla bla.
But it did not find the real problem of the following code snippet:

Object o1 = getBla(..);
Object o2 = getBla(..);
if (o1==null && o2 !=null) {
// do something
else {
if (!o1.equals(o2)) // something else

PMD complains that o1 and o2 are too short that is all, but does not detect the NPE when o1 and o2 are both null.

Ok, this might be too tricky. Lets try something simpler:

Object o = null;
System.out.println("below is a NPE");

Even here, PMD only complains about the short variable name, but doesn't find the NPE.

I am sure, that a tool like PMD can help a lot in improving code quality, but is basically useless for bug hunting.

And for my need to convert the findbugs output into a html page, I wrote an extremly simple xslt stylesheet.

Thursday, August 12, 2004

A-Team finally free of charges

The Onion, America's Finest News Source
reports here that the heroes of my youth, the A-Team is finally cleared of all charges by the US Military.

Enjoy the article :-)

Tuesday, August 10, 2004

Downside of ubiquitous reachability

We were having some strange problems with some framework. I got the number of an expert from "his" sales guy a few days ago and I was trying to reach the expert now. Around 3pm yesterday (German time) I dialed +49 171 ... (German mobile phone number). After a few beeps I heard the voice of that guy. I started ".. bla bla bla.." then I heard "you know .. it is 6am here where I am .. you just woke me up".
I felt somewhat guilty that I did phone him and that I did not directly hang up. On the other hand I was pissed, as I did phone during normal office hours (in Germany) and cant know the German numbers are redirected to the US (California probably). If that guy doesn't want to be woken up, then he should shut down his phone).

Friday, August 06, 2004

Bahncard - I am impressed

German Railways, Deutsche Bahn offers a reduction system, Bahncard, where you buy a voucher that gives you 50% reduction on the normal railways fee.
In the past, ordering a bahncard took a week or longer and they sent you a slip of paper as preliminary Bahncard until they were able to print the plastic card.
This time things were different: including the delivery of the Bahncard by German Post, it only took one and a half days from ordering the Bahncard at the web site until I had the card in my hands. I am really impressed and hope that other services of the Bahn will ameliorate as well.

Tuesday, August 03, 2004

20 years Email in Germany

20 years ago, Germany got connected to the CSNet. This article shows the first email that reached Germany.
Why do I write this? Because the CS Department of U Karlsruhe later 'outsourced' this part into one of the first German Internet providers 'Xlink' that later became of the now bancrupt KPNQwest. I had the pleasure to follow parts of this live from '93 on @Xlink.

Sunday, August 01, 2004

A must have for Firefox

Annoyed by flash ads in Firefox, that you can't block? I was, because they sometimes use 80% CPU on my Pentium 4 grade notebook, which makes the fan spin around noisily. Luckily I found Adblock as Firefox extension.
Perfect :-)

(I know, this post looks like an ad ..)