JUnit Manifest – Why no MainClass?

Time for a minor rant.

Why doesn’t the jUnit jar have a manifest with a MainClass atrtibute? Surely there is some useful default application that junit could run in this instance – I don’t know – maybe the Swing GUI test runner. It would sure save me looking up and typing the class name on the occasions I need to run a test outside Ant. Has further JUnit development stopped?

Oh well, back to those tests …

Update: OK, I can think of a few reasons 🙂

More MT to WordPress Rewrites

As I noted in a previous entry, I used the Rewrite rules suggested by DrBacchus. I’ve just now updated them to handle the monthly archives as well as the single article archives. I also made these rewrites work as permanent redirects. Javablogs updated my feed info automatically which was nice. Here are the rewrites I am using:


RewriteRule ^blog/archives/(200.)_(..).html$ /blog/index.php?m=$1$2 [R=301]
RewriteRule ^blog/archives/00(.*).html$ /blog/index.php?p=$1 [R=301]

mod_rewrite rocks.

Clover.NET 1.2 Released

One of the reasons I had time to update my Blog software is that we, Cenqua, have recently released Clover.NET 1.2. There’s lots of good stuff in it but I won’t go into most of it here. Have a look at the announcement in our forums for more info. What I thought might be interesting to talk about are the issues in parsing VB.Net.

When we started to add VB.Net support to Clover.NET, I thought parsing VB.Net would be relatively easy. After all, on first inspection, for most statements, there is a corresponding “End” statement. I thought that the regularity that implied would make everything quite simple. If only it were so …

We started from the Microsoft VB.Net language specification and it’s a good start. Defining a grammar for a language parsr, however, is a precise art and it soon turns out that the real specification of VB.Net is the set of programs which can be compiled by vbc and not that specified by Microsoft’s grammar. Since releasing VB support, we’ve had a few reports of programs that out parser rejects. In most cases, we’ve found the program does not meet the language spec but it is accepted by vbc.

One example would be the specification of EventMemberSpecifiers. In the specifcation, the event specifier takes an Identifier. In reality, this can be either a keyword or an identifier. So, even though “select” is a keyword, the following is ok


Private Sub MenuItem1_Select(ByVal sender As Object, ByVal e As System.EventArgs) Handles MenuItem1.Select

End Sub
Since the MS grammar is explicit in other areas about allowing keywords or identifiers, it makes you wonder why it does not allow that here.

The ability to use keywords as identifiers is pretty unusual in a language. I wonder if that is a result of .NET’s multiple language ideas. It certainly makes parsing a challenge.

Another example is the block construction. A block is defined as a collection of one or more labeled lines, each of which must end in a LineTerminator, which is a CR or LF one one of the Unicode variants. So, when a TryStatement is specified to take a block, this should not be legal but is:


Try : stream.Close() : Catch : stream.Close() : End Try

So, a block can be terminated by a colon too, which is unfortunate as the colon is used for a few other things too.

Anyway, you get the picture. If you are parsing VB.Net, and using the specification as your guide, you’re in for a few surprises. It’s what makes life interesting, isn’t it?

Updated My Blog Software

I’ve finally updated my Blog software. It took me a while. I looked into a few packages and finally chose WordPress. It seemed to have all the features I needed and is provided as an option by my hosting provider which is one of the best webhosting, which is nice but not a major factor.

I’m hopeful the change should be relatively seamless. I have redirects in place for the old MovableType pages and feeds. It took a bit of hacking to get right. I worked on my Fedora box, using a site backup to test out the various options. I learnt a bit about Rewrite rules in the process. Thanks to DrBacchus’s Journal for some useful information.

Of course, the main feature I was after was the measures to avoid comment and trackback spam – we’ll see how that goes. It’s ironic that as I was thinking about upgrading, WordPress.org ran into some bad PR, relating to gaming Google. After reading the various explanations, I was happy to go ahead with WordPress. Everyone makes mistakes …

Pair On Baby

I remember reading Kent Beck’s first book on extreme programming. I kept thinking that it expressed the essence of how code was actually developed even when developers were following a heavyweight process. I kept experiencing those “yeah” moments where everything Kent had to say just made sense.

Today’s new product releases from our company, Cenqua, give me that same feeling. The pairon just makes sense. If the idea of pair programming has been holding you back from embracing change, then these babies are just the ticket. I’m sure they even have uses beyond pair programming …

If you can’t pair program, for whatever reason, then the commentator is the next best thing. If you want to have that feeling of an experienced partner looking over your shoulder, just knowing what your trying to express, well you couldn’t ask for more.

We’re very happy with these new products. It’s a bit of a new direction for us but we’re really happy to hit our target release dates. That’s very important to understanding these products.