Tag Archives: java

Java Readability

Re: The Positive Legacy of C++ and Java: “Java got this balance correct – Java might be verbose and lack lots of ‘cool’ features, but it’s really easy to figure out what some random code is doing.” (Via infoq) I often hear that Java is “easy to read.” Don’t kid yourselves. When everything takes so […]

Cocoon Settings

I’ve been looking quite extensively at the cocoon-spring-configurator, trying to work out how to make it fit into our preferred java webapp config scheme: context-params. By default, cocoon-spring-configurator just reads Properties files. The complete list of property files that cocoon-spring-configurator picks up is extensive. If you want to see what’s happening, then add this to […]

UrlEncodedQueryString

UrlEncodedQueryString represents a www-form-urlencoded query string in Java. I can’t tell you how many times I’ve needed this in the past. Perl has the lovely URI::QueryParam. In fact, I’ve got a fairly close cousin of this class in use at $WORK (though it uses google collections as I’m lazy). Now it just needs to appear […]

Eclipse Update Failure

I’ve just hit the “update everything” button in my Eclipse install. All seemed well until I restarted it and got a message about a shared library not being found. Looking in Console.app showed this lovely little line: 09/02/2009 14:33:07 [0x0-0x1ef1ef].org.eclipse.eclipse[43353] dlopen(../../../plugins/org.eclipse.equinox.launcher.carbon.macosx_1.0.100.v20080509-1800, 2): image not found Fairy ’nuff. I had a quick grep in the eclipse […]

JSPs in Maven

Every now & then I need to whip out a quick webapp. Normally, I would prefer to use something like freemarker or velocity. But JSP is standard, and it’s everywhere. Despite it’s inability to be secure, it is convenient. And that’s gotta count for something right? But, I never quite managed to get everything working. […]

tclogview

I had a quick thought this morning: I’m always logging in to servers to nose around in their logs. So why not a quick webapp to view the logs? I’ve done this before, but not in Java. So, I wrote tclogview in between stuffing down goose and entertaining the sprog. To use it, check it […]

Exception Handling Whinge

I hate this. try { // … some xml parsing stuff … } catch (XmlException e) { logger.error("Can’t parse XML", e); } try { // … some xml parsing stuff … } catch (XmlException e) { logger.error("Can’t parse XML", e); } Why? Because it found a problem, and then carried on as if nothing happened. […]

maven in anger

I’ve ranted about Maven before. As it happens, I still stand by much of what I said. But, I’ve come to realise how superficial these criticisms are. Earlier this year, one of the libraries that I have a hand in maintaining needed to be used by a maven project. Whilst I could have just written […]

NetBeans Correction

I’ve just been reading Top Java Developers Offer Advice to Students and noticed something Tor said, which addressed one of my issues about NetBeans. Thanks, Tor! For example, in NetBeans, you don’t have to write the left-hand side in assignments when you’re calling a method. Just write this: "foo".indexOf("o"); "foo".indexOf("o"); Move the caret inside indexOf, […]

NetBeans 6.5

Today NetBeans 6.5 got released. Congratulations, guys! I’m primarily an Eclipse user1, but I keep hearing about NetBeans through the Java Posse and heck, I even subscribe to the NetBeans podcast to try and keep an eye on what’s up. Every time a new release comes out, I give it a whirl. So this time, […]