July 14, 2003
Using the Jakarta Commons

Using the Jakarta Commons

I've used a lot of stuff from the Jakarta project - Tomcat, Ant, and Velocity, mainly. But I've not really had a look at Commons.

Some of the stuff in Commons looks really handy. Covered by the article, CLI, Lang and Collections look like they should be in every Java coder's back pocket. I'll be taking a look at Pool, too - this could come in handy for me in the near future...

Posted to Java by Simon Brunning at 02:41 PM
This week, I will be mostly...

... in the UK. Makes a nice change.

Posted to On the road by Simon Brunning at 02:30 PM
Weblog Ethics

Weblog Ethics

Interesting. (Though the whole RSS/Dave Winer/Mark Pilgrim saga isn't - at least not to me.)

Me, I frequently edit my posts to fix typos and the like. I occasionally go back and fix what I see as bad style, too - is that OK? I don't deliberately alter the meaning of my posts, but I suppose that it's possible that I do.

I also often add Update: sections at the bottom of old posts. Other than that, I leave them alone.

Via Simon Willson.

Posted to Blogs by Simon Brunning at 12:09 PM
toString - just say no!

Java tip of the day - a must for newbies (are you reading this, Steve?), and a valuable reminder to the experienced: Kasia's The abuse and over-use of toString().

I was working on other people's code last week, and I wish they had read this! The debug code was using toString() all over the place, and NullPointerExceptions were frequent.

To sum up, the rules with toString() are: always override it, and never call it (directly). Instead, use String.valueOf() at all times.

Via Erik.

Posted to Java by Simon Brunning at 10:55 AM